Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

[noob] Ecplise can't find java

  • 01-02-2011 4:11pm
    #1
    Registered Users, Registered Users 2 Posts: 7,834 ✭✭✭


    I've downloaded the Java Jdk for Win 32 from the Oracle website

    I'v downloaded the Eclipse IDE for Java EE Developers (win 32)

    I've them both in different folders in c:\Program Files

    I'm gone to the Environmental Variables in the Control Panel and done the following:

    1. Edited the Path to be: C:\Program Files\Java\Jdk1.6.0_23\bin
    2. Created a JAVA_HOME at C:\Program Files\Java\Jdk1.6.0_23
    3. Created a CLASS PATH at C:\Program Files\Java\Jdk1.6.0_23\lib

    I'm running Windows 7

    Now when I try and run the Eclips.exe file I get a message saying that it can't find a virtual Java machine at the path and gives a path a address of
    C:\Program Files\Eclipse\ followed by some JDK\..... Anyway there is no such folder within my Eclipse folder.

    Anyone ahve any ideas what's going on here?


Comments

  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    have you restarted? or did you forget the semi colon at the end of the path variable?


  • Registered Users, Registered Users 2 Posts: 7,834 ✭✭✭Brussels Sprout


    Adam wrote: »
    have you restarted? or did you forget the semi colon at the end of the path variable?

    I definitely restarted. I may have forgot the semi colon. I'll check when I get home-thanks!


  • Registered Users, Registered Users 2 Posts: 7,834 ✭✭✭Brussels Sprout


    Ok I put in the semicolons but it didn't make a difference.

    Those paths and things that I put in above. Should they be in the user settings or system settings?


  • Registered Users, Registered Users 2 Posts: 981 ✭✭✭fasty


    32 bit or 64 bit Windows?


  • Registered Users, Registered Users 2 Posts: 1,099 ✭✭✭Rulmeq


    Post the exact error message, don't paraphrase.

    Also open a command window, and type java -version, and post the results here.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,834 ✭✭✭Brussels Sprout


    fasty wrote: »
    32 bit or 64 bit Windows?

    32 bit
    Rulmeq wrote: »
    Post the exact error message, don't paraphrase.

    Also open a command window, and type java -version, and post the results here.

    Error Message:
    A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
    C:\Program Files\eclipse\jre\bin\javaw.exe
    javaw.exe in your current PATH


    I've tried running that line in
    C:\
    and C:\Program Files

    but in both it just says
    'java' is not recognized as an internal or external command, operable program or batch file.

    I downloaded the JDK as I said in the first post. Inside my Program Files I seem to have two Java related folders:

    Java
    JRE

    Thanks for the replies so far


  • Registered Users, Registered Users 2 Posts: 1,099 ✭✭✭Rulmeq


    Given what you posted there, I'd suggest that you uninstall the JDK and the JRE (from the Add/Remove Programs control panel). Restart, and install the JDK again.

    On the first options, set the install location to be something like C:\java (this will remove the space from the path. When it asks you where to install the JRE, you can either put it in the same dir, or you can leave it in C:\Program Files

    Then change the PATH and JAVA_HOME variables, you don't need that CLASS_PATH variable - indeed it might cause you problems in the future.

    Then after a restart (just to be sure), type the following:

    echo $PATH
    echo $JAVA_HOME

    and ensure that your JDK entries are there, once they are you should be able to type java -version to see the version of Java you've installed.

    Once that's working, you should be able to get eclipse working - I'd have installed it on the root as well, that space in "Program Files" can cause issues (although I've not noticed it with Java before).


  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    I could be wrong but - it's been a while since I've installed a java compiler and I normally use Netbeans - I think the JDK is for running Java programs and the compiler on it's own can't create the java class - it needs the SDK as well. Have you installed the JDK, SDK and then the compiler (in that order works best but the SDK at the end should just update the links within the compiler even if you use non-standard installation folder locations).

    -RD


  • Registered Users, Registered Users 2 Posts: 1,112 ✭✭✭Dacelonid


    The JRE can only run programs, the JDK includes the java compiler.

    Rulmeq gave the best advise. You could spend hours messing around with the path variables, better to wipe it clean and start again. I would also delete / remove any manually added java path variables, before installing the new version.


  • Registered Users, Registered Users 2 Posts: 2,013 ✭✭✭lynchie


    Rulmeq wrote: »
    Given what you posted there, I'd suggest that you uninstall the JDK and the JRE (from the Add/Remove Programs control panel). Restart, and install the JDK again.

    On the first options, set the install location to be something like C:\java (this will remove the space from the path. When it asks you where to install the JRE, you can either put it in the same dir, or you can leave it in C:\Program Files

    Then change the PATH and JAVA_HOME variables, you don't need that CLASS_PATH variable - indeed it might cause you problems in the future.

    Then after a restart (just to be sure), type the following:

    echo $PATH
    echo $JAVA_HOME

    and ensure that your JDK entries are there, once they are you should be able to type java -version to see the version of Java you've installed.

    Once that's working, you should be able to get eclipse working - I'd have installed it on the root as well, that space in "Program Files" can cause issues (although I've not noticed it with Java before).

    It should be echo %PATH% and echo %JAVA_HOME% as the user is running windows not linux


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 14 blahound


    I assume you downloaded jdk+ee and not jdk se? (not sure if that would stop eclipse finding it)

    and also I think you need plugins before eclipse will work with java. I think its called jface.

    I could be completely wrong :( I can't really remember what I did when I installed eclipse


  • Registered Users, Registered Users 2 Posts: 1,056 ✭✭✭maggy_thatcher


    You can override the Java path for Eclipse in the file "eclipse.ini" that's sitting in the same folder as the eclipse.exe file.
    In there add two lines
    -vm
    C:\Program Files\Java\Jdk1.6.0_23\bin\java

    You may need to use an editor that supports UNIX style newlines (i.e. not notepad)

    This will ignore any $JAVA_HOME etc. variables and just go straight to that one.


  • Registered Users, Registered Users 2 Posts: 7,834 ✭✭✭Brussels Sprout


    Rulmeq wrote: »
    Given what you posted there, I'd suggest that you uninstall the JDK and the JRE (from the Add/Remove Programs control panel). Restart, and install the JDK again.

    On the first options, set the install location to be something like C:\java (this will remove the space from the path. When it asks you where to install the JRE, you can either put it in the same dir, or you can leave it in C:\Program Files

    Then change the PATH and JAVA_HOME variables, you don't need that CLASS_PATH variable - indeed it might cause you problems in the future.

    Then after a restart (just to be sure), type the following:

    echo $PATH
    echo $JAVA_HOME

    and ensure that your JDK entries are there, once they are you should be able to type java -version to see the version of Java you've installed.

    Once that's working, you should be able to get eclipse working - I'd have installed it on the root as well, that space in "Program Files" can cause issues (although I've not noticed it with Java before).

    Thanks-this worked


  • Registered Users, Registered Users 2 Posts: 1,099 ✭✭✭Rulmeq


    lynchie wrote: »
    It should be echo %PATH% and echo %JAVA_HOME% as the user is running windows not linux

    Thanks, I should have checked before I posted, I'm always getting them mixed up :(


Advertisement