LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Do I or Don't I have Java installed (https://www.linuxquestions.org/questions/programming-9/do-i-or-dont-i-have-java-installed-150112/)

patpawlowski 02-24-2004 05:56 PM

Do I or Don't I have Java installed
 
I can't figure if I have a java compiler installed or not. Imagine that!

Hopefully this output will help someone help me:


pat@linux pat]$ whereis javac
javac: /usr/bin/javac

[pat@linux pat]$ whereis java
java: /usr/bin/java /usr/share/java

[pat@linux pat]$ java HelloWorldApp.class
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp.class
at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.4.0.0)
at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.4.0.0)
at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.4.0.0)
at __libc_start_main (/lib/i686/libc-2.3.2.so)


As always, thanks!

itsme86 02-24-2004 06:32 PM

Is there something like a JAVALIB environment variable you're missing or something maybe? I don't know too much about java, but that's where I'd look first. Sorry :)

stoe 02-24-2004 07:01 PM

you did:
Code:

java HelloWorldApp.class
it should be:
Code:

java HelloWorldApp
".class" at the end won't work.

patpawlowski 02-24-2004 08:22 PM

Thank you! That did it. I should be a Java master by next week :study:


All times are GMT -5. The time now is 12:36 PM.