Share

November 27, 2008

Eclipse is running in a JRE, but a JDK is required - FIX

I installed m2eclipse on a new Windows Vista Laptop, and now everytime I open eclipse, the console will show:

11/27/08 12:07:25 PM PST: Eclipse is running in a JRE, but a JDK is required
  Some Maven plugins may not work when importing projects or updating source folders.

The fix for this is to add the following lines

-vm
C:\Java\jdk1.5.0_16\bin\javaw.exe

to the C:\Java\Apps\eclipse\eclipse.ini file in the eclipse app dir.

7 comments:

  1. This is of course documented. See

    http://docs.codehaus.org/display/M2ECLIPSE/Installation+Requirements
    http://docs.codehaus.org/display/M2ECLIPSE/Project+FAQ#ProjectFAQ-UnabletolocatetheJavacCompilerError

    ReplyDelete
  2. Yep that is where I got the answer.

    ReplyDelete
  3. its more simple to create a bat file that starts the eclipse.

    example eclipsStart.bat:
    eclipse.exe -vm "C:\Program Files\Java\jdk1.6.0_17\bin\javaw.exe"

    remember the "" due to white space on Program Files

    ReplyDelete
  4. Correct but you should know about the eclipse.ini file as you can also alter memory sizing. and if the sytem is used by more than one user then the change effects everyone... but yes your way also work, can you also change the windows shortcut.

    ReplyDelete
  5. Solved: m2eclipse: Eclipse is running in a JRE, but a JDK is required

    G:\study\eclipse-jee-galileo-SR2-win32\eclipse\eclipse.exe -vm "E:\Program Files\Java\jdk1.6.0_23\bin\javaw.exe"

    This works fine. :)

    Regards,
    Anadi KUMAR
    Architecture and R2ds, Channels and Framework, Software Engineer | HSBC Technology and Services - Global Technology
    HSBC Software Development (India)Limited
    GLT 4.0 - Panchshil Tech. Park, Block D, S.No. 19, Hissa 2A/11/2, Yerawada, Pune, 411006.
    India.

    Mobile. +91 9822622054
    Email. anadikumar@hsbc.co.in
    Email. anadikumar@gmail.com

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Here are a possible SIMPLE solution for this (without edit the configs eclipse files): http://cimientosprevios.com/?p=19

    ReplyDelete