Strange Java compile error...

ElDiabloConCaca

U.S.D.A. Prime
PLEASE help! I'm in a second-year Java programming class at my local university, and am trying desperately to complete my projects using ProjectBuilder instead of having to fire up VirtualPC to use JBuilder.

I'm getting the error:

Exception in thread "main" java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at java.util.jar.JarFile.<init>(JarFile.java:55)

java has exited with status 1.

This happens EVERY time I try to compile. I have the Dec 2002 Dev Tools installed with the GCC and Java 1.4.1 updates -- everything's up to speed.

I tried this with a few of my projects, and each yields that same error message when the program runs. Just for kicks, I created a new project with the default "Java Tool" template. It automatically generates a main method with the System.out.println("Hello world!"); line, which should compile and run flawlessly. Even THAT yields that same error message.

Help! What's wrong with my Java?! I can't compile/run ANY program because it gives me that same error every time!
 
This is not a compile error but indicates a problem during your program's start. It is supposed to happen if the .jar file is not present.

If you will, please check on the command line (Terminal, X11) if you can start the program manually. The .jar file should be present within your project's "build" subdirectory (which the ProjectBuilder should have created during compile). To start the program from the command line, switch to the directory containing the .jar file and launch java -jar yourprogram.jar - in case this works the problem is obviously related to some project settings which prevent the ProjectBuilder to correctly launch your program.

Hope this helps :)
 
I tried the "java -jar (myfile.jar)" command on the simple "Hello world!" project, and it ran just fine. However, my project has different java files for different classes, and trying to "java -jar (myproject.jar)" yields and error about not being able to find the other classes.

I tried a number of things -- reinstalling the Developer Tools with the GCC and Java 1.4.1 updates and reinstalling the Java 1.4.1 Update 1 for Mac OS X. Nothing helps.

I'm assuming that I SHOULD be able to open Project Builder, start a new "Java Tool" project which includes a main method with a simple System.out.println method and compile and run with no problems. No dice. It still kicks back that same error. That simple program isn't looking for any java.zip class or files or anything: it's simply a System.out.println method. It just ain't working.

Doing a google search for that error returns a lot of results, all of which are of little or no help.

I'd like to stay away from the command line entirely and work solely in Project Builder, but this is preventing me from doing so. I SHOULD be able to start a new project, compile and run without problems. The fact that this error shows up no matter WHAT the project is worries me -- something is screwed up.

Why is this error showing up? I tried downloading the Java 1.4.1 Update 1 for Mac OS X and installing that, but it complains that there's a newer Java 1.4.1 Update 1 already installed and refuses to install.

Like you said, rhg, my program compiles perfectly. It's during the run that the error comes up. It's during the run of ANY program that it shows up. What settings in PB can I change to make this error go away -- FAR far away?

Using JBuilder 9 under Virtual PC works fine, but I'd like to eliminate the need to use emulation software to get my projects done... can you help me some more?
 
switch to eclipse. it is better than project builder and JBuilder. designed for java and hassle free.
 
Wow, I must say I am impressed with Eclipse. It runs my projects flawlessly. It is a bit on the slow side, but hey, beggars can't be choosers and I think I've found my replacement for Project Builder. Thanks, wiz!
 
Back
Top