Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT crashes java

Tags:

eclipse

crash

I downloaded fresh Eclipse CDT, added a C++ project, and after a few minutes eclipse crashed. It said "javaw.exe returned -1", and Eclipse crashes silently.

The .metadata/.log file sometimes contains nothing, and sometimes contains a few Java exception in the C/C++ indexer which certainly doesn't explain a silent crash.

How can I further debug this phenomena? I've no clue what to look for next.

I'm running the latest stable Eclipse CDT (7.0.1), with Windows 7 64bit, with the latest stable JDK (6u24).

like image 348
Elazar Leibovich Avatar asked Feb 19 '11 22:02

Elazar Leibovich


People also ask

Can you Run C code In Eclipse?

Eclipse is popular for Java project development. It also supports C/C++, PHP, Python, Perl, and other web project developments via extensible plug-ins. Eclipse is cross-platform and runs under Windows, Linux and Mac OS.

What is Eclipse CDT builder?

The CDT is Eclipse's C/C++ Development Tooling project. It is an industrial-strength C/C++ IDE that also serves as a platform for others to provide value-added tooling for C/C++ developers.

How To setup c++ Environment In Eclipse?

Launch Eclipse → Help → Install New Software → In "Work with" field, pull down the drop-down menu and select "Kepler - http://download.eclipse.org/releases/kepler" (or juno for Eclipse 4.2; or helios for Eclipse 3.7). In "Name" box, expand "Programming Language" node ⇒ Check "C/C++ Development Tools" ⇒ "Next" ⇒ ...


1 Answers

On my machine, Windows 7, I have Eclipse in C:\Users\james\eclipse. In that folder, after crashes, I see error files like "hs_err_pid4308.log" that have lots of useful information.

For my crashes, it lead me to https://bugs.eclipse.org/bugs/show_bug.cgi?id=333227 where I found a suggestion to add -XX:-UseCompressedOops to the end of my eclipse.ini file. The ini file for my 64 bit Windows 7 non-crashing Eclipse Helios Service Release 2 Build id: 20110301-1815 with CDT now looks like:

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:-UseCompressedOops
like image 63
James Moore Avatar answered Oct 12 '22 23:10

James Moore