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:


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:


Thanks to this person:

[SOLVED] ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

If you’ve just installed mysql community server (in my case on Fedora 23) and you’re getting:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

The only thing that helped was:

edit your /etc/my.cnf file and add the line "skip-grant-tables" without quotes

After that you’ll be able to do:

 mysql -uroot -p

and type the new password. Then:

mysql> use mysql; mysql> UPDATE user SET password=PASSWORD("YOUR NEW PASSWORD HERE") WHERE User='root'; mysql> flush privileges; mysql> quit

By the way, if you login back into mysql and then try:

mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

You might want to:

mysql> SET PASSWORD=PASSWORD('your new password');
Query OK, 0 rows affected, 1 warning (0.00 sec)