How to learn programming in Java... (resource compilation)
by Chris Gatterbauer · 03/19/2001 (7:23 am) · 4 comments
Ante Scriptum (9th march 2002):
Update: a lot of things have changed since i wrote this bit, so i'm editing here and there to reflect the changes :)
http://java.sun.com/j2se/1.4/download-sdk-forte.html
So, here it is, a compilaton of (hopefully) all the resources you need to learn programming at Java. This is intended for newbies (like myself a short while ago).
If you have no clue whatsoever about programming, but think it would be a good idea to learn it, then this document is for you.
I won't enlighten you with my personal tips and tricks that i learned in the half year I've been at it. You'll find out soon enough that you can't just copy others work (but that you can use it to understand new concepts in programming).
First of all: programming isn't all that easy, programming games is harder; but you need to start somewhere, right?
So why the language Java? Very easy: it's all free, and it's easy to learn. If you start with C, you may get overwhelmed; Java - although less powerfull - will protect you from yourself (it cleans up after itself, automazies memory managment, etc...)
So what do you have to do?
Step 1:
Go there: www.sun.com
It's the Sun Webpage, they guys who "made" Java. Like any other business, they are very aware of their trademarks, etc, etc, bla bla bla. However Java is free, and that's where you get the newest version from. They just redid their website (third time in the last 12 months), and it's easier to get what you want now.
Step 2: Now click on "downloads" in the menu to the left
It takes you to the next page, where they show you their top most downloaded stuff. Most of us doesn't interrest us right now. Ignore the text, just click on the link "Java[tm] 2 Platform, Standard Edition (J2SE[tm])".
What's that? That's the err... well the platform. Basically the Software Development Kit (and that's what it was called a while ago). It's the bunch of programs you'll need to do anything. It includes the compiler, and lots of other stuff you'll never know about, or never need to worry about. I didn't :p
The link will take you to a new page - one whichs URL i could have given you from the beginning on. However i think you should know what you're getting, and where you can get it: chances are Sun will change their website again before too much time goes by; and all the links will be broken. That way you'll know what you're looking for, should you ever need to get that stuff again.
Anyway, to the right of the page you're on now (http://java.sun.com/j2se/) is a button, saying "Download J2SETM v1.4 Now!". Click that button.
You'll magically be taken to the download site (makes me wonder why there's no link straight from the homepage to here...), which gives you your choice of OSes & what to download.
We need (well, you need, i got it allready) the SDK & Forte. If you're OS supports the combined download, click the appropriate link. You'll be taken to the usual legal blabber, which you'll read through very carefully (:p), before clicking the accept button at the bottom of the page. You'll then be given your choice of download sites. Pick one and download.
Step 2b:
If your OS doesn't support the combined download of the SDK & Forte, or you just want to download them speratedly for some reason, head on over to www.sun.com again.
Click on "downloads" in the menu again, and now choose the "Forte[tm] for Java[tm], Community Edition 3.0" link.
You can read through the whole stuff on that page if you feel like it (i didn't), or scroll directly down to the table the says "Community Edition". That's what we want. Click the download link.
You'll be taken to a "please register" page, so click on the register button and do your job :) (note: I've never ever received a single piece of spam email (or other email for that matter) from Sun :-), of course i clicked the "noone may contact me" box) Click the Register button, accept the license agreement, and choose your download source, then click the download link.
What is Forte?? It's an IDE, an Integrated Development Environment (or something like that). Of course you could write the code on your notepad (a macho syndrome of programmers widely known as "RMUN"... Real men use Notepad); but Forte offres a lot of options, is well documented, and makes the overall work easier (you don't have to compile programms yourself, you just click F9, and Forte does all the work for you).
You now have a file called "ffj30_ce_(some number).exe" or something like that. That's the forte installer.
Step 3: double-click the SDK & Forte installers, to install the programs. If you picked separate downloads, install the SDK first and then Forte. If you got the bundled installer, just install away. Hint: Don't change the options, just leave all the default settings the way they are. You may want/need to reboot your computer after installing it.
Ok, you've got all the programms you need now.
To start programming in Forte, just double click it's icon (on your desktop or start menu).
Click on the projects menu (on the top menu bar), and start a new project. Everything you programm needs to be in a project when using forte, however that makes sense afterwards: when you want to make a new programm, with lots of new classes, you don't want other classes or old programms to be in the way. For now just start a new project, name it whatever you want, and assign a directory to it (like c:\projects\myfirstproject\).
The upper left icon (blank page with a start at it's corner) is the "new from template" icon. click it, and a window will open.
Select "classes" in the tree structure, and then "empty" in the side window. Click next. It will ask for a classname now, and a "package". Enter any classname, and as package choose the folder of your project. It will now pop up an "explorer" window, where you can surf around your projects; and an editor window, where you will do your actual coding in. When you programmed something, just right click on the editor window, and choose "compile" or "run", and there you go.
For further information on how Forte works, use the help function. So now that we now a little about using Forte (as in "open a blank page to start coding"), let's dig out some resources on java programming.
Step 4:
go to www.bruceeckel.com
That guy wrote the book "Thinking in Java", a fairly good Java programming book for beginners. Click on "books", surf to "thinking in Java 2nd Edition", and download it.
Step 5:
go to www.afu.com/javafaq.html
It's a java FAQ. Leech it (so you'll be able to read it offline...), and browse it a bit. It may answer some questions you have. Also start reading the book you downloaded "thinking in java", as that's your main source. However when it says to compile something with "javac .....", and run it with "java .....", just right click on Fortes editor window, and click "compile and run". much easier with forte :p
Keep reading through the book, and recreate the examples listed (however some won't work as their only fragments of the code needed to run a programm).
That should keep you occupied for a while; hopefully enough time for me to finish my own Java tutorial :D
As said, this is only a guide that tells you where to get the parts; not a Java Tutorial per se.
Good luck & Enjoy!
Update: a lot of things have changed since i wrote this bit, so i'm editing here and there to reflect the changes :)
http://java.sun.com/j2se/1.4/download-sdk-forte.html
So, here it is, a compilaton of (hopefully) all the resources you need to learn programming at Java. This is intended for newbies (like myself a short while ago).
If you have no clue whatsoever about programming, but think it would be a good idea to learn it, then this document is for you.
I won't enlighten you with my personal tips and tricks that i learned in the half year I've been at it. You'll find out soon enough that you can't just copy others work (but that you can use it to understand new concepts in programming).
First of all: programming isn't all that easy, programming games is harder; but you need to start somewhere, right?
So why the language Java? Very easy: it's all free, and it's easy to learn. If you start with C, you may get overwhelmed; Java - although less powerfull - will protect you from yourself (it cleans up after itself, automazies memory managment, etc...)
So what do you have to do?
Step 1:
Go there: www.sun.com
It's the Sun Webpage, they guys who "made" Java. Like any other business, they are very aware of their trademarks, etc, etc, bla bla bla. However Java is free, and that's where you get the newest version from. They just redid their website (third time in the last 12 months), and it's easier to get what you want now.
Step 2: Now click on "downloads" in the menu to the left
It takes you to the next page, where they show you their top most downloaded stuff. Most of us doesn't interrest us right now. Ignore the text, just click on the link "Java[tm] 2 Platform, Standard Edition (J2SE[tm])".
What's that? That's the err... well the platform. Basically the Software Development Kit (and that's what it was called a while ago). It's the bunch of programs you'll need to do anything. It includes the compiler, and lots of other stuff you'll never know about, or never need to worry about. I didn't :p
The link will take you to a new page - one whichs URL i could have given you from the beginning on. However i think you should know what you're getting, and where you can get it: chances are Sun will change their website again before too much time goes by; and all the links will be broken. That way you'll know what you're looking for, should you ever need to get that stuff again.
Anyway, to the right of the page you're on now (http://java.sun.com/j2se/) is a button, saying "Download J2SETM v1.4 Now!". Click that button.
You'll magically be taken to the download site (makes me wonder why there's no link straight from the homepage to here...), which gives you your choice of OSes & what to download.
We need (well, you need, i got it allready) the SDK & Forte. If you're OS supports the combined download, click the appropriate link. You'll be taken to the usual legal blabber, which you'll read through very carefully (:p), before clicking the accept button at the bottom of the page. You'll then be given your choice of download sites. Pick one and download.
Step 2b:
If your OS doesn't support the combined download of the SDK & Forte, or you just want to download them speratedly for some reason, head on over to www.sun.com again.
Click on "downloads" in the menu again, and now choose the "Forte[tm] for Java[tm], Community Edition 3.0" link.
You can read through the whole stuff on that page if you feel like it (i didn't), or scroll directly down to the table the says "Community Edition". That's what we want. Click the download link.
You'll be taken to a "please register" page, so click on the register button and do your job :) (note: I've never ever received a single piece of spam email (or other email for that matter) from Sun :-), of course i clicked the "noone may contact me" box) Click the Register button, accept the license agreement, and choose your download source, then click the download link.
What is Forte?? It's an IDE, an Integrated Development Environment (or something like that). Of course you could write the code on your notepad (a macho syndrome of programmers widely known as "RMUN"... Real men use Notepad); but Forte offres a lot of options, is well documented, and makes the overall work easier (you don't have to compile programms yourself, you just click F9, and Forte does all the work for you).
You now have a file called "ffj30_ce_(some number).exe" or something like that. That's the forte installer.
Step 3: double-click the SDK & Forte installers, to install the programs. If you picked separate downloads, install the SDK first and then Forte. If you got the bundled installer, just install away. Hint: Don't change the options, just leave all the default settings the way they are. You may want/need to reboot your computer after installing it.
Ok, you've got all the programms you need now.
To start programming in Forte, just double click it's icon (on your desktop or start menu).
Click on the projects menu (on the top menu bar), and start a new project. Everything you programm needs to be in a project when using forte, however that makes sense afterwards: when you want to make a new programm, with lots of new classes, you don't want other classes or old programms to be in the way. For now just start a new project, name it whatever you want, and assign a directory to it (like c:\projects\myfirstproject\).
The upper left icon (blank page with a start at it's corner) is the "new from template" icon. click it, and a window will open.
Select "classes" in the tree structure, and then "empty" in the side window. Click next. It will ask for a classname now, and a "package". Enter any classname, and as package choose the folder of your project. It will now pop up an "explorer" window, where you can surf around your projects; and an editor window, where you will do your actual coding in. When you programmed something, just right click on the editor window, and choose "compile" or "run", and there you go.
For further information on how Forte works, use the help function. So now that we now a little about using Forte (as in "open a blank page to start coding"), let's dig out some resources on java programming.
Step 4:
go to www.bruceeckel.com
That guy wrote the book "Thinking in Java", a fairly good Java programming book for beginners. Click on "books", surf to "thinking in Java 2nd Edition", and download it.
Step 5:
go to www.afu.com/javafaq.html
It's a java FAQ. Leech it (so you'll be able to read it offline...), and browse it a bit. It may answer some questions you have. Also start reading the book you downloaded "thinking in java", as that's your main source. However when it says to compile something with "javac .....", and run it with "java .....", just right click on Fortes editor window, and click "compile and run". much easier with forte :p
Keep reading through the book, and recreate the examples listed (however some won't work as their only fragments of the code needed to run a programm).
That should keep you occupied for a while; hopefully enough time for me to finish my own Java tutorial :D
As said, this is only a guide that tells you where to get the parts; not a Java Tutorial per se.
Good luck & Enjoy!
#2
Jeff
03/19/2001 (8:19 pm)
Nice. Thanks for compiling this list. My son is learning to program. This will be a great help. BTW, I took the liberty of editing your file and changing sum.com to sun.com.Jeff
#4
Check it out at
http://www.galileocomputing.de/openbook/javainsel6/
It's a good intoduction to java... But it's not about game-development ...
07/11/2007 (7:07 am)
There is a pretty good "open book" in german ...Check it out at
http://www.galileocomputing.de/openbook/javainsel6/
It's a good intoduction to java... But it's not about game-development ...

Chris Gatterbauer
P.S.: Thanks for correcing it Jeff :-D