Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mulligan

[java] Should be an easy question

This topic is 5888 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!