Page 1 of 1

Classes

Posted: Thu Feb 27, 2003 4:24 am
by Randall
When I make 3 different java files (2 classes and 1 driver program) and textpad wont really recognize classes outside the file. Like when I make Assignment4.java, Student.java, and StudentParser.java

Assignment4 is a main program and uses Student and StudentParser classes. When I compile Assignment4, it says it wont recognize Student class. how can I make textpad read different classes outside the file?

Thanks
Randall

Re: Classes

Posted: Mon Mar 03, 2003 9:16 am
by jeffy
Randall wrote:how can I make textpad read different classes outside the file?
Try adding "." to your classpath, which makes Windows--and therefore TextPad--recognize classes that exist in the "present working directory".

Does that work for you?

Posted: Fri Apr 30, 2004 12:57 pm
by lacef
im having the same problem with Textpad ,, textpad cannot find the other classes,,,,,, i have also tried to compile wiith javac n set the classpath but noothing works....

plz help

same problem but now it works

Posted: Mon May 17, 2004 6:16 am
by Lazarus
I was trying to test if a class I wrote would work by using another program with a main() statement, I was trying to call it but it couldnt find it. both of these files were saved in the same directory and my created class did compile. What gives? My classpath was messed up. lets say I'm compiling in D:\J2SDK1.4.2_04\BIN
my classpath should read:
classpath="D:\J2SDK1.4.2_04\BIN;." with the period after the semicolon, but when I changed it to see the actual directory my class was created in:
classpath="D:\J2SDK1.4.2_04\;." it worked and compiled
This way all folders in D:\J2SDK1.4.2_04\ are visible and compile.
Remember these classpath settings are settings ment for your OS not textpad. good luck