View Full Version : eclipse slow/freezing
scotty2hott2k
April 23rd, 2007, 10:26 AM
hi, using eclipse in feisty (using it to program c++), it seems to randomly freeze up for short periods of time, i look in top or via system monitor and java spikes to 80-90% of cpu usage, is there a 'fix' for this or am i doing something wrong?
hod139
April 23rd, 2007, 12:56 PM
Make sure you are using Sun's java, not GNU's. There are plenty of threads available for installing Sun's java, some using the repositories others not. I have an older thread for dapper that I think should still basically work: http://ubuntuforums.org/showthread.php?t=201378
You might have to update version numbers for feisty. I should probably update that howto anyways.
scotty2hott2k
April 23rd, 2007, 01:02 PM
thanks, followed your guide, at the top of my config files was:
/usr/lib/jvm/java-gcj
which assume is the wrong one, so i made sun's top.
phossal
April 23rd, 2007, 03:06 PM
Are you ever going to upgrade your tutorial to reflect that SUN's Java is now 1 version and 1 update greater? JDK 5.0 with eclipse, instead of JDK 6u1? Why?
hod139
April 23rd, 2007, 04:37 PM
I upgraded my tutorial to now use java 6.
scotty2hott2k
April 24th, 2007, 02:13 PM
right, sorry to say its still not fixed, java still spikes to 80% or so every so often and eclipse freezes/stops responding so i have to leave ot for 2 minutes (if not more) til it recovers and is usable again.
hod139
April 25th, 2007, 09:19 AM
Have you done all the steps in my howto? If you start eclipse from the terminal, it prints out which jvm it selected to run, make sure you see java-6-sun
scotty2hott2k
April 25th, 2007, 09:35 AM
it appears that its the code complete assistant that is causing it to freeze/slow. it tends to run fine until i do class object then . then it spends ages searching for what members that class has. (ive got about 30 different source files in the project)
scotty2hott2k
April 25th, 2007, 09:37 AM
right, just ran it from console like you said, appears you are right. i get:
searching for compatible vm...
testing /usr/lib/jvm/java-1.5.0-sun...not found
testing /usr/lib/jvm/java-gcj...found
Could not create /usr/local/lib/eclipse/.eclipseextension. Please run as root:
touch /usr/local/lib/eclipse/.eclipseextension
chmod 2775 /usr/local/lib/eclipse/.eclipseextension
chown root:staff /usr/local/lib/eclipse/.eclipseextension
which would indicate (?) that its not using sun's java?
hod139
April 25th, 2007, 09:42 AM
right, just ran it from console like you said, appears you are right. i get:
searching for compatible vm...
testing /usr/lib/jvm/java-1.5.0-sun...not found
testing /usr/lib/jvm/java-gcj...found
You are still using Gnu's java. Make sure you do all the steps in my tutorial:
1) update java-alternatives
2) Edit the jvm configuration file
3) Edit eclipse's java_home file
Then it should use Sun's java.
Could not create /usr/local/lib/eclipse/.eclipseextension. Please run as root:
touch /usr/local/lib/eclipse/.eclipseextension
chmod 2775 /usr/local/lib/eclipse/.eclipseextension
chown root:staff /usr/local/lib/eclipse/.eclipseextension
This is interesting, have you done this?
scotty2hott2k
April 25th, 2007, 09:43 AM
ok, its now much quicker though sitll pretty damn slow, like 6+ seconds for the popup for code assist to popup.
scotty2hott2k
April 25th, 2007, 09:52 AM
just did the last bit it said on the console startup with setting permissions as root, made no difference, still takes on average 6seconds for it to popup, (ive got 768mb of ram, 2.4gig p4).
scotty2hott2k
April 25th, 2007, 10:14 AM
just installed and using codeblocks now, much quicker than eclipse. i like the eclipse environment, but if its not working properly :(
Serguei_89
April 27th, 2007, 06:03 PM
In my case, this exact same slowness problem happens only when I use Eclipse installed via automatix or adept(don't remember which I used). If I use Eclipse downloaded and extracted from the Eclipse website, everything works smooth.
bedo
June 5th, 2007, 08:45 PM
here's what fixed the problem for me
I made sure gcj is my java virtual machine
then installed "eclipse-gcj" package instead of plain "eclipse"
"sudo apt-get install eclipse-gcj"
to change the jvm follow the following steps (as per the tuturial) but instead switch to gcj
You are still using Gnu's java. Make sure you do all the steps in my tutorial:
1) update java-alternatives
2) Edit the jvm configuration file
3) Edit eclipse's java_home file
asymmetric
June 13th, 2007, 06:22 AM
hi!
i extracted and compiled the JDK, so i didn't use the deb packages..
i tried to follow the tutorial, changing the config files accordingly
the jdk is in my home, so i added /home/lrnz/jdk1.6.0_01/ instead of /usr/lib/jvm/java-6-sun, because i don't have that directory..
but when i start eclipse via console, it still says it's using gcj, plus now it gives me that strange error about typing commands as root!
is there a way to completely uninstall gcj? is it safe?
or, alternatively, how could i completely remove the compiled java and install a clean deb over it?
thanks!
asy
asymmetric
June 23rd, 2007, 02:47 PM
anyone?
asymmetric
June 24th, 2007, 08:57 AM
i solved by adding a symlink in /usr/lib/jvm called java-sun pointing to my java bin
thanks for the help ^^
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.