Cool Tools 18: HxD Hex Editor

Continuing our journey on increasing ALI Studio’s character limit, we’ve now identified the code that needs to change – it’s in com.plumtree. studio.model. data.access.TableDAO.java.

The problem is, Studio is ancient, so while we can easily update the following code:

  protected int mUserColumnWidth = 1000;
  protected int mUserColumnWidthChars = 1000;

… we can’t just recompile the file using the latest JDK without expecting problems.

So, we need to figure out what Java version was originally used to compile this file. To do this, we need today’s Cool Tool: HxD Hex Editor. Why? Because all Java .class files have the same set of bytes at the beginning identifying them as Java files, along with the JDK version used to compile.

HxD allows us to view the actual bytes, and and it does it well. Opening the TableDAO.class file in HxD, we see:

Bytes 6 and 7 are “00 2E”, which represent JDK 1.2.

Once we’ve made our changes and have the correct JDK downloaded, we rebuild the file, making sure to include the proper .jars in the CLASSPATH:

set CLASSPATH= %CLASSPATH%; C:\code\studio\ WEB-INF\lib\log4j-1.2.8.jar
set CLASSPATH= %CLASSPATH%; C:\code\studio\ WEB-INF\lib\jakartaRegexp1dot2.jar

C:\jdk1.2.2\bin\javac -classpath %CLASSPATH% com\plumtree\ studio\model\ data\access\ TableDAO.java

Take the TableDAO.class file, jam it back into your studio.war file, and you’re good to go – assuming you haven’t increased that value over 4,000 characters! There’s still one more glitch in this journey

Tags: , , , , , ,

4 Responses to “Cool Tools 18: HxD Hex Editor”

  1. Geoff Garcia says:

    Hey Matt,
    Great post and very relevant to problems I constantly have with users going over the limit.
    Any chance of a 3rd post in this series where you install some type of character counter? That would do wonders for some!

    Also, I’m wondering, just because you increase the capacity of the code to accept >1k characters, on the database end I wonder if the fields might not be large enough to support 4x more content.

    In other Studio news, I recently checked Oracle’s support for Studio and was surprised to see it ended in 2010 (http://www.oracle.com/us/support/library/lifetime-support-middleware-069163.pdf)!

    • Matt Chiste says:

      Geoff, thanks! Actually, the third post is about increasing the character count in the database >4k.

      That is surprising that it’s officially EOL’ed in Nov 2010 – given how old the app feels, I’d have thought it would have ended in the late ’90s :).

      I think adding a character counter won’t be that hard given that we’ve now seen where that text renderer is in the code – would just need to add a little javascript that would show a counter based on the text field. However, do you think it’s necessary if we’re able to remove the limit completely?

  2. Geoff Garcia says:

    Good point about the necessity of a counter if there isn’t a limit to worry about!

    If some folks are intimidated by the steps involved in upping the character count, they might be up for a lighter character count solution. But that begs the question – how many folks out there still use Studio and how many of those would want to mess with it at all given the lack of support.

    I was recently at a competing portal platform conference and their forms solution paled in comparison to Studio. While it had an uber slick UI, it lacked the various portlet types (we use all of them!), and database security features.

    We’ve used InfoPath to handle some of our more complex forms, and while it has certain advantages over Studio, it too has limitations. We are just getting around to connecting these forms to databases for reading and writing, but given that it uses files over a web based interface is disappointing to someone like me that wants to see full portal integration. I don’t think we are ready to bite the bullet and get Sharepoint InfoPath server which I believe facilitates web interfaces for forms.

    • Matt Chiste says:

      Geoff, I’m always surprised how many clients still use Studio; forms are and it always will be an important part of corporate intranets/extranets. Stay tuned for a really exciting announcement about a Studio alternative fully integrated with WCI :).

Leave a Reply