eclipse crashing with intellisense - eclipse

Eclipese crashes on one (and only it appears) intellensense.
typing "Display.getW" (towards the Display.GetWidth() function) as I type W eclipse reproduceably crashes. Trying random other functions and classes yield no problems.
Any ideas as to what this might be?
Eclipse Info: Eclipse Java EE IDE for Web Developers.
Build id: 20100218-1602
Eclipse Galileo
Edit: Using windowsXP

The only bugs related to a crash on auto-completion all mention Linux platform and an issue with xulrunner library.
See for instance bug 236724:
You don't need to download an older version of xulrunner since the problem is merely that the 64bit version of the library is being loaded rather than the 32bit library.
To rectify this, just add the following line to your eclipse.ini file which points to the 32bit version of the xulrunner library:
-Dorg.eclipse.swt.browser.XULRunnerPath=<path_to_32bit_xulrunner_lib>
On RHEL5 for example, the path would be /usr/lib/xulrunner-1.9.
So you would in this case either need an older version of xulrunner, or fixing its path.
On Windows, on the other hand, that may be a good opportunity to fill in a new bug report.
Update February 2012, Raedwald mentions in the comments:
The relevant Eclipse FAQ "Can I specify which XULRunner installation gets used?"
This can also fix the problem if you provide as the XULRunnerPath a path-name that does not point to an xulrunner library directory.
What happens is that Eclipse instead falls back to using an internal renderer.
I believe this is the only solution if your O/S (such as RedHat 5.8) upgrades you to a FireFox version that uses xulrunner-2 but does not provide webkitgtk.

This, and related problems, are caused by incompatibilities between Eclipse and xulrunner, which is a component of Fire Fox. I came across this problem today, after updating Fire Fox on my RHEL 5 development computer.
The "intellisense" (content assist) feature, and other features of Eclipse, are a rendering of HTML. Eclipse tries to hand-off this rendering work to a system component. If your web browser is Fire Fox, Eclipse traditionally uses xulrunner, which is intimately associated with Fire Fox. It does so by calling a C API through a native library. However, that API is subject to change by the Mozilla developers, and different versions of xulrunner have had incompatible APIs. In particular, Eclipse can not use "xulrunner 2", which is the version in recent versions of Fire Fox.
Newer versions of Eclipse try not to use xulrunner at all, but instead try to use webkitgtk. However, if that is not present, or Eclipse is configured not to use it, Eclipse will fall back to using xulrunner. Which can then crash, because Eclipse does not detect that the available xulrunner is incompatible. The Eclipse developers recognize this as a Bad Thing (it is Bug 262929), but it no yet fixed (still in Eclipse 3.7).
Therefore, if webkitgtk is present on your computer, it might be better to tell Eclipse to use it. The Eclipse FAQ says how to do this: set the Java property org.eclipse.swt.browser.UseWebKitGTK to true. You can do so in your eclipse.ini file (as told elsewhere) by adding the line -Dorg.eclipse.swt.browser.UseWebKitGTK=true at the end of the file.

Related

How do I know if a software is 64bit or 32bit (x64 or x32)

I wanted to install J2ME and configure it with Netbeans. I followed two different tutorials word by word but somehow mine would give me many errors. After so much searching I realized that the JDK, Netbeans and J2ME must all be of the same level ie. all to be of x32 or all to be of x64. Now, how do I know what level is each of them at?
How do I know if NetBeans is x32 or x64, as well as JDK and J2ME?
I am using JDK 1.8, Netbeans 8.2, J2ME 3.4
For Java, you can do java -version, and it'll tell you what version you have.
I did a quick look around for the other two but couldn't find anything immediately. However, if you search something like "check bit version for Netbeans/J2ME" then you might get it.
Another way to figure out would be based on your OS. Depending on how new/old it is, it might require certain bit version. You probably installed the correct one (or you should uninstall and re-install the correct one based on their respective installation guide), so you should know what bit version when you first installed.
For Netbeans and J2ME just open them, then open the Task Manager. On the list of Apps, the version of the software is shown as shown below.
About JDK, Open your C Drive and look for the installation folder of your JDK. If it is installed in the Program File folder then it is x64, if it is in the Program File(x86) then it is x32.

Eclipse is not starting on macOs

I have an issue with Eclipse,
Eclipse macOS High Sierra version 10.13.6
I keep getting JVM terminated exit code=1
I have tried too many times but the response is same after launching it.
I have downloaded it from Stanford's SEE section and still unable to launch. The error message is here.
I downloaded your course material, and it does indeed contain a really old version of Eclipse - as greg-449 pointed out, there's no way this is going to work on macOS High Sierra. Really surprised instructions from 2007 haven't been updated, but that's another matter.
It would seem that your course just requires Java, so you can use the automated Installer that you find on this page: https://www.eclipse.org/downloads/ and then choose the Eclipse IDE for Java Developers in the wizard. Or you can download that package directly here, and install it.
Looking at your course material, it does appear that they have a custom plugin that makes regular Eclipse actions easier to execute, by adding a number of buttons to the Eclipse toolbar, you won't find these in a vanilla install. If you can find that plugin, you could try to install it into this version of Eclipse too, it might still work. If not, you can perform those steps manually - this video will help, as he shows you how to import and run these projects without those plugins, it's not hard!
It's not possible to say if the plugin adds functionality beyond what is normally possible in general Eclipse distributions, but I doubt it does. Good luck!

ANTLR and Eclipse (or any decent IDE)

I have been using ANTLR with Eclipse for some time using the ANTLRv3IDE plugin. While it is not perfect, and a bit outdated, it does its job reasonably well.
Now I am looking to switch to ANTLRv4 for another DSL that I am creating. However, Eclipse support seems to be extremely thin. I decided to try out ANTLRWorks, which is a NetBeans plugin, but I could not get it to install (it seems to be locked to specific dated versions (201302132200 while I have something newer, still 7.3 as docs say) of dependencies).
So, the question: Has anyone set up any Java IDE (preferably Eclipse, but I could be persuaded to switch if support is good for something else) to integrate with ANTLR? With integrate, I mean: code generate on save/keyboard shortcut and syntax coloring (at the very least). Code completion and other features are of course nice to have, but I could live without them for now.
I am well aware of Xtext and I have had great success using it for some projects, but unfortunately it does not fit the needs here (need no IDE support, need my own DSL model not based on ECore, etc).
I know ANTLRWorks can be run as a standalone application without a Java IDE, but that I consider to be a last-resort solution as it is extremely cumbersome to work this way (switch between application, files out of sync, no VCS support etc). I tried the other way around: to install the Java parts into ANTLRworks (which itself is a NetBeans distro), but it did not end well (it seems basic project support etc was stripped out of ANTLRworks).
Antlr4 plugin for Eclipse is here:
https://github.com/jknack/antlr4ide
ANTLRWorks 2 uses many non-public interfaces from NetBeans, which means it will always be bound to a particular version. The standalone download will always work because it bundles the dependencies itself.
The standalone build of ANTLRWorks 2.1 is available. This build includes support for ANTLR 4.1.
A new plugin build of ANTLRWorks 2.1 will be available once NetBeans 7.4 is released.
Moving forward, the code for ANTLRWorks post-2.1 is open-source under an LGPL license.
I think you have downloaded Netbeans 7.3.1.
Try download 7.3 from https://netbeans.org/downloads/7.3/ and install the ANTLRworks plugin there. (Link to the ANTLRworks Update Center: http://tunnelvisionlabs.com/downloads/nbupdates/nb73/aw2/updates.xml ).
Note that ANTLRworks v2 contains ANTLR v4.0, which is not the current version of ANTLR (4.1). So also download ANTLR v4.0 from the ANTLR download folder (The antlr-4.0-complete.jar file) and use it as library for compilation.
Now you can use nearly all things you wanted.
ANTLRv3IDE was opensourced. It should be compile-able for Juno. For stringtemplate (ST4) look at the Hastee plugin. It supports some of ST4 constructs.

Load an applet with specified older JRE version instead of latest installed

I wish to load my applet with JRE version 1.6.0_14. I have installed updates 14, 17, 24 and 35. I am using <object> tag with classid to load version with update 14.
in this case, the applet get loaded with update 35 and then again with update 14. on the java console on update 35 no error noticed and on Java console of update 1.6.0_14 we see the following error.
java.lang.ClassNotFoundException: sun/net/www/protocol/http/NTLMAuthenticationCallback
How to avoid higher version JRE to be used? And how to avoid the class not found error?
It is a serious security risk to run with a lower version of the JRE. Not when you run your own applet, cause you trust your own code. But others ought to refuse running it. You, yourself, should be wary when browsing the net with a browser that does not have the latest version of the JRE installed.
The JRE installer installs the Java Plugin into your browser and one single version of the Plug-in will always be started, independent of the Java version you request. The Plugin will then run the applet in the JRE that is specified in the classid of your object tag. The versions available to the Plug-in are configurable in the Java Control Panel.
This leaves the question of why your application won't run with a recent version of java 1.6. The Plugin got a big overhaul in 1.6.0_something into what's called the Next Generation Plug-in. Maybe that is what is giving you trouble. You can indicate that you wish to use the old Plug-in on your machine in the Java Control Panel on the advanced tab. ("Enable the Next Generation Java Plug-in (requires a Browser restart"). I'd think it's interesting to know if disabling the Next Generation Plug-in solves your issue.

Eclipse randomly exits after installation of Blackberry plugin/SDK

Since adding the Blackberry Java classes from their website into eclipse, I've had it where eclipse will randomly close, with no discernible pattern, rhyme, error or reason. Here is the environment/software packages that I am using:
Windows XP SP2
Eclipse v3.5.1
Blackberry Java Plugin v1.1.1.200911111641-15
Blackberry Java SDK 4.5.0.21
I've tried the usual steps of complete uninstall and reinstallation of Eclipse and the accompanying plugins on multiple systems with the same configuration, including one that had a fresh install of Windows XP SP2. Upgrading to Eclipse 3.6 didn't work (the plugin wont' install as it's the wrong version), nor the downgrade to 3.4 for the same reason. I also increased the heap size to 512 (system has two gigs of memory) as some research into Eclipse doing this type of thing with Groovy was resolved that way, but again, no dice. Eclipse works great when the blackberry plugins are not installed, and no entries of errors or issues in the event log are helping to show what the issue with these plug-ins might be.
So if anyone has ran into this issue, and even better, has a solution, I'd love to hear about it. Thanks in advance.
EDIT: An additional to my issue, autoComplete with the Blackberry SDK seems to make this extremely unstable, like almost a guaranteed crash. Is this fixable at all?
For anyone that loads this question up trying to find a solution, I've never found a fix. It seems to be a bug with this version of the IDE. If there is a fix, please post.
Did you try to downgrade Eclipse to 3.4 (Ganymede)? I experienced similar issues when I tried upgrading Eclipse to something greater than 3.4.2.
I think the problem is with the plugin, not the IDE. Eclipse has always been stable for me until I installed the BB plugin. Since then it crashes all the time. Since I've installed the release (non-beta) version of the plugin that was recently released I can't even get my project to build.
This could be a manifestation of this bug in Eclipse. Check your C:\eclipse directory for files like hs_err_pidxxxx.log. The file goes on to explain this error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x753ba053, pid=3144, tid=5820
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Client VM (16.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [USP10.dll+0x1a053]
I've been experiencing this as well. It's completely debilitating. It causes Eclipse to just up and crash out of nowhere (and programming in a language as verbose as Java without Content-Assist is insane).
The bug has been fixed in Eclipse 3.6M7, but unfortunately I can't get the JDE Plug-in to install in the latest release candidate.
This is a known issue with Eclipse 3.5.X and has been fixed for 3.6.0
Bug Ticket link on Eclipse Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=283503
Looks like we are stuck with this until the next update to the BB Eclipse plugin.