Posts Tagged ‘decompilers’
Thursday, May 19th, 2011
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: Cool Tools, decompilers, hack, HxD, java, Studio, studio-char-limit Posted in Cool Tools, Studio | 4 Comments »
Monday, May 16th, 2011
We don’t write much about Aqualogic Interaction Studio ’round these here parts anymore. That’s because Studio has long since been end-of-life’d (by BEA, even before the Oracle acquisition!). But, that doesn’t mean it isn’t alive and gasping its last breath in many of your portal sites. Sure, it’s an over-the-hill product but it does serve a functional need: the ability to easily create forms, polls, and other data entry forms.
So, it’s with reluctant enthusiasm that I start the first of a three-part series on “How to increase the 1,000 character limit in Plumtree Studio”. Even if you don’t actually use Studio, hopefully you’ll find the journey interesting and informative for your other portal diagnostic needs. I’ll walk you through the process of identifying the code here, recompiling and reintegrating in Part dos, then some SQL Server diagnostics in Part tres.
The problem, as recently presented by a client, was that Studio has a 1,000 character limit on text fields. If an end user tries to type more than 1,000 characters, they get this lovely message:

But, we needed to increase that value. While it would be really nice if there was just some configuration file somewhere, sadly, the 1,000 character limit is hard-coded. So we first need to find the file that’s producing this alert. (more…)
Tags: decompilers, hack, javascript, Studio, studio-char-limit Posted in Studio | Comments Off
Sunday, April 3rd, 2011
There was a spirited discussion in the comments for our .NET decompiler post (hey, 2 comments is close to the record for this blog!), and this is long overdue, but in the past year, I’ve become a fanatic user of Emmanuel Dupuy’s JD-GUI Java Decompiler. It’s free, it works, and it has the ability to decompile entire Java .jar files at once, saving all the source in a folder structure that matches the original source/package names.
The package export capability is excellent when you’d like to see what has changed between portal releases; you just decompile the WCI code before and after, and use Beyond Compare to highlight the differences between builds.
JD-GUI has been my tool of choice for many posts on this blog, and if you’re into getting down and dirty with your WebCenter Interaction Java code, I highly recommend this bad boy:

JD-GUI is a free download here, but I suggest throwing these guys a couple bucks for the donationware. C’mon, 20 bucks, anyone? (before you ask, yes, I contributed to the cause..)
Tags: Cool Tools, decompilers Posted in Cool Tools, Integryst | 4 Comments »
Wednesday, April 21st, 2010
Any self-respecting programmer has a suite of decompilers in their arsenal. Hey, the WebCenter Interaction portal is great, but it’s not without its fair share of bugs, and often Oracle Support isn’t going to give you a lot of, well, support – so sometimes you need to take matters into your own hands. Today’s Cool Tools are two of the best .NET decompilers I’ve used; I’ll have a post for Java decompilers soon.
I’m kind of split on this one and go back and forth between Dis# Decompiler and Red Gate’s .NET Reflector. I do a lot of decompiling, and both have proven relatively useful. As professional tools, they’re not cheap ($399 and $195 for the professional versions, respectively), but can save hours of time, and both have free trial versions. Red Gate’s Reflector even has free version available.
Personally, I sway a little more to Dis# Decompiler for one reason: You can have it decompile ALL class files in a .DLL at once. This is highly useful if you’re looking at bad portal code and are trying to search for a particular string somewhere in the portal libraries, but don’t know which class it might be in; you can decompile everything to disk and search with a text tool. Red Gate, on the other hand, offers Visual Studio integration – which I haven’t tried yet – that promises to allow you to step through compiled code like you would with your own source.
So there you have it – two decent tools to check out when it comes time to figuring out why something’s broken. Let me know if you’ve got a preference, or feel free to recommend something else!
Dis# Decompiler

Red Gate’s .NET Reflector

Tags: Cool Tools, decompilers Posted in Cool Tools, Integryst | 3 Comments »
|