Using java in FC1(with eclipse)-help needed

Matt Morgan matt.morgan at brooklynmuseum.org
Tue Mar 16 19:21:27 UTC 2004


On 03/16/2004 01:53 PM, Kaustubh Ghosh wrote:

>I am quite novice towards java programming in linux.To start with I installed  
>j2re1.4.2_03 and also j2sdk1.4.2_04 in FC1(Both from java.sin.com).Now 
>peculiar problems arise.
>When I type "java -version" it gives 1.3.1(
>  
>
That's a path issue. You must also have the older version of java 
installed, and it appears earlier (or exclusively) in your path. At a 
shell prompt, type

which java

and you'll see where that version is (it'll be the first one that comes 
up, if more than one comes up). You can also type

echo $PATH

to see what directories are in your path. You can easily add the

/usr/java/j2sdk1.4.2_04/bin

folder to your $PATH in your homedir/.bash_profile or in other ways, but 
you should also remove the older version of java so it doesn't get in 
the way.

>When I type "/usr/java/j2sdk1.4.2_04/bin/java -version" it gives 1.4.2_04.
>Anyway  I  can compile any .java  file with javac.
>But when I try to run it with java(any of the above) the gui would not 
>come.(Hello World executes perfectly with System.out.println as also other 
>non-gui programs).
>
>I also installed eclipse sdk.It created a directory "eclipse" under /opt.When 
>I cycled to the directory and typed "eclipse" I got messages
>"
>warning:cannot determine -os type
>warning:cannot determine -ws type.
>warning:cannot determine -arch type.
>warning:cannot determine -showsplash type.
>"
>After a while it gives an error(in a gui):
>"Error:Java (VM) had to be shut down:Exit Code=1
>/usr/bin/java
>-cp /opt/eclipse/startup.jar org.eclipse.core.launcher.Main
>-os linux
>-ws gtk
>-arch x86
>-showsplash /opt/eclipse/eclipse_showsplash 600
>"
>
>Cannot make any head or tail of it.
>I also tried to install Netbeans developer using "nbdx2_21.class" file by 
>giving command "java nbdx2_21".What I got was:
>"Exception in thread "main" java.lang.NoClassDefFoundError: nbdx2_21"
>
>Can I get any help?Thanks in advance.
>
>
>  
>





More information about the fedora-list mailing list