How to build a Java app package ?

Pascal

Official visitor
I wanted to update my LimeWire package (found on Joan iDisk, see the LimWire FAQ) from 1.4 to 1.4b, so I replaced the older jar components with the newer ones. Unfortunately, the package doesn't work anymore : when I double click on it, java complains that the main library could not be found.

I guess I should be using "MRJAppBuilder" (found in the Developer CD), but I don't know how to identify the main library...

Any ideas or tips ?
 
It's possible that the author changed the Java main class (the class with the static void main(...) method), but that would be odd for a 1.4 to 1.4b update.

Still, if you're comfortable working with jar files, you might check to see if the author has information about the main class in the jar's manifest file.

One way to get to this manifest file is
Code:
% <b>jar xf lime.jar META-INF/manifest.mf</b>
This will give you a META-INF directory that contains the jar's manifest file.

Maybe the author put the main class in the "Main-class:" line of the manifest.

You could then try running the program with something like this:
Code:
% <b>java -classpath=lime.jar com.something.TheProgram</b>
This might work, depending on how complicated the distribution is with respect to other included jar files and such.

-Rob
 
I forgot to give you a follow up ! I found, a few days after my post, that the problem is that either Mac OS X' JVM or LimeWire's code do not like spaces at the beginning of a folder name... And this was the case at that time.

I had not been very scientific and I had changed 2 things at the same time : move LimeWire to my " Internet" folder (notice the initial space) and updated the jar packages. Not a wise move, since if something breaks up (like it did happen in this case) I could not identify the cause !

So after moving LimeWire to a folder sans space at the beginning, the java package worked as normally as it does once again...

I too found it odd that the author changed the Java main class for an incremental update.
 
Back
Top