PDA

View Full Version : Command line troubles (VISTA)


Noobathon
07-16-2008, 12:38 AM
Hey all,

I usually code and compile using a shell like textpad or netbeans, but have recently been trying to feed the command line some simple commands.

Unfortunately it responds to my javac commands by saying:

C:\Java\MP1>javac BgArray.java
'javac' is not recognized as an internal or external command,
operable program or batch file.

Does anyone know how to solve this? The editor-programs have no problem compiling and running java

thanks!!

brad211987
07-16-2008, 01:11 AM
The javac program is most likely not in your windows path. Check the path environment variable and make sure the bin directory of your JDK installation is listed.

Noobathon
07-19-2008, 07:09 PM
i cant seem to figure out how to set the environment variables in vista. according to a tutorial im doing, im supposed to get access them through the control panel, but cant seem to figure out how

if anyone could point me in the right direction, that d be great!

ess
07-28-2008, 05:29 PM
Please follow these steps...

1- Right Click on My Computer on your desktop and click on Properties
2- Computer Properties Window will open....Click on Advanced System Settings
3- Click ok when the stupid administrator window appears (Personally I have disabled them...as I find them annoying and pointless)
4- Click on Environment Variables
5- Under the Systems Variables, click the NEW button to create a new Variable
6- Enter the following inside the dialog
Variable Name: JAVA_HOME
Variable Value: FOLDER_CONTAINING_JAVA_INSTALLATION for example C:\Program Files\Java\jdk1.6.0_02
7- Inside the Systems Variables, locate the Path entry. Select it...then click on the edit button
8- At the end of the PATH, enter a semi column if there is NOT one there already
9- At the end of the PATH variable, enter %JAVA_HOME%\bin;

Click on Apply and ok buttons to close all opened dialogs

Start a new (if you have one opened already...it won't work) prompt or MS Dos command prompt and type the following

java -version

You should see details of the installed version of Java etc. once you hit the RETURN key

Within the command prompt, type the following

notepad Hello.java

Paste the following inside it

public class Hello {
public static void main(String [] args) {
System.out.println("Hello World ;)");
}
}

save the file and exit notepad

at the command prompt type the following

javac Hello.java

If no errors are generated, type the following

java Hello

Cheers
~E

sorbetti
08-21-2008, 12:28 PM
I've been having a same problem as Noobathon for quite a long time now. I've taken the exact steps described in ess's reply, but it doesn't fix the problem - I'm still getting the "javac is not recognized as an internal or external command" message when trying to compile files with javac. I've also tried restarting the computer after setting the environment variables. Javac works perfectly in Windows XP, the problem appears only with Vista.

I would be grateful if somebody would be able to help.

sorbetti
08-29-2008, 08:15 PM
Anybody?

brad211987
08-29-2008, 08:22 PM
Go to the command line, type "set" as the command, and print the output here so we can see the environment variables that are set up on your system.

You will also need to ensure that you have installed a JDK, not just the JRE.

sorbetti
09-03-2008, 06:53 AM
'Set' gives the following output. It seems quite similar to my Win XP machine, in which everything works just fine.

C:\Users\Sami>set

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Sami\AppData\Roaming
CLASSPATH=C:\Program Files\Java\jdk1.6.0_07\bin
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SAMI-PC
ComSpec=C:\Windows\system32\cmd.exe
configsetroot=C:\Windows\ConfigSetRoot
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Sami
LOCALAPPDATA=C:\Users\Sami\AppData\Local
LOGONSERVER=\\SAMI-PC
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Program Files\Java\jdk1.6.0_07\bin; C:\Program Files\Microsoft SQL S
erver\90\Tools\binn\; C:\Program Files\MATLAB\R2008a\bin; C:\Program Files\MATLAB\R2008a\bin\win32; C:\Program Files\SSH Communicatio
ns Security\SSH Tectia\SSH Tectia AUX; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia AUX/Support binaries; C:\Prog
ram Files\SSH Communications Security\SSH Tectia\SSH Tectia Broker; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia
Client; ;C:\Program Files\jprofiler5\bin\windows; C:\Program Files\Java\jdk1.6.0_07\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\Sami\AppData\Local\Temp
TMP=C:\Users\Sami\AppData\Local\Temp
USERDOMAIN=Sami-PC
USERNAME=Sami
USERPROFILE=C:\Users\Sami
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
windir=C:\Windows

ess
09-03-2008, 03:42 PM
On the third line, you have

CLASSPATH=C:\Program Files\Java\jdk1.6.0_07\bin

That is not correct, please change it to

CLASS_PATH=.;

Yes, a dot and a semicolon

The PATH variable is fine, though, I would add a semicolon at the end....but should work as is.

Let's know if that worked for you.

Cheers
~E

sorbetti
09-03-2008, 08:27 PM
Still not working. I also added that extra semicolon in the end, but as assumed, didn't help... Damn Vista. Here's the current set output:

C:\Users>set

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Sami\AppData\Roaming
CLASS_PATH=.;
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SAMI-PC
ComSpec=C:\Windows\system32\cmd.exe
configsetroot=C:\Windows\ConfigSetRoot
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Sami
LOCALAPPDATA=C:\Users\Sami\AppData\Local
LOGONSERVER=\\SAMI-PC
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Program Files\Java\jdk1.6.0_07\bin; C:\Program Files\Microsoft SQL S
erver\90\Tools\binn\; C:\Program Files\MATLAB\R2008a\bin; C:\Program Files\MATLAB\R2008a\bin\win32; C:\Program Files\SSH Communicatio
ns Security\SSH Tectia\SSH Tectia AUX; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia AUX\Support binaries; C:\Prog
ram Files\SSH Communications Security\SSH Tectia\SSH Tectia Broker; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia
Client; ;C:\Program Files\jprofiler5\bin\windows; C:\Program Files\Java\jdk1.6.0_07\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\Sami\AppData\Local\Temp
TMP=C:\Users\Sami\AppData\Local\Temp
USERDOMAIN=Sami-PC
USERNAME=Sami
USERPROFILE=C:\Users\Sami
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
windir=C:\Windows

ess
09-03-2008, 08:50 PM
Not sure if this will help at all, but I've noticed two things.

1- You have TWO entries of JVM on your path. I think you're ought to have one only.
2- You have TWO semicolons just before the last two entries on you path, please remove one.

Let's know if this helped at all.

Cheers
~E

sorbetti
09-03-2008, 09:05 PM
I had two entries, because I added path to jdk into both account and system specific environment variables. Extra semicolon seems to be a separator of those two. I now removed the account specific variable, but still not working...


C:\Users\Sami>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Sami\AppData\Roaming
CLASS_PATH=.;
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SAMI-PC
ComSpec=C:\Windows\system32\cmd.exe
configsetroot=C:\Windows\ConfigSetRoot
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Sami
LOCALAPPDATA=C:\Users\Sami\AppData\Local
LOGONSERVER=\\SAMI-PC
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Program Files\Java\jdk1.6.0_07\bin; C:\Program Files\Microsoft SQL S
erver\90\Tools\binn\; C:\Program Files\MATLAB\R2008a\bin; C:\Program Files\MATLAB\R2008a\bin\win32; C:\Program Files\SSH Communicatio
ns Security\SSH Tectia\SSH Tectia AUX; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia AUX\Support binaries; C:\Prog
ram Files\SSH Communications Security\SSH Tectia\SSH Tectia Broker; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia
Client; C:\Program Files\jprofiler5\bin\windows;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\Sami\AppData\Local\Temp
TMP=C:\Users\Sami\AppData\Local\Temp
USERDOMAIN=Sami-PC
USERNAME=Sami
USERPROFILE=C:\Users\Sami
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
windir=C:\Windows

brad211987
09-03-2008, 10:12 PM
Does the java command work?

Try "java -version" and see what the output is, verify that its the same version you would expect.

ess
09-03-2008, 10:15 PM
This is really strange...as your settings are in order.

do you mind trying something out for us please.

1- Navigate to C:\Program Files\Java\jdk1.6.0_07\bin inside the command prompt or MS-DOS if you like
2- Type javac and hit the return key

If you get the following output

'javac' is not recognized as an internal or external command,
operable program or batch file.

It means that your Java installation was not successful...and you need to download a fresh copy and install from scratch.

If you get something that starts with
Usage: javac <options> <source files>.....

Your Java installation is fine...and we need to look for something else that could be causing the problem.

Cheers
~E

brad211987
09-03-2008, 10:23 PM
May also try installing java to a directory other than under 'Program Files', sometimes the space in the directory names throws things off, this may be what is happening in your system.

Try a new installation under a directory like C:/java and point the path variable at that instead.

ess
09-04-2008, 02:35 PM
I don't know if this will help at all...but sometime ago...I installed a printer driver for HP LaserJet 1010 on one of my PCs....and some how, it interfered with Sun JDK installation on that machine.

I think the driver used a custom implementation of TomCat server, which caused the problems.

It took me ages to figure out what went wrong...and ended up re-installing JDK and everything worked fine thereafter.

I would try and re-install Sun JDK...in case you've installed a software application that implements its own JVM which might be causing all the problems.

brad211987
09-04-2008, 03:47 PM
Thats what I was thinking with the versions....Many programs install their own JDK, but I don't see any in the path variable. Usually they put themselves in your windows path, which really throws things off.(Pointing at you Sybase!)

sorbetti
09-04-2008, 07:24 PM
Here we go again. I reinstalled both JRE and JDK into folder C:\Java and changed the path to point the new installation, and still not working. This is indeed a very strange case. I have a feeling it has something to with Vista, but can not be sure. Test results below, everything looks like normal.


C:\Java\jdk1.6.0_07\bin>javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files and annotation processors
-cp <path> Specify where to find user class files and annotation processors
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compilation is done.
-processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
-processorpath <path> Specify where to find annotation processors
-d <directory> Specify where to place generated class files
-s <directory> Specify where to place generated source files
-implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-Akey[=value] Options to pass to annotation processors
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system


C:\>java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)


C:\>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Sami\AppData\Roaming
CLASS_PATH=.;
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SAMI-PC
ComSpec=C:\Windows\system32\cmd.exe
configsetroot=C:\Windows\ConfigSetRoot
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Sami
LOCALAPPDATA=C:\Users\Sami\AppData\Local
LOGONSERVER=\\SAMI-PC
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Java\jdk1.6.0_07\bin; C:\Program Files\Microsoft SQL Server\90\Tools
\binn\; C:\Program Files\MATLAB\R2008a\bin; C:\Program Files\MATLAB\R2008a\bin\win32; C:\Program Files\SSH Communications Security\SS
H Tectia\SSH Tectia AUX; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia AUX\Support binaries; C:\Program Files\SSH
Communications Security\SSH Tectia\SSH Tectia Broker; C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Client; C:\Pro
gram Files\jprofiler5\bin\windows;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\Sami\AppData\Local\Temp
TMP=C:\Users\Sami\AppData\Local\Temp
USERDOMAIN=Sami-PC
USERNAME=Sami
USERPROFILE=C:\Users\Sami
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
windir=C:\Windows

sorbetti
09-04-2008, 07:38 PM
Oh, I just noticed the second page of this thread :) Maybe it indeed is some other program that is messing the Java installation, but that will definitely take ages to find it out as I have dozens of programs installed. Maybe I just have to stick with IDE's until that. But if you get an idea what might be the problem or if you notice something wrong with my settings, please let me know...

brad211987
09-04-2008, 10:30 PM
It looks like its working fine now....

The javac command gave you the usage instructions just as it should.

_Aerospace_Eng_
09-05-2008, 05:04 PM
This is what is in my PATH now in Vista Ultimate. It seems work just fine.
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_07\bin;

You may have PATHs in yours.

For future reference this tells you what you need to do. Its the same concept on Vista: http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html#Environment

Also as stated your installation appears to be working fine. Now you just need to use javac yourfilename.java

sorbetti
09-05-2008, 06:23 PM
It looks like its working fine now....

The javac command gave you the usage instructions just as it should.

Not really! It works as it should only in Java installation directory. When I try to use javac in ANY other directory, I get an error message "javac is not recognized as an internal or external command etc". So the original problem still exists. It was just a test suggested by ess in the previous message to find out whether or not javac works at all...

ess
09-05-2008, 07:45 PM
Not sure if this is going to help you at all...but when I went through the beta testing of Windows Vista before it was released, I experienced the same problems that you've described above...where my JDK installation didn't work even when the path variable was set correctly.

Not that I am implying that you don't have a legitimate copy...but wondered if you need to update Vista and apply all the latest patches such as Windows Vista SP1 (http://www.microsoft.com/downloads/details.aspx?FamilyID=B0C7136D-5EBB-413B-89C9-CB3D06D12674&displaylang=en) etc.

Furthermore, you need to ensure that you download and install the correct JDK for your system. In other words, if your system is x64 based, you should download and install the JDK x64 release and not the i586 release.

_Aerospace_Eng_
09-05-2008, 07:59 PM
I am using Vista Ultimate SP1 and javac works in any directory I am in. Attached is a screenshot.

http://img134.imageshack.us/img134/4544/screenshot1fa2.th.jpg (http://img134.imageshack.us/my.php?image=screenshot1fa2.jpg)

sorbetti
09-05-2008, 09:47 PM
I have a 32-bit system and the correct JDK is installed. I also have SP1 and all the latest updates installed, as I have Vista's autoupdate on. Like I mentioned earlier, in my XP machine everything works just fine, like in the previous message's screenshot. Like also mentioned before, this seems to be a very strange case, and only explanation I can figure out, is that some other program is messing up the JDK installation, since all the basic settings seems to be in order.

moporho
09-15-2008, 04:46 PM
I have followed the above advice, but I can not get past

javac Hello.java

C:\Users\moporho>javac Hello.java
javac: file not found: Hello.java
Usage: javac <options> <source files>
use -help for a list of possible options

C:\Users\moporho>java Hello.java
Exception in thread "main" java.lang.NoClassDefFoundError: Hello/java
Caused by: java.lang.ClassNotFoundException: Hello.java
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)



Here is set

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\moporho>java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

c:\>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\moporho\AppData\Roaming
CLASSPATH=.;
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=MOPORHO-PC
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\moporho
JAVA_HOME=C:\jdk1.6.0_07\bin;
LOCALAPPDATA=C:\Users\moporho\AppData\Local
LOGONSERVER=\\MOPORHO-PC
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Win
dows;C:\Windows\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\ATI T
echnologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\Roxio Shared\DLLSh
ared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program File
s\QuickTime\QTSystem\;C:\jdk1.6.0_07\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0b
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PUBLIC=C:\Users\Public
QTJAVA=C:\Program Files\Java\jre1.6.0\lib\ext\QTJava.zip
RoxioCentral=C:\Program Files\Common Files\Roxio Shared\10.0\Roxio Central36\
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\moporho\AppData\Local\Temp
TMP=C:\Users\moporho\AppData\Local\Temp
USERDOMAIN=moporho-PC
USERNAME=moporho
USERPROFILE=C:\Users\moporho
VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
windir=C:\Windows

Can someone please help as I am going crazy??

Cheers,
MoPoRho

moporho
09-15-2008, 06:29 PM
I tried it over again and IT WORKED!!!! Thanks Ess!

mullmo928
10-13-2008, 09:54 PM
Just to say thanks. Had a simulator ok on XP that failed on Vista.
OK now


Please follow these steps...

1- Right Click on My Computer on your desktop and click on Properties
2- Computer Properties Window will open....Click on Advanced System Settings
3- Click ok when the stupid administrator window appears (Personally I have disabled them...as I find them annoying and pointless)
4- Click on Environment Variables
5- Under the Systems Variables, click the NEW button to create a new Variable
6- Enter the following inside the dialog
Variable Name: JAVA_HOME
Variable Value: FOLDER_CONTAINING_JAVA_INSTALLATION for example C:\Program Files\Java\jdk1.6.0_02
7- Inside the Systems Variables, locate the Path entry. Select it...then click on the edit button
8- At the end of the PATH, enter a semi column if there is NOT one there already
9- At the end of the PATH variable, enter %JAVA_HOME%\bin;

Click on Apply and ok buttons to close all opened dialogs

Start a new (if you have one opened already...it won't work) prompt or MS Dos command prompt and type the following

java -version

You should see details of the installed version of Java etc. once you hit the RETURN key

Within the command prompt, type the following

notepad Hello.java

Paste the following inside it

public class Hello {
public static void main(String [] args) {
System.out.println("Hello World ;)");
}
}

save the file and exit notepad

at the command prompt type the following

javac Hello.java

If no errors are generated, type the following

java Hello

Cheers
~E

Aradon
02-06-2009, 03:37 AM
To prevent Necro-posting I am locking this thread, however it will be added to the Sticky as threads that are interesting / frequently asked.