EclipseStuff
From TechWiki
Installing instructions for Eclipse here...
Contents |
Remote Debugging
Attach to a remote process and debug it like a local application...
Argument
The arguments to add to the JVM when running your program is:
-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n
You might have to change the port from 1044 to something else if this is already used.
Attach Eclipse
In the debug window, between Java Application and SWT Application, there is a Remote Java Application, right click and select a new profile.
Select the project, the host your program is running on and the port you choose when you started your program.
Then click Debug to connect to your program.
Creating JAR files
Right click on your project in the Package Explorer and select Export. Choose the JAR option and select the project and resources you want to pack int to the JAR.
To run the JAR file from a terminal, see Java Stuff.
Configure KDE Panel Button
If you wan to add a button that runs Eclipse to your KDE panel, you need to set some environment stuff right. To start
Right-click panel and choose Add Application to Panel
then
Add Non-KDE Application
and edit the Executable: line to something like this:
export PATH="/usr/local/lib:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin"; /usr/local/eclipse -data /home/work/ –Xmx2048M
You find the eclipse icon in System Icons, Applications.
Launch Configuration
Eclipse saves the launch configurations under
.metadata/.plugins/org.eclipse.debug.core/.launches/
and the history under
.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml
Problems
Speed
And suddenly, Eclipse is really, really slow...
Before you spend ages profiling and stuff, try
deleting all break points and watch expressions.
Can already help get you back the speeds you were accustomed to...
Project is Missing Required Java Project
And suddenly your projects all have errors after restarting eclipse. The culprit is
Eclipse error: Project 'X' is missing required Java project: 'Y'
But project 'Y' is there :-/
Solution:
open Java Build Path -> Order and Export and delete project 'Y' from the list clean everything add project 'Y' back to the list
Opening Editor is Slow
Sometimes eclipse running on jaunty and older versions of (x/k)ubuntu is very slow to open new editor windows. This has somehow something to do with printer lists being loaded every time.
Solution:
upgrade to eclipse35 galileo
where they fixed this bug.
Eclipse Unusably Slow
When starting up, eclipse complains about not being compatible with the gnome java version. Why the hell it defaulted to that is another question:-/
Solution:
go to the eclipse directory and ad a symbolic link called jre to the right java version
e.g.,
cd ./eclipse ln -s [path]/jdk1.6.0_12/ jre
Subclipse Corruption
Sometimes eclipse corrupts svn when upgrading.
Solution:
open terminal and go to directory of the offending project execute: svn update go the the project in the eclipse IDE and refresh
This should solve the problem and not have lost any current local modifications.
Eclipse Gone Mad
If you get bizarre exceptions like
java.lang.NoClassDefFoundError: Could not initialize class ...
although eclipse should be able to see the class, then, sometimes, you can be lucky if you force a rebuild.
To really force eclipse to do this:
Window -> Preferences -> Java -> Installed JREs -> and add a different JRE which you select
Thanks Vito for the tip...
