java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
Hi, I just started using Ubuntu 6.06 LTS. When I try to execute a java program using the java ProgramName command, I get this error
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit at java.awt.Toolkit.getDefaultToolkit(libgcj.so.7) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(libgcj.so.7) at java.awt.Window.<init>(libgcj.so.7) at java.awt.Frame.<init>(libgcj.so.7) at javax.swing.JFrame.<init>(libgcj.so.7) at Driver.<init>(Driver.java:6) at Caterpillar.main(Caterpillar.java:24) Caused by: java.lang.ClassNotFoundException: gnu.java.awt.peer.gtk.GtkToolkit at java.lang.Class.forName(libgcj.so.7) at java.lang.Class.forName(libgcj.so.7) at java.awt.Toolkit.getDefaultToolkit(libgcj.so.7) ...6 more but it works when i type in the entire path (/opt/jdk1.5.0_06/bin/java) Compiling works without the entire path, so I think I added it to the PATH correctly... me@mine:~$ export PATH="$PATH:/opt/jdk1.5.0_06/bin/" me@mine:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/opt/jdk1.5.0_06/bin/ but then when I open a new terminal and do echo $PATH again, the last one isn't there. What am I doing wrong/haven't I done? Thanks a lot |
change
export PATH="$PATH:/opt/jdk1.5.0_06/bin/" by export PATH="/opt/jdk1.5.0_06/bin/:$PATH" |
Thanks, that got rid of the error. But every time I open a new terminal I have to redo that command. Is there any way to make it permanent?
|
Could anybody help me with this?
|
put the line
Code:
export PATH="/opt/jdk1.5.0_06/bin/:$PATH" |
All times are GMT -5. The time now is 04:09 PM. |