Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CLASSPATH

Status
Not open for further replies.

billybugmaster

Instructor
Apr 13, 2000
2
US
OK Java newby here.<br><br>I am Running WinNT and my classpath appears to be set correctly to D:\Data\JavaDev (Where I keep the .Java files)<br><br>I open the dos prompt and type set.<br>I can see CLASSPATH=D:\Data\JavaDev<br><br>I type javac myclass.java and get the can't read file error.<br>I type javac D:\Data\JavaDev\myclass.java and the class is compiled.<br><br>This is obviously something stupid ( other than me )<br>Thanks in advance<br>
 
when you use javac are you in the same directory as you .java files? if you are not then there is you problem.<br>From my understanding, the classpath variable is used to tell the java compiler where packages are located.<br><br> <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br>
 
try this:<br><br>setenv CLASSPATH<br><br>at a prompt. Then try running again. <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
I think fenris is probably correct. I have simply misunderstood the java documentation.<br><br>I tried imotic's suggestion but I dont think setenv is valid in NT as my machine says the name is not recognised as a command.<br><br>Thanks for you help
 
yep- fenris is right. If you're not in the same directory as your class, it needs to know where to look :eek:) <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top