Where he blogs about his eclipse musings
Finding a Class in a ton of jars
This is how I do it. Create a script I call it findclass in some location on the path. /usr/local/bin is a good place, I prefer $HOME/bin. Remember to chmod this script to 755.
#!/bin/bash
find -iname "*.jar" | xargs -i unzip -l {} | less
In case you are new to less, here’s how you navigate:
1. To find a particular class say com.xyz.abc.MyClass, you type:
/com.xyz.abc.MyClass
2. To find what jar contains this class, you type:
?Archive:
No trackbacks yet.
Java and Unicode monday morning blues
May 25, 2009 - 3:33 pm
Tags: eclipse, Java
Posted in Java, eclipse | No comments
Monday morning excitement. JUnit tests that pass in the IDE fail in ant and cruise servers running on all platforms.
java.lang.AssertionError:
Expected: a string containing “… text=Ç…”
got: “… text=Å…”
My immediate reaction was the encoding used by the JVM. Setting the “file.encoding” system property to UTF-8 did not help. Running the ant based [...]
Growl notifications from ant
July 9, 2008 - 9:29 am
Tags: ant, eclipse, growl, Java
Posted in Java, Open Source | 3 comments
If you use ant to run your builds, and would like to receive growl notifications about execution status, presenting Growl notifications for ant.
All you need to do is execute:
ant -listener com.google.code.ant.growlnotify.GrowlListener
And you’ll need is the growlnotify binary somewhere on your path, this is bundled with the Growl binary dmg.
Java 6 on the Mac, finally
April 30, 2008 - 1:32 pm
Tags: apple, Java, macosx
Posted in Java | No comments
So apple finally provided this update after a long time. You can download the update from http://www.apple.com/downloads/macosx/apple/application_updates/javaformacosx105update1.html.
Read more about the release notes at http://docs.info.apple.com/article.html?artnum=307403
Mockito – one of the better mocks
March 5, 2008 - 7:24 pm
Tags: Java, mock, mockito, testing
Posted in Java, Open Source | 2 comments
Now that I’ve got your attention. Mockito is not just better than the other mock frameworks out there, it’s infact the best out there.
After reading a lot of noise from fellow ThoughtWorkers in the recent past about Mockito. I decided to give a yet another mock framework a try.
Here’s what I ended up writing:
public class [...]
Port forwarding using IPTables
November 7, 2007 - 7:28 pm
Tags: adsl, firewall, iptables, linux, port-forwarding
Posted in General | 1 comment
I’ve got a UT300R2U ADSL router that has a really bad web based UI that did not let me setup some basic port-forwarding rules.
Thankfully the router was a linux based router with telnet installed on it. I was able to log in using the admin user, and set the following iptable rules:
#iptables -I PREROUTING -t [...]
Flash Player on 64-bit FireFox on Linux
August 1, 2007 - 2:07 pm
Tags: firefox, flash, flash-player, gentoo, kubuntu, linux, nspluginwrapper, sun-microsystems, Ubuntu
Posted in GNU & Linux, Open Source, Ubuntu, experiences, technology | 9 comments
Here’s how to get your firefox running on a 64 bit Linux machine to work with 32 bit plugins. I’ve tried this with gentoo, it should work with ubuntu or kubuntu or any other distro of your choice.
Download and install nspluginwrapper from http://gwenole.beauchesne.info/projects/nspluginwrapper/.
For ubuntu, there are some instructions on how to do this here (http://ubuntuforums.org/showthread.php?t=341727). [...]
Making Eclipse Plug-ins using JRuby or Groovy
July 27, 2007 - 10:49 am
Tags: eclipse, groovy, Java, jruby, Open Source, ruby
Posted in Java, Open Source, eclipse, ruby | No comments
Read more about using JRuby or Groovy to write eclipse plugins here: http://dev.eclipse.org/blogs/wayne/2007/07/26/making-eclipse-plug-ins-using-jruby-or-groovy/
CCTray in Java
May 11, 2007 - 9:14 pm
Tags: cctray, eclipse, Java, Open Source, ruby, swt, ThoughtWorks
Posted in GNU & Linux, Java, Open Source, eclipse, technology | 1 comment
Akshay and me have been pairing since a couple of days to hack together a java version of CCTray written using SWT. This version of CCTray can connect to CCNET and cc.rb.
A lot of folks use *nix and the existing CCTray is not much help.
If you wish to use this pre-alpha release, feel free to [...]
Kill the mouse, and forget having to remember keyboard shourcuts :)
May 8, 2007 - 10:13 am
Tags: eclipse, intellij, intellij-idea, Java, keyboard-shortcuts, Open Source
Posted in Java, Open Source, eclipse, technology | No comments
As an Eclipse plug-in developer who’s recently moved to using JetBrains’s IntelliJ Idea; I must agree that IntelliJ has excellent support for having to use the keyboard. I haven’t had to use the mouse much when I’m using IntelliJ.
On the down side — I’ve to remember all the keyboard shortcuts. This is hardly an option [...]
Composite Logger for Ant
April 4, 2007 - 7:24 pm
Tags: ant, Java, logging, technology
Posted in Java, Open Source, experiences, technology | 3 comments
When doing long builds in CruiseControl, ant build logs are generally logged using the XmlLogger.
In certain cases, say for example when the build is taking longer than usual, and needs to be killed/stopped, the XmlLogger does not flush contents to disk.
It would be nice if there is some sort of a composite logger than can [...]
July 26, 2007 - 1:08 pm
How’s this:
find . -name “*.jar” | xargs -i unzip -l {} | grep -E “^Archive:|$1″ | less
Example:
> findclass Enclosed
Archive: ./aspectj-1.5.3.jar
Archive: ./aspectjweaver.jar
Archive: ./junit.jar
651 27-03-07 14:22 org/junit/runners/Enclosed.class
Fewer things to navigate, easier to find the archives containing the matching classes.
July 26, 2007 - 1:29 pm
That’s an interesting way as well, actually