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.
When I double-click my .jar file, the windows hour glass happens for an instant, but then the application i created doesn't run. I don't know what the issue could be since I've gone through this process with my other apps, and each one of them runs when I 2x-click their jar files.
Following the instructions (i hope) in Head First Java (btw, Thank the authors for this book!), I created an executable JAR. I hit the return key at the end of my manifest.txt file, and created the jar from my classes dir, just like it says on page 592, and just like I've done before.
I get no error messages; the app just doesn't run. Any thoughts? thanks!
Try running it from the command prompt: java -jar myjar.jar
It will actually show you the error it is having. Most likely it can't find Main.
Joined: Dec 29, 2005
Thank you! I realized the area of the problem when I ran the app from the command line, as you suggested. There were two things: I created some of my own utility packages which I forgot to copy into the application's directory structure, and I forgot to update one of the paths to a file to represent the this same directory tree I created when I put the app into a package.
Joined: Dec 29, 2005
ok, now there's another file path issue I am confused about: my app reads a file when loading. I have the file located in the directory tree in the right place, so that when I 2x-click on the jar file (the .jar file located in the classes directory), the app is run.
However, when I move this .jar file to another directory, say, the desktop, the app does not run (because it cannot find the needed file).
I guess I could make the path like so - "c:\java\myApp\..." - but will this work if I send the jar to a friend? And what about the idea that when the jar file is created it includes everything under the com directory? And what about Naomi?
so strange to me...hope I explained my soap opera clearly enough.
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