Results 1 to 11 of 11
Like Tree1Likes
  • 1 Post By Tolls

Thread: I can't get my compiler to run

  1. #1
    Michael2 is offline Member
    Join Date
    Jul 2012
    Posts
    7
    Rep Power
    0

    Default I can't get my compiler to run

    I downloaded Java 7 update 5 from Java.com but it's not compiling. I'm using Windows XP. I've tried updating the PATH variable but I don't know if I'm doing it correctly. Every time I try to compile my program, I get the error message that comes up when the PATH variable is not set correctly.

  2. #2
    b4viral is offline Member
    Join Date
    Jul 2012
    Posts
    17
    Rep Power
    0

    Default Re: I can't get my compiler to run

    can you paste exact error message?
    at the same time also check if you have set path properly in system environment variables, it must be till bin directory of your jre

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,015
    Rep Power
    20

    Default Re: I can't get my compiler to run

    No, it need to point to the bin directory of the JDK.
    Pointing at the jre directory will not get you the compiler as the JRE does not come with a compiler.
    noobplus likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    SnakeDoc is offline Senior Member
    Join Date
    Apr 2012
    Posts
    129
    Rep Power
    0

    Default Re: I can't get my compiler to run


  5. #5
    santhosh reddy WILLY is offline www.j2sejava.wordpress.co
    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

    Default Re: I can't get my compiler to run

    hi michael, you get this error if your are having multiple paths . wat you do is.... just go to the environment variable path and delete the paths what you have entered. and now you enter a new path of java
    example :
    if you are java is installed in c drive in program files then you.re path is
    c:\program files\java\jdk1.7.0\bin;.;
    this is the style of setting path.
    Last edited by Fubarable; 07-07-2012 at 12:20 AM. Reason: link removed

  6. #6
    santhosh reddy WILLY is offline www.j2sejava.wordpress.co
    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

    Default Re: I can't get my compiler to run

    and make sure that you are in the same drive where you are class path is

  7. #7
    Michael2 is offline Member
    Join Date
    Jul 2012
    Posts
    7
    Rep Power
    0

    Default Re: I can't get my compiler to run

    Here are some more details:

    1. When I use Windows Explorer to try and locate javac, I find three files named javac: however, none of them have worked.

    2. I can find javac using Windows Explorer, but I can not find it any other way. I updated the PATH to the jre folder because it contains a file called javacpl which I thought might be useful. It hasn't worked.

    3. When I try and compile the program that I copied, the computer says that javac is not recognized.
    Last edited by Michael2; 07-07-2012 at 02:40 AM.

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default Re: I can't get my compiler to run

    a file called javacpl which I thought might be useful.
    javacpl is the Java Control Panel applet. Nothing to do with the compiler.

    I can find javac using Windows Explorer
    Is that exactly 'javac.exe'? If yes, in which locations did you find them?

    Is there a C:\Program Files\Java\jdk1.7.0_05\bin folder? That's what you need to add to the PATH.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  9. #9
    Michael2 is offline Member
    Join Date
    Jul 2012
    Posts
    7
    Rep Power
    0

    Default Re: I can't get my compiler to run

    There isn't one labeled javac.exe, just a few named javac. There is a jdk folder, but it does not contain javac. Other than those three files I mentioned, there is no javac anywhere. I checked all the folders that it could be in, but it's not there. Should I call oracle?

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,534
    Blog Entries
    7
    Rep Power
    20

    Default Re: I can't get my compiler to run

    If there is no javac.exe file anywhere on your hard disk you haven't installed the JDK correcty (maybe you accidentally installed the Unx/Linux version?).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    Michael2 is offline Member
    Join Date
    Jul 2012
    Posts
    7
    Rep Power
    0

    Default Re: I can't get my compiler to run

    I guess I'll try it again and see if that works. Apparently, I had some malware on my system so I guess that could've affected installation. I wonder if I got it from Java.com.

Similar Threads

  1. what is the best compiler?
    By chipp in forum Other IDEs
    Replies: 3
    Last Post: 05-21-2012, 02:45 PM
  2. JIT compiler?
    By drone13 in forum Advanced Java
    Replies: 1
    Last Post: 01-26-2010, 10:03 AM
  3. compiler,JIT compiler & interpreter
    By gamilah in forum New To Java
    Replies: 4
    Last Post: 11-04-2008, 12:32 AM
  4. Compiler
    By pawankumarom in forum New To Java
    Replies: 3
    Last Post: 09-08-2008, 01:11 PM
  5. Compiler?
    By robin105 in forum New To Java
    Replies: 2
    Last Post: 07-26-2008, 02:46 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
  •