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

    Default java compiler error



    i have the error above..

    I already install jdk 1.6.0_14..

    Am I missing somethings?

  2. #2
    porchrat is offline Senior Member
    Join Date
    Mar 2009
    Posts
    105
    Rep Power
    0

    Default

    HelloWorldApp.java is not compiled.

    You need to use the javac command to compile it into a .class file.

    Then you can use the "java" command to run it. You also don't need to write the file extension e.g. "Name.class", you can just use "Name" when you run the "java" command.

    Hope that helps.

  3. #3
    arshesander is offline Member
    Join Date
    Aug 2009
    Posts
    8
    Rep Power
    0

    Default

    But I already use javac to compile the file.. is there a other reason why this happen?

  4. #4
    kgkamaraj is offline Member
    Join Date
    Feb 2010
    Posts
    9
    Rep Power
    0

    Default

    HI.
    You need to set path before compiling.



    Go to specified path in command prompt.

    Then set path.....

    FOR EXAMPLE :

    d:\programs\java> set path="C:\Java\jdk1.5.0_03\bin"


    After setting path.... then compile your program and check it......

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    OP...when you compile a java file you get a .class file. That is what you run (without the .class extension). In your case "java d:\HelloWorldApp".

  6. #6
    clydedoris is offline Member
    Join Date
    Feb 2010
    Posts
    80
    Rep Power
    0

    Default

    problem solved? if not, i just suggest you use JCreator from JCreator Java IDE. This one is lightweight, but if you want, try NetBeans.

    When using these IDE's, you dont have to use your CMD anymore..:D
    Last edited by clydedoris; 02-18-2010 at 05:05 AM.
    [why are you annoyed with my sig?]

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    When learning Java it's best to learn from the command line so you actually understand how the thing works. Because you will not be running real apps from within an IDE...

  8. #8
    Join Date
    Feb 2010
    Posts
    1
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    OP...when you compile a java file you get a .class file. That is what you run (without the .class extension). In your case "java d:\HelloWorldApp".
    thanks...i had the same issue

Similar Threads

  1. Replies: 4
    Last Post: 04-23-2010, 01:54 PM
  2. Replies: 8
    Last Post: 12-30-2009, 11:40 AM
  3. Help Finding Compiler error solution please
    By jamesr2b in forum New To Java
    Replies: 5
    Last Post: 04-30-2009, 06:07 AM
  4. Replies: 3
    Last Post: 01-23-2009, 08:53 AM
  5. Compiler Error
    By jeneal in forum New To Java
    Replies: 5
    Last Post: 12-13-2007, 01:31 PM

Posting Permissions

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