LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

Rep: Reputation: 16
Java


I downloaded and installed Java SE SDK 1.4.2 from sun.java.com 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");
myMainWindow.show(true);
}
}

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
hw-tph
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.

Håkan
 
Old 11-21-2003, 11:12 AM   #3
pr0gm3r
Member
 
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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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