Blog Archives

Accessing Resources from java, and in particular from a jar

Using a resources bundle is a way to externalize code dependencies from text, images or other type of resources. As far as I know, it was pioneered by the Mac OS design, back in 1984. It allows changing elements in

Posted in Java, Programming, Utilities

Decompiling an Android App

If you have an apk, there are several tools for reverse engineering it. A first options is apktool, which transforms the apk in a directory structure. The resources are there, so one can examine them, and also change some and recompile.

Tagged with: , ,
Posted in Android, Java, Programming

Running Java 6 on a Mac, after upgrading to Java 7

What a mess! A program compiled with Java 6 does not work on my Mac after upgrading to Java 7. The message I get is Exception in thread “main” java.lang.NoClassDefFoundError: com/apple/eawt/CocoaComponent The problem is that com/apple/eawt/CocoaComponent class is a standard

Posted in Java

Add a timestamp to a Java application

Often in the “about” section of an application, the version number is reported. It is a good idea to add to the version number also a timestamp that states when the app was built. There is an easy automatic way

Posted in Java, Programming

Accessing EJBs on a remote JBoss AS 7.1 from a web application

Application servers are used (among other things) to ensure scalability of a web site. Although they typically offer a all-in-one solution (with embedded servlet-enabled web engine, embedded JNDI registry and other services), at deployment they should be used on different tiers: one machine

Posted in Admin, Java, Programming

Using an external monitor with Java

A piece of code to create a full screen java frame without bar and unfocusable on a secondary screen. It can be used to generate a power-point-like presenter. GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); // find out which graphic devices are available

Posted in Java