Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javac: invalid flag

843804Jul 19 2004 — edited Jul 19 2004
Hi,

I have fhe following problem. I can�t get my J2SDK1.4.2_05 running on my WinXP system. I have already set the Path- and the Classpath variables for several times, uninstalled and reinstalled the J2SDK1.4.2 Software. But I always get the following error messages when start compiling source codes:

c:\...>javac Hello.class
javac: invalid flag: Hello.class
Usage: javac <options> <source files>
...

And I also get an error message by trying to start a Java-programm (already compiled)
c:\...>java xxx
Exception in thread "main" java.lang.ClassFormatError: xxx (Bad magic number)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
....

I had installed Borland JBuilder in former times, but deinstalled it before installing the new j2sdk-version. I also have installed Norton SystemWorks and I suggest that the error depends on that.
It would be nice if somebody who had a similiar problem could help me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2004
Added on Jul 19 2004
2 comments
2,479 views