Welcome to the painful world of Java.

I'm GUESSING you forgot to run javac 1st... (or the .class file might be
corrupted)

Don't ask, just learn this:

For javac (which converts the .java file to .class) you MUST specify .java
For java (which executes the .class file) you MUST NOT specify .class

-----Burton


(For your enlightenment, I did a google message search for the odbc java "bad
magic number" and found (among others) this at
http://groups.google.com/groups?hl=en&selm=36FBBB44.FCC0F7B8%40tmdesigncom.com:

From: Iain Lowe ([EMAIL PROTECTED])
Subject: Re: Bad magic number
Newsgroups: comp.lang.java.help
View this article only
Date: 1999/03/26

Every classfile has something in it's header called a Magic Number.

The magic number in classfiles generated by the sun compiler is
3405691582 which in Hexadecimal is CAFEBABE.
Any classfile that does not contain this magic number as the unsigned
4-byte quantity will be refused by the virtual machine. You should post
what compiler you used to make your classfiles as well as what virtual
machine you are using.

Hope this helps =)

Iain Lowe


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
Humphrey
Sent: Tuesday, April 30, 2002 9:40 PM
To: 'Ntop'
Subject: [Ntop] Follow up: Trouble with ODBCServer.java


This may also be useful (note the removal of .java on the file executed)
C:\temp\ntop>java -showversion ODBCServer
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

Exception in thread "main" java.lang.ClassFormatError: ODBCServer (Bad magic
number)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to