Hi, I'm trying to get the first small program (party) in "Head first java" to work in the javac compiler. This is my first experiance with programming and would be grateful of any help!
This is my settings for user variables
PATH=%CommonProgramFiles%\Microsoft Shared\Windows Live (I've not altered this)
This is my settings for system variables
CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip (I've not altered this)
PATH=C:\Program Files\Java\jdk1.6.0_21\bin;%CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\QuickTime\QTSystem\ (This one I added the first bit upto %commonprogramfiles)
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_21 (this one I added the complete line, after reading it somewhere on the forum)
My source code is in C:\Program Files\Java\jdk1.6.0_21\bin (not correct I know but i've many options) which is the same folder as javac.
The file name is party2.java
This is the error code I get
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)
Thanks for the replies, I should of spotted the dot missing. Sadly that wasn't my biggest mistake. The code was incomplete, it wasn't a tutorial just an overview
Sorry about that.
W. Joe Smith
Joined: Feb 10, 2009
No worries! On ething to note about HFJ is not all the code examples will complie; some are just set up to demonstrate a concept. A good way to practice, though, is to write that code yourself then figure out how to make it a runnable program.