I'm not really sure whether it's textpad or the compiler, but when i try to compile a program with textpad that has the name of another class in it, the compiler can't recognise it. It comes up with this error:
D:\uni\2005 Sem2\cse12ipj\assignment\HabitatModule.java:1: cannot find symbol
symbol: class Module
public class HabitatModule extends Module
^
1 error
Tool completed with exit code 1
I have compiled the other class, if you were wondering, and all of the java and class files are in one folder. I've also tried compiling other files that used to compile fine, and they don't recognise the other class files either. If anyone has any ideas, please tell me.
Textpad doesnt recognise other classes
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
I was using the search command, looking for this very topic. I am having the exact same problem. I am starting an intro-to-java-concepts class, and after much struggle, had TextPad working properly. I wrote my own class, and then a tester program to make sure it worked. It all did, until about a week later, when I tried to do it again.
Both the VendingMachine and the VendingMachineTester are in the same folder, but VendingMachineTester gives the following errors:
I, as well, need help! I have labs to do, and it would be incredibly convenient to be able to do this work at home.
Please, someone help us!
Both the VendingMachine and the VendingMachineTester are in the same folder, but VendingMachineTester gives the following errors:
Code: Select all
C:\Course Files\CSCI\CSCI 160 Fall 2005\TextWork\VendingMachineTester.java:6: cannot find symbol
symbol : class VendingMachine
location: class VendingMachineTester
VendingMachine Unit1 = new VendingMachine(11);
^
C:\Course Files\CSCI\CSCI 160 Fall 2005\TextWork\VendingMachineTester.java:6: cannot find symbol
symbol : class VendingMachine
location: class VendingMachineTester
VendingMachine Unit1 = new VendingMachine(11);
^
2 errors
Tool completed with exit code 1
Please, someone help us!
Got it!
Here is what I did, hope it helps.
Click Start. Right click on My computer. Click properties. Select the 'Advanced' tab, and look for 'Evironment Variables'. Find or create CLASSPATH and set its value to . or, in otherwords, set it to a period.
CLASSPATH = .
I found this reference elsewhere, so it is not to my credit that it was solved, in my case atleast. I really hope it helps ya out!
Good luck.
Here is what I did, hope it helps.
Click Start. Right click on My computer. Click properties. Select the 'Advanced' tab, and look for 'Evironment Variables'. Find or create CLASSPATH and set its value to . or, in otherwords, set it to a period.
CLASSPATH = .
I found this reference elsewhere, so it is not to my credit that it was solved, in my case atleast. I really hope it helps ya out!
Good luck.