CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2012

    Java Compiling Help

    I was trying to compile a simple java program (Hello World) and I received this message.

    C:\Users\Public\Documents\Java>javac HelloWorld.java
    ' javac' is not recognized as an internal or external command,
    operable program or batch file.

    I am using Windows 7 and I attempted to download the Java JDK 7 version.

    I also cannot open the NetBeans IDE, which was downloaded along with the Java program.

  2. #2
    Join Date
    Nov 2006
    Barcelona - Catalonia

    Re: Java Compiling Help

    Did you really download developer (JDK) version? In user version (JRE) there is no 'javac' command.
    javac use to be located in $JAVA_HOME/bin (%JAVA_HOME%/bin in Windows), so you should add "%JAVA_HOME%/bin" to PATH environment variable (recommended) or use full path:
    e.g.: C:\Users\Public\Documents\Java\bin\javac HelloWorld.java
    Last edited by AlbertGM; June 7th, 2012 at 04:51 AM.
    Please, correct me. I'm just learning.... and sorry for my english :-)

  3. #3
    Join Date
    Jun 2012

    Smile Re: Java Compiling Help

    First of all I want to know you are developing Java Program manually or by using IDE. If ur using NetBeans IDE then Download the Latest version 7.2
    and then there is no need to set the classpath.But if ur using manually then u have to set classpath. Bin to path environment & lib to classpath .then go to command prompt type Javac then u will supporting files will come. Then ur program will run.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

By using this site, you agree to the Privacy Policy