static
{
org.eclipse.swt.internal.image.PNGFileFormat.class.getName();
org.eclipse.swt.internal.image.JPEGFileFormat.class.getName();
org.eclipse.swt.internal.image.WinICOFileFormat.class.getName();
}
In the case of SWT, this is not yet enough. These classes are protected, not public.
So just create a dummy class in the org.eclipse.swt.internal.image package and add
the initializer to that class...
| Setting | Description |
|---|---|
| Main class* | You have to specify the class of your application that contains the main() method. This the same as when calling "java foo.bar.MyMainClass". |
| java.library.path | You might want to specify the java.library.path. |
| Use CNI instead of JNI | Check this box if you use native code by CNI instead of JNI. |
| Windows* | Specify if a binary for Windows has to be created. If yes, you have to provide a location for it. |
| Icon | On Windows, you can set an icon for you executables. It will be visible in the Windows Explorer. |
| Hide console | On Windows, a console will be opened when executing the compiled application. While this is needed for console applications, it is mostly unnecessary for GUI applications. It can be hidden with this option. |
| Linux* | Specify if a binary for Linux has to be created. If yes, you have to provide a location for it. |
| Mac | Not yet supported... |
| Omit stripping | Symbols of the binary will be stripped by default. This won't need additional time and the binary will be much smaller. You can turn it of with this option. |
| Omit packing | The binaries will be packed by default. This needs a lot of additional time but will result in much smaller binaries. You can turn it off with this option. |
| Disable optimization | The code to compile will be optimized by default. This needs - depending on how large your program is - a lot of additional time and a lot of RAM. In return, the compiled binary will be smaller and faster. You can turn it off with this option. |
| Setting | Description |
|---|---|
| Custom GCJ flags | Here you can specify additional flags for GCJ. Multiple flags are separated by spaces or newlines. |
| Show used commands | If checked, the used commands for compiling the application will be shown during compilation. |
| Exclude GUI | You can exclude the GUI part of the class library. It gets pulled into the binary by default. This will result in much smaller binaries but you have to ensure that you do not use any of these classes. Else you end up with compilation errors. |
| Exclude JCE | You can exclude the "Java Cryptography Extension" of the class library. It gets pulled into the binary by default. This will result in smaller binaries but you have to ensure that you do not use any of these classes. Else you end up with compilation errors. |
| Add GNU regex | This is needed if there are invalid regular expressions in the compiled code. Without it, you will get this runtime error: java.util.MissingResourceException: Bundle gnu/java/util/regexp/MessagesBundle not found |
| Don't cache compiled jars | By default, compiled jars will be saved in the same directory as the jar. By doing so, it can be reused in later compilations (what is a real time saver). You can turn it off with this option. |