LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2012, 07:00 AM   #1
michelle hiong
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Rep: Reputation: Disabled
ClassNotFoundException


Hi,
I am running files reading java class but encountered error:
java.lang.ClassNotFoundException

Is there a way to overcome this error? I am new to using java in linux.

Thanks for any help in advance.

Regards
Michelle
 
Old 04-25-2012, 07:14 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,644

Rep: Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501
sure, there is a way, but we need more info. At least the full error message, but would be better to explain something about your source files also.
 
Old 04-25-2012, 10:29 PM   #3
michelle hiong
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
ClassNotFoundException

Hi

I am attaching file with error message so it makes clearer what the problem is. Also info on java jdk that I have installed on linux. Hope to get more detail info on how to overcome this problem.

Thanks
Attached Thumbnails
Click image for larger version

Name:	error.jpg
Views:	9
Size:	123.9 KB
ID:	9542   Click image for larger version

Name:	Screenshot at 2012-04-25 00_34_17.jpg
Views:	5
Size:	67.1 KB
ID:	9543  
 
Old 04-26-2012, 01:50 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Obviously no JAVA_PATH or CLASS_PATH are present in your environment.

Try manually setting them.
 
Old 04-26-2012, 08:46 PM   #5
michelle hiong
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Tried setting Classpath & Java-Home as below, the same errors still appear. Hope can get some help on overcoming it. Thanks.

export CLASSPATH=/home/tools/opennlp/maxent/
export JAVA_HOMe=/usr/bin/java
 
Old 04-28-2012, 11:48 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,644

Rep: Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501
if you have got the same error your CLASSPATH is still not set correctly. You would better read some documents on it (how to set up a java environment) . Maybe you need to download/install some packages also. Unfortunately the information you gave is not sufficient to solve it from here.
 
  


Reply


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
ClassNotFoundException using Jar file maheshebhole Solaris / OpenSolaris 1 04-12-2010 05:36 PM
java.lang.ClassNotfoundException Lakshika Linux - Newbie 2 03-31-2006 06:44 AM


All times are GMT -5. The time now is 08:24 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration