I have a
java program called Balance.java which I have saved in H:\myPack.
I compiled and kept my Balance.class file in H:\myPack.
now I have another program (TestBalance.java saved in H:\> )which is using Balance.java program
while compileing I am geting the following error
H:\>javac TestBalance.java
TestBalance.java:1: package myPack does not exist
import myPack.*;
^
TestBalance.java:6: cannot resolve symbol
symbol : class Balance
location: class TestBalance
Balance
test = new Balance("Johnosn", 1000.0);
^
TestBalance.java:6: cannot resolve symbol
symbol : class Balance
location: class TestBalance
Balance test = new Balance("Johnosn", 1000.0);
^
3 errors
----------------------------------
but I can able to run the code if I include the Balance class inside the TestBalance.java file.
like
I doubt some how my code is not able to locate the package, is this may be due to some 'CLASSPATH' setting? not able to find out!
Thanks in advance
Regards
Johnson