|
-
January 16th, 2003, 12:50 PM
#1
Need your help!
Hi
I have set the path for my jdk. But, i still have to put all my JAVA programs in the subfolder "BIN" for them to compile and execute correctly. If I run a JAVA program which is not stored in the subfolder "BIN", it does not work.
Can anyone help me?
Thanks in advance!
-
January 16th, 2003, 01:26 PM
#2
What OS(including version) are you using, where did you set the path, what is the line that you used to set the path?
-
January 16th, 2003, 06:48 PM
#3
What is the error message you get when 'it does not work'?
The usual cause of directory related problems trying to run Java applications is an incorrect classpath setting. The classpath must be set to include all the directories that contain classes used by the application, and all jar files used - this includes the current directory.
Here's to the happiest days of my life,
Spent in the arms of another man's wife -
My mother...
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
January 18th, 2003, 02:33 AM
#4
I am using Windows XP. I made use of environmental variables PATH and CLASSPATH.
Both my PATH and CLASSPATH variables contain: c:\jdk1.4;c:\jdk1.4\bin
-
January 18th, 2003, 03:11 AM
#5
If i got put my java programs in the subfolder BIN, i got this error
noclassdeffoundexception
-
January 18th, 2003, 07:00 AM
#6
Previously you said it didn't work unless the class files were in the bin directory, now you say you get NoClassDefFoundException if they're in the bin directory (that is what you said isn't it?)...
Whatever, a NoClassDefFoundException means you have not included the specified class on the classpath.
<sigh> I can only repeat what I said before:
The classpath must be set to include all the directories that contain classes used by the application, and all jar files used - this includes the current directory.
In case it isn't clear, this includes the application's class directory too.
It is not a good idea to put your Java classes in the JDK bin directory (or any other JDK directory).
Under a spreading gooseberry bush the village burglar lies,
The burglar is a hairy man with whiskers round his eyes
And the muscles of his brawny arms keep off the little flies...
Last edited by dlorde; January 18th, 2003 at 07:03 AM.
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|