Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-21-2003, 10:01 AM   #1
Registered: Oct 2003
Location: UK, Manchester
Distribution: Gentoo (2.6.10-r4) & Ubuntu
Posts: 145

Rep: Reputation: 16

I downloaded and installed Java SE SDK 1.4.2 from and installed it, everything was running fine but now I can't seem to be able to run any of my classes. They work fine for me when I run them on computers in my University.

import javabook.*;

class PiTest
public static void main(String args[])
MainWindow myMainWindow = new MainWindow("Testing");;

Compiling works fine but running this simple program gets the error:

Exception in thread "main" java.lang.NoClassDefFoundError: PiTest

I have no idea why this is happening can anyone help me?
Old 11-21-2003, 10:10 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
You may have to set your classpath to include the current directory (, ie CLASSPATH=.:$CLASSPATH). This you can do in your .bashrc or in the /etc/profile or from wherever your system loads its environment variables.

Old 11-21-2003, 11:12 AM   #3
Registered: Nov 2003
Location: CA
Distribution: SuSE 10.2
Posts: 35

Rep: Reputation: 15
remove the predefind /usr/bin/java or in /bin/java

and replace it with j2sdk.../bin/java

creat a symbolic link (you have to be root)

make sure you are in /usr/local/bin

ln -s /usr/local/java/j2sdk..ver/bin/java java

I hope it work. please let me know


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 02:13 AM
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 03:04 AM
Web start java not working (java works fine) powadha Debian 5 06-05-2004 12:57 PM
Updated Java... now java apps dont work zidane2010 Linux - Software 6 05-04-2004 08:02 PM
2 Questions: java calling system commands? PERL vs Java? randomx Programming 28 11-28-2003 08:24 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration