Eclipse Neon.3 fails to launch after install - eclipse

I've installed Eclipse Neon.3 on my windows 7 machine, after the install process has finished, the installer has an option to 'launch now', which I do and the IDE boots up and works as expected.
However when I close eclipse and then reopen it, I get a crash which prevents it from booting up (sorry for this being a picture, but there doesn't seem to be an easy way to copy the text):
The version I've installed is Release 4.6.3, and the build ID is 20170314. I've installed and removed it 3 times and observed the same behaviour each time. I've tried doing a reset between boots and installs. I've also tried inspecting my environment variables, which look like this:
JAVA_HOME:C:\Program Files\Java\jdk1.8.0_91
PATH: %PATH%;%JAVA_HOME%\jre\bin
Is this a known issue, or do I have something wrong in my setup? Prior to this I discovered 4 versions of the jre/jdk on my machine, and two versions of eclipse. I think I have correctly removed all but the one referenced from my java home, and I entirely removed eclipse and downloaded the latest version (neon.3).

I've fixed the issue, and whilst I'm still not entirely sure why it was a problem, here is how I fixed it.
I opened a terminal and ran 'java -version' (I should have done this first). It was failing to find java.exe, despite the bin folder being on the path. Running this revealed that it was actually calling a shortcut to java.exe found in 'c /programdata/oracle/java/javapath/' which pointed to a now non existent version of java.
So long story short, if you have a similar problem, check if you have shortcuts in the folder 'c /programdata/oracle/java/javapath/java.exe' and ensure they point to the correct program.

Related

Gdb stops when viewing variables in Eclipse

When debugging a c++ app, and hitting a breakpoint, gdb terminates the debug session when I click on a variable to expand its content in the Variables panel.
The displayed message is: <terminated, exit value: 0>gdb (10.1.90.20210103)
Printing the variable from the Debugger Console works correctly.
Debugging was working OK some weeks ago. The major changes that happen recently was a debian upgrade from 10 to 11 (bullseye), and an upgrade of the Eclipse version.
Activating gdb traces following where can I find GDB traces, I could see the commands sent to GDB, but no particular error before GDB stopped.
Any idea of what could cause this issue?
Eclipse Version: 2021-12 (4.22.0), Build id: 20211202-1639 running on linux debian bullseye.
I answer my own question.
After checking related answers, I suspect that the problem is linked to stl pretty printing in Eclipse (which was working fine before). I tried different version of Eclipse and gdb, and finally managed to fix the issue by using a previous version of gdb (8.3 instead of 10.1).
Here is the procedure that I followed (I'm not sure all steps are mandatory).
Reinstalled eclipse from scratch
Deleted the .metadata directory and recreated the eclipse workspace
Downloaded version 8.3 of gdb sources, and compiled it with python support ('./configure --with-python'). Note that libgmp-dev and python2.7-dev debian packages must be installed.
Copied gdb-8.3 somewhere under /usr/local/
Updated eclipse preference settings : C-C++/Debug/GDB and change GDB Debugger to the pach where gdb 8.3 executable was located under /usr/local/.
Checked in Debugger Console that the right gdb version is displayed. If this is not the case, you may have to set gdb using Debug As.../Debug Configurations/Debugger/GDB Debugger

How can I get Eclipse IDE to default to "Selected lines" in the Find/Replace dialogue when multiple lines are selected?

When working in Eclipse and hitting Ctrl+F with lines of code selected, the default behavior I expect is for the Find/Replace dialogue to open with the "Selected lines" option and, perhaps, either buffer contents or a previous search query in the "Find" prompt. On my home machine, what happens instead is the entire selection gets automatically copied to the "Find" prompt and Scope is reset to "All" instead of "Selected lines" every time.
I somehow do have this working by default on my work machine: "Selected Lines" scope option is chosen automatically when more than one line is selected in the editor.
Possibly unrelated: I do have CDT installed and I work mostly with C++ in Eclipse. Home machine is running Ubuntu 18.10, work machine is running Ubuntu 18.04.
I tried:
Re-downloading Eclipse, reinstalling CDT & cmake4eclipse
Changing to a new Workspace in Eclipse (without copying settings)
Searching high and low online for recipes on how to control this.
How do I change the IDE at home to the desired "Selected Lines" behavior?
[Edit 1 hour later]: I am now almost convinced the issue has to do with the Ubuntu version somehow. I'm running 18.04 on my Laptop (same as my work computer) and I just upgraded CDT & Eclipse Platform to latest stable versions (9.7 and 4.11/2019-03, respectively), which I have everywhere else. The new "wrong" behavior didn't appear. I will also start a thread on the Eclipse forums or perhaps even open a bug report. I don't want to reinstall the whole system or downgrade it (slim chance of success) just to get this back; if it's an Eclipse bug, I'd rather work on fixing it.
[Edit 2 days later] The bug did not manifest on a fresh install of Ubuntu 18.10. I still have no idea what was different on the 'culprit' machine. I ended up wiping the drive and reinstalling 18.04 on the same machine and the problem went away.

Eclipse Popping in Unexpected error [duplicate]

I recently decided to start trying Android app development, so I downloaded the Java SE Development Kit 8 (x86) for Windows (I got Windows 8 64bit, but my guide recommends getting the 32bit one), the Android SDK, and the Eclipse IDE for Java Developers (x86).
However, my Eclipse won't launch when I double click eclipse.exe! Instead, I get the following error message:
I tried adding Java to my Path variable in my Environment variables as suggested in some of the solutions I looked up, but it still doesn't launch properly.
Anyone know what else I can try? Also, if possible, please do not use super-technical vocabulary as I'm new to these kinds of stuff and will not understand you...thank you haha :D
I had the same issue and was trying to install different versions of JDK: 1.6, 1.7, 1.8.
It didn't help much.
The problem was resolved when I changed PATH variable by removing
C:\ProgramData\Oracle\Java\javapath;
In command prompt I also ran following commands:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH%
But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH.
I know exactly how to solve your problem. Go to search and put in environment, a prompt will come up and ask you to "Edit environmental variables for your account" click that and a window will pop up. There will be the current paths which are running on the top (you should have your JDK version running, mine is 1.8) and on the bottom part there will be paths to choose from. Select (on the bottom part) the java path and delete it, then click okay. This should work.
If it didn't work, You may also add a new path to the java bin folder which worked for me.
Here is an alternative:
As described here, make sure that you have the -vm option set in your eclipse.ini file.
It must be an absolute path and on 2 separate lines:
-vm
<Absolute Path>\javaw.exe
Save your .ini and relaunch Eclipse
One line answer, remove 'C:\ProgramData\Oracle\Java\javapath;' from your path variable. It will start to work.
Most errors with starting eclipse happen due to multiple JRE or JDK version which makes the installer go nuts.
Solution: Go to Control Panel -> Uninstall Programs
If you're running 64-bit java, then uninstall all Java without the 64bit indicator. If 32-bit, then uninstall all that have 64-bit
It works like magic!
What worked for me was having installed adoptopenjdk11 using Chocolatey package manager:
choco install adoptopenjdk11

VSCode ran once on install, won't run or install again

I'm running this on Windows 7 SP1 with most (if not all) current patches. I have administrative permissions on this machine.
The first time I ran VSCodeSetup.exe, it ran the installer for several minutes then launched the actual application.
I got called into a surprise meeting, so I closed it thinking I'd look at it again later.
However, when I returned to my computer and tried to launch it, I found no evidence that it was actually installed... no desktop icon, no entry in the start menu, no Explorer integration...
I tried running VSCodeSetup.exe again, but all it does it show the installer screen for a split second, which then vanishes.
Since then, I've tried the suggestions outlined in VSCode Installation Failed - Failed to extract installer to install the application, even going so far as to run Update.exe --uninstall followed by running VSCodeSetup.exe again, but nothing has worked.
I even tried disabling my antivirus software and running the installer again, to no avail.
Does anyone know what I can do to get VSCode working again?
According to the comments and answers to Install VSCode in a specific folder, Visual Studio Code installs itself to %LOCALAPPDATA%\Code on Windows.
While I'm not sure why it didn't register itself with Explorer, I can at least create a shortcut to %LOCALAPPDATA%\Code\bin\code.cmd (with icon %LOCALAPPDATA%\Code\app.ico) to get it working again.
Or remove the directory entirely and run VSCodeSetup.exe to install it again, which still doesn't add Explorer integration... but this time at least the PATH now has code in it.
On windows VSCode is installed as Code.exe and its located in your
C:\Users\<windows-user>\AppData\Local\Code\app-<version-number>\Code.exe
or
C:\Users\John\AppData\Local\Code\app-0.5.0\Code.exe

Can't run eclipse on netbook MSi wind! HELP

I just got this MSI wind netbook and tried to run eclipse on it. I installed JDK6 on the netbook already. Whenever I open eclipse there is nothing show up on the screen except a "warning sound" that alerts. What is the problem here?
ps.I just started learning java.
Most likely the Eclipse starter program can't find where you installed Java. Since Eclipse is a Java program, it needs a JRE installed (comes with the JDK typically) to run. Assuming you're running Windows on your MSI Wind, check to make sure the java executable is on your path in your computer environment settings (windows key + printscreen button, or windows key + pause button are the shortcuts to open the computer properties dialog if I remember correctly. Then go to advanced).
You can test if java is on the path by opening a cmd.exe shell window and typing 'java'. If it says it cannot find java, then you need to fix the path.
See this link for additional troubleshooting details: http://www.eclipsezone.com/eclipse/forums/t99010.html
You could try reinstalling the JDK. Perhaps having it on a different disk than the default (D: versus C:) is causing some trouble? It certainly isn't a problem with the hardware, I'm running Eclipse on Windows on an MSI Wind.
Use "Add/Remove programs" in the control panel to remove the java versions you have installed.
Then visit "java.com" and use it to install Java, and verify that it is working. You do not need more than that to use Eclipse.