In applications based on NetBeans Platform 7.2, it is possible to replace the ModuleInstall classes with this code:
import org.openide.modules.OnStart;
import org.openide.modules.OnStop;
@OnStart
public final class Installer implements Runnable {
@Override
public void run() {
System.out.println("enable something...");
}
@OnStop
public static final class Down implements Runnable {
@Override
public void run() {
System.out.println("disable something...");
}
}
}
My problem is that, after obfuscation, the class loader does not find the annotated classes.
In the Proguard configuration I added (as suggested here)
-keep @org.openide.modules.OnStart class *
But apparently this is not enough or it does not work.
Does anybody have a suggestion?