Eclipse Helios x86 issues on Windows 7 x64, even on clean system - java

I have a problem with Eclipse for some time. When I move to Windows 7 x64 on my notebook, Eclipse starts getting "Freeze", for example, when using Content Assist (Code Helper), or using any other option in Eclipse. I am using quite bunch of plugins, so, I tried to delete them all, and check clean IDE. But this didn't help. I downloaded fresh Eclipse Helios for Windows x64, didn't help. I even formated the disk, reinstall Windows, install only JDK and Eclipse but it always occur. What can I do ?
Edit:
Memory: I did not change memory, and IDE freeze, change memory to 512,1024,2048 MB, keeps freezing. (via vm parameters).
Anti-Virus: I am using ESET Smart Security, but with our without it, Eclipse keeps freezing.

After much frustration, I disabled AVG and it worked fine.

Several leads.
Check whether this freeze the freeze is linked to a huge consumption of CPU or disk usage. Unlikely.
If not then this is probably a network issue. Then disable the firewall for a while and try again. Eclipse now reports your plugin usage at the beginning of a session and it might be busy looking for a connection.
Close all editors from previous session. In the past, eclipse tried to access xml DTD with from the network instead of the local catalog and that would fail if you were offline of course.
Finally, let me tell you that if this is for running eclipse you've selected the worst OS. OSX and Linux are much better options. I used to do so as well. But for the last two years, I've run Windows only inside VirtualBox when I couldn't avoid it (TOAD, Macromedia Fireworks) and I wished I had migrated before.

The crucial point is how much memory you have for Eclipse and if you have any anti-virus software installed that needs to preparse all the class files Eclipse wants to look in.
Does it settle after some usage?

Related

When Eclipse is building my workspace, it freezes

When eclipse is building my workspace, it gets held up at about 19% when updating an unmodified(after project creation) javafx application. Why is it doing this and how can I fix it?
OS: Windows 8
Eclipse Version: 4.7
JDK 9.0.1
JRE 1.8
I've seen other threads about similar problems and they have suggested allocating more memory, I've allocated 1gb to each and nothing has changed, I can't allocate more without instability.
--EDIT--
On deleting the javafx application from my disk it no longer crashes
It turns out the answer to my question was as simple as it could get, all I had to do was delete the application and then recreate it, I think when I first tried to generate it I interrupted it by ending the task because I thought it had crashed.
This is bit late reply, but for people who still looking for this answer might help. I had similar problems and spent few hours. This is what worked for me and I no longer have any problem.
Delete your workspace and create a new one if its first time you started eclipse or create a new workspace and import all your projects there.
Also assigning more ram to eclipse also further increases speed. which can be found here:
How can you speed up Eclipse?

Eclipse faster auto refresh

I use Eclipse to run my application only. I use an external editor (Atom) for my main development. I turned on "Refresh using native hooks or polling" to have Eclipse refresh regularly (more info here on how to do that).
My problem is... on OSX (MacBook Pro), it's a 15 sec delay. On my old crappy PC, it's pretty much instant.
My question, is there any way to speed up the polling time on OSX?
(I am not on a Mac, so I can't test this for you.)
Zend have written a refresher for Eclipse that uses Java 7 new features.
https://github.com/zendtech/studio-workspace-refresher
There are others out there to (https://github.com/zch/AutoRefresher and https://github.com/psxpaul/EclipseJava7Refresher) but based on the age and source of the zend one it is where I would start.
Note that you have hit upon one of the biggest issues people have with Eclipse. The new (as of Oct 2015) Friends Of Eclipse funding is aiming to tackle some of these issues. This one has a bug you can track Bug 480551.
There is no configuration that changes the operation of the polling refresh used on the Mac (org.eclipse.core.internal.refresh.PollingMonitor).
The refresh runs much quicker on Windows because it uses file system native hooks rather than polling.

Solved: JVM hangs forever with no CPU usage or I/O

I'm experiencing this weird problem that the JVM hangs forever very frequently.
I first observed the problem when my Java IDEs frequently hang the entire system GUI. IntelliJ IDEA hangs on indexing almost every single time upon start. Sometimes it proceeds to resolving dependency but always hangs in the end. When this happens, I can type in gnome-terminal, but the commands can't seem to be executed. I can't launch new applications with Alt-F2 or anything alike.
I had to switch to a text console and "killall -9 java" to kill the IDEA process and get control back. "kill -3 java" won't work. The log file contains nothing related, the thread dump is empty. Once the IDE hung, jstack cannot be attached to the process. "jstack -l pid" also hangs. "jstack -F pid" can't attach to the process. Visualvm hangs as well.
The CPU usage by the Java process is 0% and there is no I/O going on.
I've observed the same behavior when using Eclipse. Sometimes it hangs on start up, sometimes upon saving and sometimes upon running a Java application.
Maven / sbt builds executed within text-only ttys cause the same kind of hang, so I guess it's not a window manager / desktop environment / display driver problem.
I highly suspect it's a file system or I/O issue but I have no clue how to debug that. I've tried fsck with no luck, and my system works perfectly fine when not running java programs.
Things I've ruled out:
Permission issues: running IntelliJ with sudo doesn't help, hangs 100% of the time.
Display driver: I've tried both the Nvidia proprietary driver and nouveau, the open source one. Doesn't help.
Window manager / desktop environment: I use Cinnamon, but I've tried running IntelliJ under Unity. Doesn't help.
Java version: I've tried both Oracle Java 7 and Oracle Java 8. I'll probably try OpenJDK but I doubt it would work.
IntelliJ version: I've tried IntelliJ 13 through 14.1. All exhibited the same behavior.
Limited memory: I have 16G RAM with 16G swap space, so memory should not be a limiting factor.
Kernel log doesn't look suspicious. I can't get any kind of log remotely indicating what went wrong.
Any idea?
UPDATE (2015/04/29): The problem seems to have fixed itself after I accidentally kicked the power cable and cold restarted the computer... Still a mystery but IntelliJ is usable as of now.
Some things to check
- The Java IDEs run best with a lot of ram. I usually ask for at least
8G of memory for my dev workstation.
- Make sure you have a stable version of everything, look for known working versions/configurations on Ubuntu
- You have to manually allocate memory in IntelliJ IDEA versions < 14. For example: How to increase IDE memory limit in IntelliJ IDEA on Mac?
- Besides system logs, run tools like top and see what's happening in terms for cpu and ram when running the IDE
I had similar problems a while ago but with Eclipse. The problem was that there was no swap place at all ;) - obviously it should not be a problem with 16GB of RAM.
Could You post JVM arguments for Intellij? And also I have an idea to create another Intellij installation (eg. go back to 14 version) and see if there is similar problem (also compare JVMs settings between these two).
Edit
Ok so try:
use different JRE/JDK. If the problem disappears it will tell us more.
You are on linux so it makes it easy to monitor several things - you said that there is no CPU utilization or hard I/O. But how do you know that? Maybe it will be informative to have some statistics gathered - eg.jstat for JVM itself or for system information (You think that is I/O problem) try:
iostat -hm -p sda 1
Which will print I/O statistics for sda (if you have different discs change device parameter) in 1sec loops (can be also changed). Start this with system and dump output to the file - maybe there is some kind of 'disaster' happening before JVM hangs. Note: iostat sometimes is not available on system itself (on my Linux Mint is not) - install then package sysstat and the command will be available.
Seem to have fixed after a cold restart from an accidental power loss.. Weirdest problem I have ever seen.

Java 1.6.x ant build slower on OSX?

At my wits end here. We've recently grabbed a Mac Pro to test out as a development environment, moving from Ubuntu - we were really hoping to see some serious decrease of our build times, but in fact the opposite is true. I'm wondering if we're missing something config related with Mavericks, we've already disabled spotlight on the appropriate directories.. messed around with ANT options giving up to 8G of memory for the builds.
Is HFS+ that much slower that EXT3? The build is writing 55k+ files to an exploded ear.
I've run disk tests on the mac, and we're seeing close to 1GB/s read time & 750MB/s write time so it doesn't seem to be hardware related. The linux build completes in just under 8 minutes, whereas the Mac Pro is looking at 9.5 minutes.
I'd like to avoid any kind of religious style OS discussions, I also know we could try installing Linux on the mac and see what happens, but at that point I'm not sure we're seeing a reason to spend $1600 more than our current high end non-Apple build. Looking more for any 'obvious' reasons we might be seeing this issue.
Thanks.
Answering my own question - unfortunately we sent the machine back, but later when moving to macbook pros, we discovered that we were still using a pretty old version of ANT (1.7.x), and the weblogic deps also had ant 1.7.x in the class path. We moved to 1.9.x & saw a big increase in speed on the macbook pros, so I suspect that a newer version of any may have seen some speed increase on the Mac Pro as well.
You've run some disk tests on the mac - how about on the Linux box? It's possible it's faster than the mac in that regard. Something else to check out - is the mac using filevault? I've noticed that will really eat into compile times vs raw disk, but it doesn't usually show up on a disk read / write test that's using a single large block of data.

Profiling issues VisualVM and Mac OS X

Recently (I suspect the latest Java update installed a few days ago, but I'm not sure), I am experiencing some strange problems with VisualVM run under Mac OS 10.8.4. The profiler has been working fine for ages, but now suddenly, the CPU profiling doesn't show me any methods from my own applications any longer, but only the following four:
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()
sun.awt.AWTAutoShutdown.run()
sun.awt.AppContext$PostShutdownEventRunnable.run()
java.util.concurrent.ThreadPoolExecutor$Worker.run()
We tried on a colleague's Mac (similar configuration, latest updates installed), and it's still working fine for him.
Any hints what might be causing that problems are warmly welcome.
[edit] It is a command line program, no AWT application.
For some reason your CPU profiling settings are messed up. Please see Profiling VisulVM, especially 'Profiling Performance' section. It will describe the settings.

Categories