This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This problem is a continuation of a problem I submitted several days ago. I am using Java 1.1.x development evironment in particular I am using JBulider2. Anyhow, I am having an issue with an application I have just finished designing. I have made a jar that contains all the project files, but when I run the jre it fails. It issues the error "unable to load CAPExp.AppMain class". I have confirmed that all the classpath references are correct, and that they match in case. I have also opened up the JAR and confirmed that the class is in the archive. I don't know where to go from here any ideas?
1. Try recompiling all your classes once again as there could be chances that one of ur main class is corrupted. 2. Check the main class whether it has a static main method for the jvm to load the main class. 3. Check the package name and class name for any typos.
Joined: Apr 13, 2001
Checked Checked and Checked. I tried disabling all but the absolute most essential code and it loaded. I now going through and reactivating it in parts. Do you have any idea why it would compile in my deevelopment environment and then not work once I put it in a jar?
Joined: Apr 13, 2001
After experimenting a bit more its seems it won't load because I am using a JFrame class to hold my application. When I change it too a normal Frame class it loads. There are compiling erros though when I use the Frame class implementation. Is there away to call them JFrame from the Frame class?
JFrame is part of the SWING stuff that came out with Java2. The 1.1.X versions had various amounts of beta classes for swing, but for the most part do not allow you to use it. So you either need to upgrade the version of the SDK/JRE that you are using to at least 1.2 or use the AWT components exclusively.
"JavaRanch, where the deer and the Certified play" - David O'Meara
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com