atlas-mvn eclipse:eclipse issue with the JDK

JPB May 12, 2014

Hi everyone, I'm new with all of this, this is my first question here in the site.

I was working with the java JDK 1.6, but I changet it to the 1.7 version (cause the application in the company is workinh under this one).

The issue is when I apply the atlas-mvn eclipse:eclipse command, I get this:

[WARNING] Workspace defines a VM that does not contain a valid jre/lib/rt.jar: C:\Program Files\Java\jre7
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.
StandardVMType/JavaSE-1.6

I changed the path to the 1.7 directory, then in eclipse added the jdk1.7 to the installled JREs. But that message is always shown, and the project is build under version 1.6.

In the project explorer in eclipse, I see this include: JRE System Library [JavaSE-1.6] for all the new projects, and the ones that I applied that comman (atlas-mvn eclipse:eclipse). So, the system is not recongnizing the change to 1.7?

Someone can help me with this, thank you!!

P.D: I have tried deleting the buildpath, configuring it, changing to 1.7 in the project properties, but none of those have worked.

2 answers

0 votes
rambabu patina
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2014

Hi Jhonnatan,

Please change the --vm entry in the eclipse.ini file. To change follow the steps,

Navigate to the root of the Eclipse installation --> Take backup of the eclipse.ini file --> Edit the eclipse.ini file with your favorite text editor --> Add a -vm entry to file before any -vmargs entry with your latest java path

File will be looking like below:

-startup

plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar

--launcher.library

plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502

-product

org.eclipse.epp.package.jee.product

--launcher.defaultAction

openFile

--launcher.XXMaxPermSize

256M

-showsplash

org.eclipse.platform

--launcher.XXMaxPermSize

256m

--launcher.defaultAction

openFile

-vm

C:/Program Files/Java/jdk1.7.0_32/bin

-vmargs

-Dosgi.requiredJavaVersion=1.5

-Xms40m

-Xmx512m

====

Thanks,

Patina

JPB May 13, 2014

That didn t work either. The command atlas-mvn eclipse:eclipse is always adding the classpath:

org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.de
bug.ui.launcher.StandardVMType/JavaSE-1.6

rambabu patina
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2014

Try to add JRE Library to the project by

Right click on your project --> Click on the Build Path --> click on the add Libraries. -->

Then Choose JRE System Library --> See weather it is pointed to Workspace default JRE(jdk1.7.0_xx) if else add the jdk 1.7 JRE library there.

Click finish and then go back to your project. Run the eclipse:eclipse command.

Thanks,

Patina

JPB May 13, 2014

Right now, I have in the system library check the option:

-Workspace default JRE (jdk1.7.0_55)

Cause I changed it.

Before, I had check Execution environment with the option
JavaSE-1.7 (jdk1.7.0_55) selected.

But none of those worked, whe using the atlas command, the library is always changed to 1.6.

Thanks anyway ;)

0 votes
BenjiI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2014

If you are using Windows maybe you can try updating the JAVA_HOME system variable and make it point to your Java 1.7 JDK?

JPB May 13, 2014

I already did that, that was not the problem, but thanks.

Suggest an answer

Log in or Sign up to answer