I am trying to teach myself to do some basic java programming using this website: http://www.null-devi...imer/part1.html
I was instructed to create a HelloWorld program using code that I copy/pasted into a notepad file. I was then instructed to open the command console and use the command "javac HelloWorld.java", but I recieved an error message telling me that the command is not recognized.
Following some advice I go on here, I uninstalled all Java programs off of my computer, and re-installed. This is what I have done:
-downloaded jdk-7u9-windows x64 and ran the installer
-left selected Development Tools, Source Code, and Public JRE in optional features
-I downloaded to the suggested locations, so for the first loading screen it was C:\Program Files\Java\jdk1.7.0_09\ and for the second it was C:\Program Files\Java\jre7\
-a message informed me that “Java SE Development Kit 7 Update 9 (64-bit) Successfully Installed” and asked me to register, which I ignored and closed the window
I then returned to the command console and tried "javac HelloWorld.java" again, recieving the same error code "'javac' is not recognized as an internal or external command, operable program or batch file."
What am I missing, or what do I have to change to make it work?
5 Replies - 706 Views - Last Post: 27 November 2012 - 03:12 PM
#1
Beginner: javac command is not being recognized by the command console
Posted 27 November 2012 - 02:19 PM
Replies To: Beginner: javac command is not being recognized by the command console
#2
Re: Beginner: javac command is not being recognized by the command console
Posted 27 November 2012 - 02:26 PM
You will have to put the Java \bin direcory in your %PATH% variable
Attached image(s)
This post has been edited by pbl: 27 November 2012 - 02:32 PM
#3
Re: Beginner: javac command is not being recognized by the command console
Posted 27 November 2012 - 02:29 PM
As I said, I am just starting out. Can you tell me how to do that exactly?
#4
Re: Beginner: javac command is not being recognized by the command console
Posted 27 November 2012 - 02:34 PM
Depends on yiour Windows flavor but basically
- Control Panel
--- System
------ Advanced
-------- Environment Variable
modify PATH by appending to hit after a ; the Java path to look like the one I have added in my previous post
- Control Panel
--- System
------ Advanced
-------- Environment Variable
modify PATH by appending to hit after a ; the Java path to look like the one I have added in my previous post
#5
Re: Beginner: javac command is not being recognized by the command console
Posted 27 November 2012 - 03:04 PM
Okay, so now it responds to the javac command but it says "javac: file not found: HelloWorld.java" even though the notepad text file is in the directory.
#6
Re: Beginner: javac command is not being recognized by the command console
Posted 27 November 2012 - 03:12 PM
Nevermind, there was simply a misspelling on my file name. Everything is working fine now. Thank you!
Page 1 of 1

New Topic/Question
Reply


MultiQuote



|