|
-
Sep 17th, 2002, 01:55 PM
#1
Thread Starter
Lively Member
java error
I am having problems
I am calling a new instance of a class
Payroll employee = new Payroll();
and the classes are in the same directory and everything. I have compiled the Payroll class and it compiles right but then i try to call Exercise which is where the instance Payroll() is and it gives me an error:
cannot resolve symbol.
I have tried putting an import statement in ie. import Payroll.*;
and there is a package Folder statement at the beginning but i can't get it to work.
Whats up?
-
Sep 17th, 2002, 02:17 PM
#2
Thread Starter
Lively Member
It's odd because from with in Forte I do not get this problem...
but when i invoke the javac Employee3.java i get the error.
-
Sep 17th, 2002, 03:06 PM
#3
Hyperactive Member
can you post the exact error you are getting from the compiler?
-
Sep 17th, 2002, 03:30 PM
#4
Thread Starter
Lively Member
How do i print the errors to file from the DOS command line?
I don't think you can?
javac doesn't allow you to. Which sucks if i can say so.
it says.
CountFlips.java:10: cannot resolve symbol
symbol : class Coin
location : class practice.CountFlips
Payroll employee = new Payroll();
^
-
Sep 17th, 2002, 03:50 PM
#5
Hyperactive Member
If you're binding it to a package then you'll need to put the class in a seperate directory with the package name. Other things to check would be that the spelling is correct, although if you can run it in Forte then it should be correct. What JDK are you using. I don't think anyone can really help without seeing some code/more of the error. What you can also do is press print screen and save the image of the dos box and upload it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|