Results 1 to 5 of 5
hey..so i downloaded jdk 1.5 on my kubuntu..now i compile and run java apps normally on this OS simulator called OSP2..anyway its manual says that i have to set a ...
- 12-08-2007 #1Just Joined!
- Join Date
- Oct 2007
- Posts
- 60
compiling and running java applications
hey..so i downloaded jdk 1.5 on my kubuntu..now i compile and run java apps normally on this OS simulator called OSP2..anyway its manual says that i have to set a PATH variable for bash by placing the following in the .bashrc file in the home directory:
PATH=/usr/local/bin/jdk:$PATHexport PATH
anyway, i tried appending that line of code to the end of that file, and when i tried doing this on the terminal:
it gave me this list of errorsCode:java -cp .:Demo.jar osp.OSP
so im guessing that the problem is with jdk not being recognized by the OS..any ideas?..and if u dont know about osp2, any ideas on how i can introduce jdk1.5 to kubuntu and compile and run java apps normally?...any help would be appreciated..Code:Initializing GUI, please wait ... Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(libgcj.so.70) at java.awt.Window.<init>(libgcj.so.70) at java.awt.Frame.<init>(libgcj.so.70) at javax.swing.JFrame.<init>(libgcj.so.70) at osp.l.g.int(Unknown Source) at osp.l.g.for(Unknown Source) at osp.l.g.a(Unknown Source) at osp.l.g.<init>(Unknown Source) at osp.e.c.goto(Unknown Source) at osp.OSP.main(Unknown Source) Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory at java.lang.Runtime._load(libgcj.so.70) at java.lang.Runtime.loadLibrary(libgcj.so.70) at java.lang.System.loadLibrary(libgcj.so.70) at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.so.70) at java.lang.Class.initializeClass(libgcj.so.70) at java.lang.Class.forName(libgcj.so.70) at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70) ...10 more
- 12-09-2007 #2
Here is a guide to installing Java on Ubuntu (from the Ubuntu wiki):
https://help.ubuntu.com/community/Java
You want to install the Sun JDK.
The error you are getting involves the use of some nonstandard library with Java, and can probably be solved somehow by modifying the CLASSPATH. However, I suggest installing Java natively (and not through a simulator) before trying anything else.DISTRO=Arch
Registered Linux User #388732
- 12-09-2007 #3Just Joined!
- Join Date
- Oct 2007
- Posts
- 60
what do u mean natively?...i downloaded the jdk1.5 and installed it on the desktop..it was a bin file and i unpacked it using the normal ./jdk.bin...is that what u mean by natively?..and another thing..i read something about modifying the PATH variable..how can we do that exactly?
- 12-09-2007 #4Just Joined!
- Join Date
- Oct 2007
- Posts
- 60
never mind..it worked..i figured out how to modify the PATH variable in .bashrc..thanks
- 12-09-2007 #5Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
By putting the "export PATH" on a separate line?


Reply With Quote