Infinitest: A continuous test runner for Java.

Infinitest is a continuous test runner for Java.

Infinitest is an Eclipse plugin that runs the JUnit tests instantly when you save a Java file. Check out the demo above. It smartly runs only the test affected by the file you just saved. This is cool. You can immediately know if you broke something as soon as you save your code. Of course, your test cases should be comprehensive. Improving Works developed this plugin and has released it as a open source project.

Eclipse Plugin: StartExplorer


When I am working with Eclipse quite a few times I would copy a file’s path or want to open a location in Command Prompt to run some scripts. This is always cumbersome. I have to go to the properties and copy the path, go to command prompt, cd to the location…

StartExplorer is a nice plugin that does all of these and more. The screenshot should say a lot… Options like show resource in explorer, start cmd.exe here topped with keyboard shortcuts. Saves a lot of time for me everyday. You can create custom commands too.

Portable Eclipse and Portable Java

I like portable software. I carry around a bunch of them in my flash drive. I just found out that both Java and Eclipse are available as portable versions at The Java version they have is Java 6 update 14 but Eclipse is stuck at 3.4.2.

Eclipse uses portable Java, so Java need not be installed in the PC to run it. Nice. The portable version has some trouble finding the workspace but once you correct the path it works fine.

I updated the Eclipse binaries in to the just released 3.5 and it work great too. Nice way to take Eclipse and your work with you.

Eclipse Tip: Fix your Javadoc

Eclipse’s Java compiler has the ability to process Javadoc comment and validate them. You can set Eclipse to warn about malformed Javadoc comments. Just go to Java > Compiler > Javadoc or Project > Properties > Java Compiler > Javadoc for project specific setting to enable this.

Once enabled you will see warning like below with the ability to Quick Fix (Ctrl + 1) them. Neat.

Eclipse Tip: Structured Selections

Eclipse has a great set of keyboard shortcuts speed things up. Structured Selection shortcuts are a great way to select enclosing identifiers or adjacent statements.

Take the following example. When the cursor is on the variable aFile in the second if statement. Just press Alt+Shift+Arrow Up to quickly select the variable aFile. Press Alt+Shift+Arrow Up again to select aFile.exists(). Likewise the selection can be expanded to aFile.exists() && aFile.isFile() or the entire if statement.

Pressing Alt+Shift+Arrow Down reverses the cycle.

Changing Java AppEngine’s port number

I have been playing around with Google’s Java AppEngine. By default the local development server starts up in port 8080. This kind of messes with my development setup. Every app server I use Weblogic, Tomcat… uses this port by default. To change the port number in eclipse go to Run>Run Configurations…>Web Application><AppEngine Project Name>. In the main tab you can change the port number.

Java AppEngine Port Eclipse.png

If you are running the application from the command line go to <app engine home>/config/user/ant-macros.xml and change the port number in the “dev_appserver” macro attribute.

Java AppEngine Port CL.png

If you are just using the Eclipse plugin for AppEngine the SDK is located at <eclipse home>\plugins\\appengine-java-sdk-1.2.0.

Java rides on Google App Engine


Finally cloud computing comes to Java developers. Dot Net got it with Azure. Now Java has got support from Google in its cloud platform AppEngine.

The great thing about Google’s implantation is that it is not just supporting Java the language but also parts of Java the platform. So Java developers do not have to relearn an entirely new programming stack. Here are the Java standards supported:

  • Java Servlet API
  • Java Server Pages (JSP)
  • Java Data Objects (JDO)
  • Java Persistence API (JPA)
  • javax.cache
  • javax.mail
  • Web Application Archive (WAR)

They also support Eclipse IDE with Google Plugin for Eclipse.

Java AppEngine Project.png

Google is providing an early look at the Java support for the first 10,000 developers. To get access register here. I registered and am waiting for the confirmation email. :-)

Eclipse Tip: Block Selection Mode

Eclipse Tip Block Selection Mode.png

Every once in a while I would open up a source file in Notepad++ to copy/cut text using the block selection mode. Now I can do it from within Eclipse (3.5 M5 and above). The block selection mode can be toggled using the toolbar icon highlighted above or using the shortcut key Alt+Shift+A. Nice addition to the Eclipse editor.

I would have liked it to work just like Notepad++ where I just hold down Alt key and do the selection in block mode but this would work too. :-)