Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Still confused about classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Still confused about classpath" Watch "Still confused about classpath" New topic
Author

Still confused about classpath

Michael Bruesch
Ranch Hand

Joined: Sep 23, 2001
Posts: 158
Alright, I'm using Windows ME, and I've never had a problem with any classpath issue. When I first downloaded the JDK 1.3, I set the classpath so it could find the compiler:
C:\jdk1.3\bin
And that's it.
I didn't add the current directory to the classpath and I've never had any problems compiling files in whatever directory I've saved them. I've just recently started to develop my own packages and just for safety I threw the directory where my packages will be stored in the classpath, and that's the only addition I made. The classpath is to tell DOS where to look for specific programs to run when you give it a command, like javac, correct? That way it looks in jdk1.3\bin and finds the java compiler. Is there anything else I need to know about classpath?
------------------
Michael J Bruesch
Codito, ergo sum...
I code, therefore I am.
My Java Games, I'm quite proud


Michael J Bruesch<br /><i>I code, therefore I am.</i>
Michael Bruesch
Ranch Hand

Joined: Sep 23, 2001
Posts: 158
I even took out the line where my packages were in the classpath and it still worked fine. However I am saving my programs in the same directory where my package hierarchy begins. I tried to move the program to another directory, included the package directory back into the classpath, and it couldn't import the package. I'm trying to find good tutorials online about this, I just need someone to talk to me about it like I'm a third grader.
Michael Bruesch
Ranch Hand

Joined: Sep 23, 2001
Posts: 158
Well I feel like Charlie Brown...Good Grief...I was confusing set path= with set classpath= , I think I got it now. I moved the program to a different directory, set the classpath to find my packages, and it compiled fine. But I still didn't add the current directory into the classpath, it worked OK. Why to you need to add:
set classpath=.;C:\etc...
into your classpath? Still not sure about that one.
------------------
Michael J Bruesch
Codito, ergo sum...
I code, therefore I am.
My Java Games, I'm quite proud
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Still confused about classpath
 
Similar Threads
jdk
Java classpath
compiling problems
Trying to find javax, to compile Tomcat servlet
package