[java] Should be an easy question
I have three source files:
Account.java
CenteredFrame.java
AccountApplication.java
The first two compile without a problem, but when compiling the AccountApplication.java file, I get:
AccountApplication.java:59: cannot resolve symbol
symbol: class Account
Account account = new Account(a,r);
And the same kind of error for the CenteredFrame.java class. All the files are directly in the /src directory of the Java SDK. The reason I can''t figure out whats wrong is because in Account.java I have:
public class Account
{
private int amount;
private float rate;
public Account( int a, float r )
{
amount = a;
rate = r;
}
public double getBalance( int time )
{
return amount * Math.pow( 1 + ( rate / 100 ), time );
}
}
Which seems to me should have worked. What could be wrong?
make sure that your classpath is set correctly, meaning the current directory is included, "." that is
depending on the other java-files, you might need to compile them simultaneously in case they depend on each other
good luck!
_______________________
http://mill.3dfxsweden.net
depending on the other java-files, you might need to compile them simultaneously in case they depend on each other
good luck!
_______________________
http://mill.3dfxsweden.net
Tried it.....going more crazy. Would someone mind if I emailed the three files to you to see if they work on your machines? I'd be a huge help. Thanks.
Relpy to this post or just email me at: danman70@hotmail.com
[edited by - Mulligan on August 29, 2002 4:39:45 PM]
Relpy to this post or just email me at: danman70@hotmail.com
[edited by - Mulligan on August 29, 2002 4:39:45 PM]
Hey Mulligan, is that your surname?
My surname is Mulligan, where are you from?
dMDI
"I don''''t know with what weapons the third world war will be fought, but I know the fourth will be fought with sticks and stones." Einstein
My surname is Mulligan, where are you from?
dMDI
"I don''''t know with what weapons the third world war will be fought, but I know the fourth will be fought with sticks and stones." Einstein
It''s just an online alias kind of. I''m from Virginia, US. Want to try and get the code to work?
OK. Email them to me at me@dmulligan.fsnet.co.uk, but it may be tomorrow evening (UK Time) before I am able to fix them.
dMDI
"I don''''t know with what weapons the third world war will be fought, but I know the fourth will be fought with sticks and stones." Einstein
dMDI
"I don''''t know with what weapons the third world war will be fought, but I know the fourth will be fought with sticks and stones." Einstein
compiled and ran fine. no problems.... it''s strange that you''ve problems.
The only thing i don''t understand is:
"All the files are directly in the /src directory of the Java SDK"
=> why did you put them there ?
(I''ve put all 3 in an independant folder and it compiled correctly.)
The only thing i don''t understand is:
"All the files are directly in the /src directory of the Java SDK"
=> why did you put them there ?
(I''ve put all 3 in an independant folder and it compiled correctly.)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement