Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I configure what JVM Eclipse runs in?

I'm trying to switch it to use my installed java-6-sun so that I can use jstack to figure out why Eclipse is spinning endlessly in certain situations.

I recently upgraded to Ubuntu 12.04, and I'm using the pre-packaged Ubuntu Eclipse 3.7.2.

I tried to adding the -vm option to eclipse.ini (immediately above the -vmargs line in my /etc/eclipse.ini), but top still shows that Eclipse is running with plain old /usr/bin/java.

The Ubuntu community wiki article for Eclipse mentions /etc/eclipse/java_home, which doesn't exist on my system.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You may already be using your preferred JVM. Please note that /usr/bin/java is not a binary, but a symlink pointing to your preferred Java JRE/JDK alternative.

I recommend changing this alternative to Sun Java 6 to avoid any confusion. For how to do that, please see this question:

How do I make java default to a manually installed JRE/JDK?

share|improve this answer
    
Changing the system-wide default JVM temporarily is fine for my purpose -- a couple of test runs of something on a single user system -- so I'll take it. But what I was really looking for was a way to configure Eclipse specifically. –  rakslice Jul 18 '12 at 23:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.