Jump to content
  • Advertisement
Sign in to follow this  
arch_angel07

[java] new to java, having some trouble

This topic is 4390 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

well iv recently been trying to get into java, I am using this tut http://www.gamedev.net/reference/articles/article1360.asp, i have done the first one with good success after i posted here for some help. with the second tutorial on this though when i try to compile the samplethread that he talks about and give the code i get the error. C:\Program Files\Java\jdk1.5.0_07\bin>javac SampleThread.java SampleThread.java:25: cannot find symbol symbol : class Graphics location: class SampleThread public void paint(Graphics g) ^ 1 error i get no .class file when i do this. does anyone know what might be wrong?

Share this post


Link to post
Share on other sites
Advertisement
yah the jdk i downloaded had a version of netbeans with it. i tried it but didnt really like it. unless theres somthing better about it for when there are more advanced codes. thanks for the help ill check out some of the tuts of the java site

Share this post


Link to post
Share on other sites
Quote:
Original post by arch_angel07
yah the jdk i downloaded had a version of netbeans with it. i tried it but didnt really like it. unless theres somthing better about it for when there are more advanced codes. thanks for the help ill check out some of the tuts of the java site



The compile errors you posted above are from missing import statements. Since you are not using any class path switches in your command line (I'm assuming you have no external libraries).

I've used Eclipse for a while as an IDE (http://www.eclipse.org/downloads/) But it really doesn't matter what your IDE is. pick one, learn to use it, and save lots of time (and effort). You can pick up the details as you go along. Lastly, I agree with macdrunken, work through the tutorials out there before you give up on java.

Share this post


Link to post
Share on other sites
Hi,

I can't seem to stress this enough for people just starting out with Java JCreator is a very easy to use editor and adapts well to larger projects. It's much more lightweight than NetBeans so if you're looking for a bit more than just the plain text editor its perfect for you. You can always use these editors hand-in-hand and should be able to navigate through each fairly easily so I would try each and see which one works for which projects. I would say most often I use JCreator as most of my projects don't require such advanced features as those editor provide. Usually I just want to open a .java file quickly compile and run it without leaving the editor. Also Javadocs are your friend get farmiliar with looking up things when you can't remember a function name or a class package that needs to be imported.

Hope this helps, good luck, and hope to see you around this forum more in the future!

And I concur with the previous two posters as to the reason for the compile error. Most errors with cannot find symbol have to do with import statements.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!