Results 1 to 3 of 3
  1. #1
    Empower5315 is offline Member
    Join Date
    Aug 2009
    Posts
    1
    Rep Power
    0

    Thumbs down Problems, problems, problems!

    Hey guys,

    I am really having trouble on running this java file. It is the Hello World program.
    I downloaded Java EE 5 SDK Update 7 (with JDK 6u16)
    and then I installed it

    Then I wrote the program for Hello World in notepad and saved it as a .java file.

    Now, I have no clue on what I should do. What should my path be?
    Where should it direct to?
    I have saved the .java file on the desktop.
    I tried running javac but it says 'javac' is not recognized as an internal or an external command.

    what do i do?

    please help.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    I moved this to a new thread as this is your new problem and should not be piggy backed on an old thread.

    To solve your problem, please go through this tutorial: Lesson: The "Hello World!" Application (The Java™ Tutorials > Getting Started)

    Also, make sure that your system path includes the directory that holds the Java bin files (including the javac.exe).

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    If you want temporary set the classpath on the command prompt as well. But it's not a robust way at all. Each time you close and open the command prompt have to do that.

    Here is the way to do that.

    Change the working directory in the command prompt to your working folder, which is all your Java files are stored. Say for an example, folder Demo in C drive. So the path on command prompt would be,

    C:\Demo>

    And say your Java installation is in the following location.

    C:\jdk1.5\

    Then type the following command,

    C:\Demo>path=C:\jdk1.5\bin\ and press enter. If you didn't get any error messages everything is fine. Type the command javac and hit enter again. If everything is setup correctly you can see a list of options used in Java. Or else you get that famous message, javac is not recognized....., means something wrong with your above commands, recheck them.

    Setting the system variables what do is, make the permanent in your system.

Similar Threads

  1. Few Problems Help!
    By elad_bj in forum New To Java
    Replies: 4
    Last Post: 04-07-2009, 03:45 AM
  2. Problems in JSP : Need help
    By raj4u in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 02-07-2008, 10:06 AM
  3. GUI problems.
    By saytri in forum New To Java
    Replies: 1
    Last Post: 12-16-2007, 10:27 PM
  4. gui problems
    By bluebirdjc in forum Advanced Java
    Replies: 2
    Last Post: 07-23-2007, 05:38 PM
  5. problems with JPA
    By Ed in forum New To Java
    Replies: 2
    Last Post: 07-04-2007, 05:34 AM

Posting Permissions

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