JDK 8 and Windows 8.1 - eclipse

I installed the JDK 8 64-bit for use with eclipse on a win 8.1 machine. I had an odd problem where my file browser kept crashing when trying to right click or open files. Chrome also frequently crashed.
It took me a while to figure out what was causing it. I got a different (new) PC with a new install of windows 8.1 x64 and the same thing happened as soon as JDK 8 x64 was installed.
It stopped after it was removed. I only have a few other things installed (VS2013, Steam, Nvidia drivers, Samsung Magician, Git, etc).
I tried installing JDK x32 which seemed OK at first, but eclipse was still looking in the x64 location. I tried restarting, but when the desktop was loading the whole desktop froze and took ages to respond. I uninstalled the JDK but my desktop is still freezing on startup.
After a few minutes it starts responding and works fine again....
I need eclipse for work and I have never seen anything like this before? Any idea what is happening or why it is now not responding at startup?

I doubt that we can find out what software causes incompatibilities on your system. However, it’s worth noting that Java can be used without modifying any system resources, if you are willing to sacrifice some of the comfort functions like having a Java control panel, the ability to launch runnable jars via double-click or the browser-plugin(s).
Most of these features are associated with the “public JRE”, so if you disable this feature during a JDK install, the installation should touch much less system resources. If that doesn’t help, you can go farther by just copying the jdk/jre folder from a different installation (having the same architecture) without going through any installation procedure. If you don’t have such second installation nor virtual machines to copy from, you may copy the installation folder from your machine to an unrelated folder, revert the system to the state before the installation (which doesn’t touch unrelated folders) and use the copy.
If Eclipse doesn’t find the Java installation folder then (not touching system resources implies not leaving a hint about the Java installation location), you have to modify Eclipse’s INI file to point to the Java installation location, as said by Archimedes Trajano. Alternatively, you may place the JRE right into a folder named “jre” within the Eclipse installation folder. Then, Eclipse will find it automatically.

you can set your JVM in the eclipse.ini
Generally I modify it to point to the jvm.dll of whatever JDK I am using so that I won't see eclipse.exe spawning off a java.exe process. Instead it will just be all in one process.

Related

Eclipse is crashing on launch; can't figure out why

My copy of Eclipse (Mars.2) on Windows 10 stopped working this past Sunday for no obvious reason. Ever since then, when I try to launch Eclipse, I get a very brief glimpse of the splash screen, then it closes. There is no new log file in the eclipse\configuration folder; the oldest one is several days old. There was no exit code screen like the ones I've seen when I had exit code 13 or exit code 1. I've got a single JDK in C:\Program Files and it is the latest and greatest 64-bit JDK (at least the download link said it was a 64-bit version. I've forgotten how to determine with certainty what version it is via command line parameters.) I've tried installing newer versions of Eclipse, including both a version of Neon and the latest version of Oxygen, on both my C: drive and my F: drive (the other logical drive on my internal hard drive) and all of them have the same symptoms.
I've installed a copy of Netbeans 8.2 just to see if it would install and work and it seems to do fine. I was able to import projects from my Eclipse workspace and the various bits of code seemed to import fine. I also wrote a very basic HelloWorld just to see if it would run and it did. I think that means my JDK and my Eclipse workspace are fine. But Eclipse still won't launch. I'm completely baffled and can't think of what to do to make it work again. It was just fine right up until Sunday morning.
Logically, you have to be suspecting I did something silly right about then: messed with settings that I should have left alone, deleted something I shouldn't have deleted or something along those lines. I can't think of anything I did that in retrospect seems foolish. All I did was reboot Windows as I periodically do. Now, Eclipse resolutely refuses to work and won't tell me why.
I could just abandon Eclipse and move on to Netbeans or IntelliJ or one of the other IDEs but I've been using Eclipse happily for some time. I really don't want to invest the time it's going to take to learn how to do all the things I do in Eclipse in another IDE. How can I get it working again?
Ultimately, I solved this problem by uninstalling the sole JDK and JRE on the computer, then reinstalling them. I'm not sure what was messed up but that got my Eclipse working normally again.

The Eclipse executable launcher was unable to locate its companion shared library on shared drive after silently updating Equinox launcher

I have Eclipse installed on a removable drive that I take between my desktop and laptop. I have an old installation (Mars) that I installed ages ago by unzipping files. I have a newer installation (Neon) that I installed using the new Eclipse installer.
After upgrading both my computers to Windows 10 Anniversary Edition, both Eclipse installations continue to work when the drive is connected to the desktop machine. When I connect the drive to the laptop, however, the new Eclipse installation (Neon---the one installed using the installer) will not start and says:
The Eclipse executable launcher was unable to locate its companion shared library.
However the old installation (Mars---the one installed from unzipping an archive) still runs just fine.
What is the problem with the Neon installation on the laptop and how do I fix it?
Update: I looked in the eclipse.ini file, and there is a --launcher.library reference to a C:/Users/user/.p2/pool/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444. The laptop (which is failing) has only org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417. But the desktop (where it is working) has both org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417 and org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444.
So maybe somehow Eclipse updated its Equinox Launcher when the drive was attached to the desktop. Then when I attached the drive to the laptop, it referenced the updated launcher plugin, but the laptop didn't have the updated launcher.
This is a fine kettle of fish. I had no idea Eclipse was installing things in the user directory, outside the Eclipse installation directory. I guess that's one of the drawbacks of this newfangled launcher: it's not possible to use Eclipse on a shared drive.
How can I get Eclipse to install the launcher on the shared drive rather than in the system user home directory? Can I avoid this altogether if I install directly from zip files? How did Eclipse update this launcher in the first place without my knowing about it?
Update: Now I see that Eclipse also installed a org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar in the local plugins directory (that is, relative to the executable on the drive). Why is Eclipse putting some things on the removable drive relative to the executable (as they should be), and other things in the system user directory (where I don't want them)? This is a mess. So much for having a self-contained Eclipse installation like I did for over a decade.
By default, Eclipse installer does use a shared "bundle pool" so that if you have multiple different Eclipse instances running, the various plugins they're using are only downloaded once. This usually saves network bandwidth and disk space.
However, this bundle pool may probably be unable to work properly if the installation and bundle pool are on different drive (Especially if one of them is shared by multiple machines). You can report this limitation to http://bugs.eclipse.org .
As a workaround, for such custom installations, I would recommend that you skip the Eclipse installer, and get good old packages that will work just like Mars, everything in their own directory: https://www.eclipse.org/downloads/eclipse-packages/

Eclipse Kepler Freezes when copying

I have an Eclipse Kepler IDE where ADT Plugins, CDT plugis, Android NDK and Java is installed. It is sort of my lifeline IDE at work. Without this my whole work will come to a standstill. I have this IDE installed on a Vbox Ubuntu machine and have been using it for the past one year(ever since the glorious JUNO version days!). About 2 months ago, my IDE was veyr slow so I upgraded it from Juno to Kepler expecting better performance. I must admit it was not any at all. Also, on my VBox, the IDE froze a couple of times whenever I plugged in a USB in my Virtual Box. I assumed it must be some bug with the USB and just left it. Today, all of a sudden (this is the 5th time I have rebooted my virtual image) whenever I tried to copy a piece of code in my IDE, the whole IDE freezes. Only a kill -9 pid number command came to rescue after that. What should I do? Please suggest!!
thanks a lot.
First, you should configure the Java VM to create a thread dump when Eclipse hangs. Eclipse doesn't just hang for the fun of it; something is wrong but since there is a deadlock, Eclipse can't tell you anymore. Read up on debugging deadlocks.
The next step when Eclipse is acting up is always to clean the .metadata folder since a crash sometimes corrupts important files in there. See this blog post.
If that also doesn't help, you can try to reinstall Eclipse. Install the plugins one after the other, noting down what you do until you find the one which breaks the others.

Eclipse entries under launch group are missing

I do C++ embedded development for the NetBurner platform. They have plug-ins that customize Eclipse and in addition to a build tool-chain they add a Launch Group under the Run Configuration area. Everything was working fine under Indigo (32 bit) when I decided to install Subclipse (big mistake). As soon as the install finished I could no longer run my existing configurations successfully. When I went into the Run Configurations area I noticed the Launch Group I used to use was missing. Here is what it looked like earlier yesterday:
Here's what it looks like today:
Things I've tried
First I uninstalled the Subclipse plugins using the
Help->About->Installation Details and then selecting them one at a
time, Uninstalling and restarting after each uninstall. No change.
Then I unpacked the original Eclipse Indigo/CDT 32 bit download to a
fresh folder. Copied over the NetBurner plugins from the zip I got
from the manufacturer. No change.
Launched with different Workspaces, no change.
Launched a Galileo version, it uses older plug-ins, and it still
works.
Copied older plug-ins into Indigo, the older NetBurner launcher
shows up (but it doesn't really work with Indigo)
Removed the older plug-ins put in the newer ones, old NetBurner
launcher went away new launcher does not show up.
Tried removing the
{Workspace}.metadata.plugins\org.eclipse.debug.core.launches - no
change.
Interestingly even though launches has many .launch files that should show up under Run Configuration, nothing shows up.
One other strange (possibly relevant) thing is that icon for the NetBurner Perspective went away, now it just has <NetBurner> as the text and a generic perspective icon.
I can still cross-compile and build for the NetBurner (i.e. the build toolchain still works), it's just the ability to use run configurations that seems to be missing.
I'm out of ideas, does anyone know of some global setting that sits outside the workspace and outside the Indigo installation folder that could be causing this?
I'm running on Win 7 64 bit ultimate, I run the 32 bit version of Indigo because the 64 bit doesn't appear to work with the NetBurner plug-ins. I've also disabled the two Mylyn tasks under General->Startup and Shutdown (they seemed to cause many Permgen memory crashes). This is the same setup I had working flawlessly yesterday.
Update
I also noticed that only 3 of the 4plug-ins are showing up in the Installation Details plug-in pane. The nbeclipse.core_2.6.0.jar is in the eclipse plugin directory but not showing as loaded. So I guess I know now the problem is the plug-in isn't loading but I don't know why or how to get it to load, or what subclipse could have changed that would cause this.
I suspect that the Subclipse installation may have caused an update to some other plugin(s) that it depended on (keep in mind the transitive nature plugin dependency resolution; if you're installing plugin A and it requires a certain version of Plugin B that you don't have, Plugin B will be installed or updated to that version). In doing so, maybe the NetBurner plugin can no longer load because its declared dependencies are no longer met (ie, it depended on an earlier version and does not tolerate a later version).
You can use the OSGi Console to help determine why a plugin is not loading. Here are a couple of references that should help:
http://grep.elasticpath.com/community/techblog/blog/2010/05/27/eclipse-plugins-and-the-osgi-console
http://www.vogella.com/articles/OSGi/article.html#osgiconsole
By the way, you can not just copy plugins into an Eclipse installation and expect them to work. For several versions now, Eclipse has not supported that ability. You must use Help > Install New Software or File > Import > Install > From Existing Installation to install plugins. Ask the vendor if they have an update site to install from; like I said above, simply dropping things into Eclipse's plugins folder is not supported any more, it won't work. Other than the vendor providing an update site, the only other option is to use the dropins folder, as described here.

Move Plugins between different Eclipse versions

I need to install several plugins to an eclipse that is running on a remote 64bit Linux machine.
I tried copying the neccesary plugins to the plugins and feature folder on the remote machine but it did not seem to work.
The approach I wanted to try out now was setting up a new Eclipse installation with all plugins and replacing the whole eclipse folder.
But as I am doing this I realized that I have to use a 32 bit Linux and Eclipse. Is it possible to install 32bit Eclipse and just move the plugins and features to the remote machine?
Do I need to consider other things?
Can you recommend any other approach that would help me?
UPDATE:
The problem is that I cannot just start eclipse on the remote machine. I can access it via ssh but not run eclipse and install plugins via the wizards.
I also have no 64bit linux to prepare a complete eclipse that I can simply copy.
So what I meant is that I have to prepare either an eclipse installation or maybe just plugin folder and move that from my 32bit architecture to the 64bit one.
I can download the current eclipse folder but I cannot run it. When I try to start it with ubuntu nothing happens. I believe it is because its a 64bit version and I got 32 bit architecture.
Don't do this. Not only are there are a number of plugins with native-compiled fragments (different for 32-bit vs 64-bit), but in recent versions, Eclipse will not even register features and plugins that are simply dropped in. You should install plugins explicitly unless you are moving the entire installation between machines with compatible architectures.
You can't run a 64bit binary on a 32bit system without some kind of virtualization software that does a complete CPU emulation. VMWare, VirtualPC, etc... don't do this. They virtualize the system, but not the CPU.
The other way around: a 32bit binary on a 64bit cpu, is generally possible, if the OS (and processor) supports such things.
I think this is feasible.
The architecture should not be the problem. Unless the plugins contain DLLs or .so libraries invoked through JNI but there are very few examples (swt is one example but there are very few of them).
As a matter of fact, the reason why you have OS/arch/GUI specific versions of eclipse is not the java code but the native launcher (eclipse.exe on windows and SWT), all the rest can go bck and forth from one machine to the other, regardless of the arch, the os or the wondows manager.
However, dropping jars in the plugin directory of eclipse is not the recommended way of installing plugins any more (since 3.3 ?). It might work but there is no guarantee.
To install the missing plugins you should download them from eclipse itself (help => install new software...). If you tell us the specific plugins you have problem with, we might be able to help you more precisely.
The best way to go forward is to list all the plugins on the source machine (either from eclipse (help => about) and look at names having specific hints at arch/os/gui. All these cannot be copied over. All the rest should be safe.
As I said, beware of swt. Subclipse has a JNI dependent configuration if you decide to use JavaHL. And there are also "false" plugins such as xmlSpy etc who are noting more than JNI adapters but these are not mainstream.