?
Solved

jdk in linux

Posted on 2001-06-27
6
Medium Priority
?
205 Views
Last Modified: 2013-11-23
i installed jdk in linux.i set the classpath also in the bashrc file,while i am compiling my program it is compiling good,but when i run my program it is showing that
Exception in thread "main" java.lang.NoClassDefFoundError:classname

my jdk version is 1.3.1
linux version is 7.0

any suggestions are welcome
0
Comment
Question by:nagaraj2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 1

Accepted Solution

by:
fauzdar earned 400 total points
ID: 6233977
you also need to define the working directory where the generated class files will be located. eg export CLASSPATH=/home/yourdir/javadir/xyz.class

Exception NoClassDefFoundError means it is unable to locate the class file that you are trying to run. for that you have to define the working directory also in that CLASSPATH
0
 
LVL 2

Expert Comment

by:k_suchdeva
ID: 6234323
U should add current directory to ur classpath.
U can do this by
export CLASSPATH=$CLASSPATH:.
0
 
LVL 1

Expert Comment

by:sumeetsh
ID: 6264153
hi
Did u log off after setting the classpath.
Its effective only if login again or run .profile file.
Regatds
Sumeet

0
 

Expert Comment

by:CleanupPing
ID: 9062019
nagaraj2k:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 9253885
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to fauzdar]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question