Re: Beating a Dead Horse: NoClassDefFoundError
From: Tony Morris (_at_dibblegoATbigpond.com@)
Date: 03/28/04
- Next message: Andrew Kesterson: "Re: Beating a Dead Horse: NoClassDefFoundError"
- Previous message: Roedy Green: "Re: Getting daylight savings start/end times?"
- In reply to: Andrew Kesterson: "Beating a Dead Horse: NoClassDefFoundError"
- Next in thread: Andrew Kesterson: "Re: Beating a Dead Horse: NoClassDefFoundError"
- Reply: Andrew Kesterson: "Re: Beating a Dead Horse: NoClassDefFoundError"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Mar 2004 07:56:24 GMT
"Andrew Kesterson" <andrew@aklabs.net> wrote in message
news:pan.2004.03.28.07.41.43.116529@aklabs.net...
> I've google-groups'ed the hell out of this and have yet to find anything
> that helps me.
>
> I'm learning java on a Redhat Linux 9.0 system using gcj (javac binary)
> 3.2.2 and gij (java binary) 3.2.2, on an AMD Athlon 2500+, 512mb of RAM.
>
> $ gcj -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/libgcj.spec
> rename spec lib to liborig
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --disable-checking --with-system-zlib --enable-__cxa_atexit
> --host=i386-redhat-linux
> Thread model: posix
> gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
>
> $ gij --version
> gij (GNU libgcj) version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
>
> I've been doing java for a couple of days now, and all was working fine;
> and all of a sudden I can't run anything. It gives me cryptic errors, that
> don't appear to relate to CLASSPATH (I've altered it as per so many USENET
> suggestions and still getnothing). The source and program output are
below.
> What has happened here?
>
> $ cat hello.java
> public class hello
> {
> public static void main (String[] args)
> {
> System.out.println("Hello World");
> }
> }
>
> $ javac hello.java
>
> $ java hello.class
> Exception in thread "main" java.lang.NoClassDefFoundError: hello.class
> at 0x40264e17: java.lang.Throwable.Throwable(java.lang.String)
> (/usr/lib/./libgcj.so.3)
> at 0x40257c8e: java.lang.Error.Error(java.lang.String)
> (/usr/lib/./libgcj.so.3)
> at 0x402596b6: java.lang.LinkageError.LinkageError(java.lang.String)
> (/usr/lib/./libgcj.so.3)
> at 0x4025ab36: java.lang.NoClassDefFoundError.NoClassDefFoundError
> (java.lang.String) (/usr/lib/./libgcj.so.3)
> at 0x402a9075: gnu.gcj.runtime.FirstThread.run()
(/usr/lib/./libgcj.so.3)
> at 0x4024bc4c: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
> at 0x402188ac: _Jv_RunMain(java.lang.Class, byte const, int, byte
> const, boolean) (/usr/lib/./libgcj.so.3)
> at 0x08048910: ?? (??:0)
> at 0x4069044d: __libc_start_main (/lib/libc.so.6)
> at 0x080486c1: ?? (??:0)
>
> $ env
> CLASSPATH=/usr/src/java (my java development directory, this didn't fix
> it, included here for completeness)
>
> -----------------
>
> Can anyone help me with this? Short of ripping out everything JDK related
> and re-installing from RPMs, I don't know what to do. It was working fine
> and then mysteriously stopped. ?? I didn't change anything that I'm aware
> of.
http://www.xdweb.net/~dibblego/java/faq/answers.html#q8
Remove the ".class" when you invoke the JVM.
-- Tony Morris (BInfTech, Cert 3 I.T., SCJP[1.4], SCJD) Software Engineer IBM Australia - Tivoli Security Software (2003 VTR1000F)
- Next message: Andrew Kesterson: "Re: Beating a Dead Horse: NoClassDefFoundError"
- Previous message: Roedy Green: "Re: Getting daylight savings start/end times?"
- In reply to: Andrew Kesterson: "Beating a Dead Horse: NoClassDefFoundError"
- Next in thread: Andrew Kesterson: "Re: Beating a Dead Horse: NoClassDefFoundError"
- Reply: Andrew Kesterson: "Re: Beating a Dead Horse: NoClassDefFoundError"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|