Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Specified JRE not being used from eclipse.ini(Cannot get Eclipse to start up using specified -vm JRE)
Specified JRE not being used from eclipse.ini [message #1696842] Thu, 28 May 2015 20:16 Go to next message
Eclipse UserFriend
Hi,

I'm on Ubuntu 14.04 using Luna. I've got JDK 6, 7, and 8 installed on the system in the 'normal' locations, but for other purposes I also have separate directories of those JDKs.

Because I'm using Oracle tools, JRE 8 is required. I do have the system Java set to JDK 8 from the /usr/lib/jvm/java-8-oracle directory. This is also what /usr/bin/java executes.

In my eclipse.ini file however, I have:
-vm
/home/lesh/jdk180_45/bin/java


When I go into Eclipse and go to 'Help->About Eclipse->Installation details->Configuration', it shows:
-vm
/usr/bin/java


Why isn't the path I've specified used?

Do JAVA_HOME/JRE_HOME have any impact on how this plays out or any other effect within Eclipse?

Thanks.

Les
Re: Specified JRE not being used from eclipse.ini [message #1696851 is a reply to message #1696842] Fri, 29 May 2015 01:02 Go to previous messageGo to next message
Eclipse UserFriend
Les,

Try specifying /home/lesh/jdk180_45/ and keep in mind that if there are
symbolic links involved, the Configuration shows the resolved result,
and will likely show the final canonical path...

Also try specifying a wrong location (one where there is no executable)
and note whether the IDE refuses to start in that case.

I'm not sure JAVA_HOME/JRE_HOME have any impact; I kind of doubt it.


On 29/05/2015 2:16 AM, Les Hartzman wrote:
> Hi,
>
> I'm on Ubuntu 14.04 using Luna. I've got JDK 6, 7, and 8 installed on
> the system in the 'normal' locations, but for other purposes I also
> have separate directories of those JDKs.
>
> Because I'm using Oracle tools, JRE 8 is required. I do have the
> system Java set to JDK 8 from the /usr/lib/jvm/java-8-oracle
> directory. This is also what /usr/bin/java executes.
>
> In my eclipse.ini file however, I have:
>
> -vm
> /home/lesh/jdk180_45/bin/java
>
>
> When I go into Eclipse and go to 'Help->About Eclipse->Installation
> details->Configuration', it shows:
>
> -vm
> /usr/bin/java
>
>
> Why isn't the path I've specified used?
>
> Do JAVA_HOME/JRE_HOME have any impact on how this plays out or any
> other effect within Eclipse?
>
> Thanks.
>
> Les
Re: Specified JRE not being used from eclipse.ini [message #1696857 is a reply to message #1696851] Fri, 29 May 2015 01:50 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

I'll give that test a try. But the symbolic link is to /usr/lib/jvm/java-8-oracle and not the one in my home directory.

I think I tried to use just /home/lesh/jdk180_45 but the Eclipsemedia wiki shows taking it down to the 'java' level. I'll try this and the bogus directory to see what happens.

Les
Re: Specified JRE not being used from eclipse.ini [message #1696955 is a reply to message #1696857] Fri, 29 May 2015 13:27 Go to previous messageGo to next message
Eclipse UserFriend
So I tried taking the -vm argument just to the 'home' level and that didn't work. I then put in a bogus directory and didn't even get an error/warning message about it.

If it were taking the value from JAVA_HOME, it would have pointed to the same location as the value I gave (the correct value) for -vm. But it is still resolving to /usr/bin/java which has a link to JDK 8.

So what is the behavior that I'm seeing here?

Les
Re: Specified JRE not being used from eclipse.ini [message #1696964 is a reply to message #1696955] Fri, 29 May 2015 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Given that a bogus directory after -vm doesn't produce any error/warning, I believe you may have your arguments inside eclipse.ini in the wrong order. Make sure -vm is before -vmargs (see https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM ), to wit: when I enter a bogus path after -vm I get:
A Java Runtime Environment (JRE) ... must be available ...No Java virtual machine was found after searching the following locations: /tmp/does/not/exist


Stephan
Re: Specified JRE not being used from eclipse.ini [message #1696966 is a reply to message #1696964] Fri, 29 May 2015 14:55 Go to previous messageGo to next message
Eclipse UserFriend
Good try Smile

I had the -vm option right above the -vmargs option. And the path was on a separate line.

This is very perplexing.

Les
Re: Specified JRE not being used from eclipse.ini [message #1696968 is a reply to message #1696966] Fri, 29 May 2015 15:25 Go to previous messageGo to next message
Eclipse UserFriend
... as long as a bogus path doesn't trigger the error, your -vm option doesn't seem to be interpreted ... maybe some other argument before -vm has an error and causes parsing to stop or such ...
Re: Specified JRE not being used from eclipse.ini [message #1696969 is a reply to message #1696968] Fri, 29 May 2015 15:37 Go to previous messageGo to next message
Eclipse UserFriend
Well, now there is a thought. I'll go see if there are any errors being generated.
Re: Specified JRE not being used from eclipse.ini [message #1696977 is a reply to message #1696969] Fri, 29 May 2015 19:21 Go to previous message
Eclipse UserFriend
On 05/29/2015 02:37 PM, Les Hartzman wrote:
> Well, now there is a thought. I'll go see if there are any errors being
> generated.

A couple of additional guesses. Make sure you're working directory when
launching is the directory where the eclipse.ini file is located. Make
sure that the eclipse.ini file is in the directory with the eclipse
executable.
Previous Topic:get Eclipse console print message by dll
Next Topic:Access resources from exported and dev apps without changing code
Goto Forum:
  


Current Time: Fri Apr 18 07:25:43 EDT 2025

Powered by FUDForum. Page generated in 0.05436 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top