Skip to content

Monthly Archives: July 2010

Get the PID of a running Java process using only BASH tools

22-Jul-10

I need to get the PID of a running Java process, in this case Glassfish 3 to see if it is running before I run some asadmin commands. ps -ax | grep "java -cp /opt/bmam/glassfish" | grep -v "grep" | cut -d " " -f 1 26306

How to force changes to /etc/hosts to take effect in OSX

15-Jul-10

If you make changes to your /etc/hosts file and want the changes to take effect immediately without having to reboot issue the following command at in the Terminal dscacheutil -flushcache

Migrating Java Projects to Maven 2

13-Jul-10

Looks like Maven 2 is pretty much inline with the generic Ant based build system I have been using for the past 8 years. So I am going to take the plunge and start using Maven 2 so I don’t have to keep maintaining my system. Less time maintaining a build system means more time [...]