IntelliJ Android Test java.lang.NoClassDefFoundError: junit/textui/ResultPrinter


A short post for those who are wondering if I’m still alive. I got an error trying to run unit tests in an Android project under IntelliJ Idea and I got stumped. After a few minutes of Googling it dawned on me that I had chosen to run the test using a JUnit run configuration instead of an Android run configuration. That is when I right clicked the test method, my mind insisted on chosing the more familiar white window-looking icon with the red and green arrows instead of the Android icon, also with red and green arrows. I was associating the android icon with execute apk and not run tests. I now notice the little chevron-looking arrows and realize they refers to the red, green, refactor life cycle of development.. duh!

JNI, C++, Idea, and Netbeans looks good


I’ve been trying to get comfortable with C++. I’m finding quite a few native libraries that I need to talk to… programmatically. So I tried GEdit. Then I moved on to Windows and Eclipse. Everytime I want to install an Eclipse plugin I somehow find it easier to just grab an Eclipse bundle. (Plugin conflicts can burn so much clock.) Grabbing the Eclipse CDT, I found myself accidentally expanding and overwriting my Blackberry Eclipse install. (I always expand to C:\eclipse, it’s just a habit.) Frustrated, I decided to boot back into Linux and try Idea. I tried out the C++ plugin under Idea and had some minor trouble because there’s no documentation on it. I then tried KDevelop. Then something came over me. I decided to try out Netbeans. Netbeans…

Once upon a time there was an IDE I kinda liked. It was Forte (based on Netbeans). That was my first Netbeansy experience. Back then I was satisfied but then I found Eclipse and later got hooked on Idea. Netbeans was something I always toyed with here and there. I liked it but it lacked the refactoring support in Idea. Still it was kinda cool.

Fast forward a couple of years and now I’m all about Eclipse and Idea. I use Eclipse only because others force it on me. RIM tools are built for it, most people in my company swear by it. Every time I need to do something slightly different there seems to be an Eclipse bundle for that. It’s pretty full featured only falling behind Idea in a couple of spots. It’s just a pain to configure/setup. Idea has always been my tool of choice. If I could write ObjC in Idea I’d pitch XCode in a minute.

Today I tried Netbeans for the first time since it turned 5. I almost fell out my chair when I instinctively hit Alt+Enter to fix a syntax error. It worked! Just like Idea! Then I started looking at the right click and refactoring menus. I got really happy! Netbeans is now starting to feel like Idea felt back in the day. To be honest, Idea has been giving me lots of trouble these days with plugin “Blame this plugin” error pop-ups and the AWT_TOOLKIT thing that causes the text area to become uneditable. Overall Netbeans is looking much improved! I am totally impressed… I want to write more about both, my experience with Netbeans and my use of the C++ plugin under Idea.