On this page, we will explain how to install Joxy and how to apply it to a program.
Joxy should work on all Linux distributions that have Java 6 or 7, but the exact instructions differ for each distribution. Therefore we are only able here to outline the steps.
You should first get Joxy, in either one of the following ways:
You should put the .jar file that you obtained in the Java class path. This can be done either with the -cp switch, and by putting it in the /lib/ext folder of your Java Runtime Environment (JRE). Because the first option is very error-prone, we recommend the latter option.
Now we have the Java code placed in the right directory, we still need to install the shared library containing the native code (the .so file). (This is not obligatory; the shared library only takes care of the native text rendering, and if it cannot be found, Joxy will fallback on default Java text rendering.) You will need to put the .so file in a folder on the Java library path.
Warning: We are not sure whether the pre-compiled shared library will work on other systems. If it doesn't, please try compiling it yourself.
You can apply Joxy to a program in multiple ways.
Using a command line switch. You can use the command line option -Dswing.defaultlaf=joxy.JoxyLookAndFeel when starting the application to switch the look and feel to Joxy. For example:
java -Dswing.defaultlaf=joxy.JoxyLookAndFeel -jar someprogram.jar
An application-specific way. Some programs set their own look and feel, and overwrite your command line options. An example is NetBeans. To use Joxy on NetBeans, use the -laf option that NetBeans provides itself.
Programming it in your application. If you want, you can provide your own applications with the Joxy Look and Feel. This can be done with
UIManager.setLookAndFeel("joxy.JoxyLookAndFeel");
Note: if you have compiled the shared library yourself, the compilation script will give you a list of directories on the Java library path. You can choose to put the library in any of these folders.
Warning: do not change the name of the shared library; else Joxy will not be able to find it.
If you want to use Joxy on all Java programs, you can use the Swing defaults file. If the file does not exist, you can create it. Now you can add lines in this file of the format
setting=value
where setting is one of the following.
swing.defaultlaf sets the default LAF to the given value. That is, if a program does not ask to set the LAF, it will use this setting. For example,
swing.defaultlaf=joxy.JoxyLookAndFeel
swing.systemlaf sets the system LAF to the given value. That is, if a program asks Java to use the native system LAF, it will use this setting. In the case of Joxy, this makes sense, because Joxy is actually meant to imitate the system's look-and-feel. For example,
swing.systemlaf=joxy.JoxyLookAndFeel
system.installedlafs lets you set the list of LAFs that Java knows that are available. This works a bit different than the first two options. Programs are able to ask Java which LAFs are installed. This way, they can create a list of LAFs, for example in a menu, so that the user can choose one of them. By using this setting, you can make Java aware that the Joxy LAF is available. The problem is, if you use this setting, you will override any LAF that was in this list by default. So you will have to enumerate all LAFs and appending Joxy, for example as follows:
swing.installedlafs=metal,nimbus,motif,gtk,joxy
swing.installedlaf.metal.name=Metal
swing.installedlaf.metal.class=javax.swing.plaf.metal.MetalLookAndFeel
swing.installedlaf.nimbus.name=Nimbus
swing.installedlaf.nimbus.class=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
swing.installedlaf.motif.name=CDE/Motif
swing.installedlaf.motif.class=com.sun.java.swing.plaf.motif.MotifLookAndFeel
swing.installedlaf.gtk.name=GTK+
swing.installedlaf.gtk.class=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
swing.installedlaf.joxy.name=Joxy
swing.installedlaf.joxy.class=joxy.JoxyLookAndFeel
Wiki: Compiling the source
Wiki: Downloading the source
Wiki: Using Joxy