Classes

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Randall

Classes

Post 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
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Re: Classes

Post 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?
lacef
Posts: 2
Joined: Fri Apr 30, 2004 11:16 am

Post 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
User avatar
Lazarus
Posts: 3
Joined: Sun May 16, 2004 8:09 pm
Location: Toronto, Canada

same problem but now it works

Post 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
For gods sake dont give it to the monkey
Post Reply