#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    A Java newbe needs help


    Hey,
    I just started using Java as a development tool.
    Currently I am using the tutorial of 'Oracle' to help me begin.

    I tried to create a .class file on CMD (Windows 7) for the "Hello World!" test and I got an error:
    'javac' is not recognized as an internal or external command, operable program or batch file

    I tried to write the whole path for the location of the 'javac' file (pfiles>java>jdk>bin) but it did not work.
    I tried to set a path environment variable, but that did not help too. what can I do?
  2. #2
  3. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Feb 2004
    Location
    Mobile, Alabama
    Posts
    4,022
    Rep Power
    1285
    You need to check to make sure you have the JDK installed. Find the directory containing javac.exe and put that directory in your PATH.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    Hey,
    I already did that.
    I checked to see if the JDK is indeed installed, and it is.
    I wrote the exact place of the file on CMD.
    The CMD knows the javac.exe file is existing, he just can't connect between it and the file I want to compiler.

    should I leave CMD and continue with NetBeans or Eclipse?
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    I set the PATH for the bin folder and it did work
    B-U-T
    windows doesn't save the path.
    I entered again to CMD and started a new project and it didn't recognize the 'javac' command again. I had to set a PATH all over again. why is that?

    OK! I worked it out. stupid windows.

    thanks!

IMN logo majestic logo threadwatch logo seochat tools logo