Deploying an Application written on the Forte CE IDE

I have written an application using the Forte CE IDE. Now I want to deploy it to other PCs running JRE1.3, so I used the JAR packager to create a JAR file and I ensured the manifest had the Start class specified. Unfortunately, when I try to run this application via the command line on either another machine or my own (outside of Forte), I get the message

Exception in thread "main" java.lang.NoClassDefFoundError: <start class name>

I have used the "java -jar" command.

The start class is in the jar file.

The start class name is in the manifest.

I must have missed something, and I am at my wits end.

Has anyone else had similar problems deploying applications from Forte? Or can anyone offer advice or a link to some comprehensive documentation on how to accomplish deployment? The help function in Forte was no help at all.

Thanks.

[899 byte] By [djkilburn] at [2007-9-26 2:20:14]
# 1

Did you you "package" in your code?

If you did you will need to make a subdir with the name of the package and put the main class back from this.

eg c:\mycode contains the main class

and c:\mycode\mypackage has the rest of the classes

make sure the class path has the curent dir (.)

eg -cp.;somedir;otherdir;etc

hope this works

Regards

Steve Goldsmith

juniper7 at 2007-6-29 9:23:44 > top of Java-index,Archived Forums,Java Programming...
# 2

Hi, I had similar problems when starting to use forte. Using main-class in jar files is not very documented and sometimes it act strange. I suggest you to edit the 'manifest' property of the jar packager. There, you should generate the basic main attributes and add your main-class line. Another thing to check is that you must name the main-class using the same package names that are in the .java file that contains it.

xeneve at 2007-6-29 9:23:44 > top of Java-index,Archived Forums,Java Programming...