Java Compiling Help
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Java Compiling Help

  1. #1
    Join Date
    Jun 2012
    Posts
    1

    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
    Location
    Barcelona - Catalonia
    Posts
    362

    Re: Java Compiling Help

    Hi,
    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
    Albert.
    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
    Posts
    1

    Smile Re: Java Compiling Help

    Hai,
    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center