The first big hurdle we encountered was in installing the language - almost a show-stopper. We decided to install the Java Development Kit (JDK) and the Netbeans Integrated Development Environment (IDE) at the same time, and downloaded the <JDK 6 Update 23 with NetBeans 6.9.1> package from <oracle.com>.
We started up the installer and then sloped away for a coffee. When we got back, there was a shiny new "Netbeans" icon on our desktop. After a precautionary reboot, we clicked on Netbeans and received a couple of error messages: "The JDK is missing" and "Cannot locate java installation in specified jdkhome : C:\Program Files\Java\jdk1.6.0_23. Do you want to try to use the default version?" We then wasted an hour or two tinkering with environment variables and the Netbeans configuration file ("netbeans.conf") before realizing that the first error message meant exactly what it said - the JDK was missing: it hadn't installed at all.
So, we ran the installer again, and this time the JDK installed.
WTF?! The first of many Half-Assed Excellence awards for Sun/Oracle.
We then followed the instruction in step 4 on the oracle.com page linked <here> to set our PATH environment variable. This is so you can compile a program by typing "javac Sucio.java" in a DOS box, rather than having to type "C:\Program Files\Java\jdk1.6.0_23\bin\javac Sucio.java" - which would get old very fast (unless you're Mavis Beacon).
We started up the installer and then sloped away for a coffee. When we got back, there was a shiny new "Netbeans" icon on our desktop. After a precautionary reboot, we clicked on Netbeans and received a couple of error messages: "The JDK is missing" and "Cannot locate java installation in specified jdkhome : C:\Program Files\Java\jdk1.6.0_23. Do you want to try to use the default version?" We then wasted an hour or two tinkering with environment variables and the Netbeans configuration file ("netbeans.conf") before realizing that the first error message meant exactly what it said - the JDK was missing: it hadn't installed at all.
So, we ran the installer again, and this time the JDK installed.
WTF?! The first of many Half-Assed Excellence awards for Sun/Oracle.
We then followed the instruction in step 4 on the oracle.com page linked <here> to set our PATH environment variable. This is so you can compile a program by typing "javac Sucio.java" in a DOS box, rather than having to type "C:\Program Files\Java\jdk1.6.0_23\bin\javac Sucio.java" - which would get old very fast (unless you're Mavis Beacon).
Having gone to the trouble of downloading and installing Netbeans, we decided not to use it just yet. IDEs are a great tool for experienced programmers to crank out code quickly, but they can get in the way of learning about a language. (And we're too lazy to RTFM.)
So, for now, we're going to edit our code using Programmer's Notepad - a nice little editor that knows about Java syntax (and a lot of others) - which can be downloaded free <here>.
Next time, we'll run through compiling a traditional "Hello World" program:
class HelloWorldApp { public static void main(String[] args) { System.out.println("Viva Sucio!"); } }
(The code sample above was posted using google-code-prettify following the instructions posted <here>.)
Java is a giant pain in the ass sometimes.
ReplyDeleteokay, whers step 1?
ReplyDeleteso confus... where is step one? >:3
ReplyDeleteI'm with the others.
ReplyDeleteHello!
ReplyDeletethanks so much for your comment :)!
i love the name....baby steps hahaha so cute :))
Wish you a great time :)
with love
Mariza
http://mar-iza.blogspot.com
that certificate is priceless
ReplyDeleteI haven't got a clue what's going on. This does not mean I'm fick!
ReplyDeleteGreat info here.
ReplyDeletei need more computer science skill
ReplyDeletegreat post
ReplyDelete"Step one" was yesterday, which indicated that installation might be a bitch. You must consult the oracle for the PATH.
ReplyDeleteWait, am I learning the absolute basics of Java or entering the Matrix?
I understood about every third word...heehee. But hey, I might know someone who would totally understand this stuff and be right into it. I'll be sure to pass it along!
ReplyDeleteI think the dentist numbed more than my gums today... I am lost.
ReplyDeleteI've been wanting to learn Java for a while now, I'll get started right after I eat this can of tuna.
ReplyDeletehuh? been some time since ive played with java.
ReplyDeleteI'm psyching myself up to 'Hello World.' Last time I did this, I was working on Q-Basic. Yeah, I'm old.
ReplyDeleteembedding youtube clips is about as high tech as I (and apparently others in this comment section) get sir!
ReplyDeleteOh Sucio, can I handle this or do I need to just sit back and watch you Men create? Oi Vey!!
ReplyDeleteI've missed a few days of your wonderful posts, so forgive me. I'll be caught up soon :)
ReplyDeletecool post - IDE's just make you lazy, so respect for learning it the notepad way
ReplyDelete@ G - I'll switch to Netbeans or Eclipse once I'm more comfortable with the language. I assume they include some kind of object browsers - which I'm feeling the need for.
ReplyDeleteOne of the problems I'm having going the Notepad route is that it's hard to find stuff buried under mountains of worthless, machine-generated javadocs "documentation".
Feels like being a Unix noob and having to scan through 50 pages of bullshit "man" docs to find out out to search for "string1 or string2".
thursdays post must be big
ReplyDeleteCool! I took a beginner Java class last year, but I'm sure I have much to learn. Following and supporting you, daily!
ReplyDelete