Sign in to follow this  

[java] newb java programmer. just want to get something to work

This topic is 4705 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 got this book called "Developing Games In Java" by david brackeen. i started going through and write off the bat im screwed because it says it uses apache ant with Jedit. Ive always used jcreator and i have no idea how to use these. If anyone uses these or has the book can ya help me out a little? If you have the book i tried doingthe full screnn test example and it said cant resolve symbol class variable displayMode. Whats up with that? Thanks

Share this post


Link to post
Share on other sites
If you are new to Java, I stronly suggest to pick up a starting Java book. Brackeen's book is very good, but you need some Java basics. And you don't *have* to use Ant. I did everything without Ant.

Java 2 in 21 days was pretty good, although a bit outdated now. Check out GameDev's book pages or high rated books at Amazon.com.

And for your other problem, are all the imports right? Can you post like 5 lines around the code that generates the error?

Just make sure you know all the basics of Java and Object Orientated Programming,
Wesley

Share this post


Link to post
Share on other sites
also learn how to compile and run your java codes without using IDE's (JCreator, Eclipse, JBuilder, etc). it's just a simple coding using any text editor (notepad - simply the best), save to "j2sdk1_4_2/bin" (java folder then bin), run DOS command, change directory to that of the "javafolder/bin", enter these general commands

To compile...

javac <MyJavaFileName>.java

e.g. To compile MyClass.java, just type

javac MyClass.java

If compiling is successful (you'll know if it didn't, you'll see error flags), it would create the necessary .class files. Enter these commands to run it (assuming that class has the main( String args[] ) method...

java <MyJavaFileName>

e.g. To run MyClass.class

java MyClass

Share this post


Link to post
Share on other sites
I have been going through that book myself. I am not new to java though. I've had class in high school and i've done a good deal of work on my own. I have been using jcreator for all the files/projects in that book and everything has worked fine for me so far. I'm on chapter 3 right now. If you want you could post you code on the forum and I might be able to look at it. I'm sure its just something minor. Well good luck going through that book. I think that its a good book so far.

Share this post


Link to post
Share on other sites
ok i finally got it to work. It was the FullScreenTest withe the "Hello World!" dialogue on the blue background. The only problem is... I didn't even understand what i was doing. I was just typing the code from the book lmao! I think i'll put this book away for a while and pick up a "newb java book". Any suggestions?

Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by blue_o6
it says it uses apache ant with Jedit. Ive always used jcreator

Apache Ant (http://ant.apache.org/) is just a tool similar to make for building your project (although it can be used for a lot more). It can be run stand alone from the command line, but a lot of IDEs integrate it to make your life easier. The IDE you use (JEdit/JCreator/whatever) doesn't affect this too much.

Quote:
it said cant resolve symbol class variable displayMode.

Sounds like the classpath isn't set correctly for something when you're compiling. Check the Sun Java tuts that someone else posted for help on that.

Share this post


Link to post
Share on other sites

This topic is 4705 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this