Go to your command prompt type in cd C:\myjavaprograms> after
this runs type in C:\myjavaprograms>javac Hello.java to compile
your program. To see the file works type in C:\myjavaprograms>java
Hello
If you get the error msg:
'javac' is not recognized as an internal or external command, operable
program or batch file
Then you will need to take the following steps to force windows to
recognize your Javac files location.
***From Your Desktop Follow These Steps***
1> Start
2> Control Panel
3> System Properties
4> Advanced Tab
5> Environment Variables Button (Located at bottom just above the ok
button)
6> Locate the System Variables section of this screen
7> Click one time on PATH
8> Click the Edit button
9> Go to the end of this command line Should look something like C:
\WINDOWS\system32;
10> Make sure your at the end of this command line and Then
Enter ;C:\Program Files\Java\jdk1.6.0_13\bin
(PLEASE NOTE YOUR \JDK1.6.0_13\ MAY BE DIFFERENT DEPENDING ON THE
VERSION OF JAVA YOU HAVE INSTALLED)
11> Click Ok 3 times to close all the way out and now windows will
know exactly were to find your compiler. Next time you type in your
command prompt C:\myjavaprograms>javac hello.java it will compile and
then type C:\myjavaprograms>java hello and it should run your
program.
On May 28, 2:05 pm, SophE Kravitz <[email protected]> wrote:
> Hello-
> I do not understand what some parts of Lab 1001 means:
> How do I find %JAVA_HOME%\bin?
> How do I compile once I've located Javac? ..............Type
> Thanks!
> 3. Compile Hello.java using javac
> compiler. The javac compiler
> comes with J2SE SDK you've download. It resides in %JAVA_HOME%\bin (Windows)
> or $JAVA_HOME/bin (Solaris/Linux)
> directory. The result of compilation will be the creation of Hello.class file.
>
> C:\myjavaprograms>javac
> Hello.java
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---