Eclipse remote debug (with ant example)

Sometimes you cannot start your program from within eclipse to be able to debug it. Or even worse, you run your application on a remote server where you don’t have the sources or the ability to debug it on that machine. In this case you can use the remote debug capability of the JVM. For this:

1. Start your program with these VM arguments:

-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9000

If your application is started as an Ant task then:

<java dir="${running.dir}" jar="${jar.location}" fork="true" failonerror="true" >
         <jvmarg value="-Xdebug" />
 <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9000" />

For address, specify the port you know is open and can be accessed from outside.

2. In eclipse open the project which contains the sources and click Debug -> Debug Configurations. Double click to create new debug configuration.
Set the correct Connection Properties: Host (the target host) and Port the port you specified earlier.

3. Click apply and debug…

[SOLVED] Eclipse create new class slow in Fedora

If you’re having problems with eclipse under Fedora, then it might be due to GTK3. So start eclipse like:

./eclipse --launcher.GTK_version 2

It must also work from eclipse.ini, but you need to make sure to put 2 in the next line:

-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.GTK_version
2
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m

Thanks to this person:
https://hedayatvk.wordpress.com/2015/07/16/eclipse-problems-on-fedora-22/