# Problem with jar file using diablo jdk



## sherkhan (Jun 25, 2010)

Hi,

I am in the process of migrating our network admin system to FreeBSD and one of the critical requirements is being able to access our KVM (keyboard video mouse) switch from this system. The vendor has provided a remote client which is in the form of a jar file which is not getting installed.

I am running FreeBSD 8 and I have copied diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2 to /usr/ports/distfiles and compiled the same. This was done earlier to make the java plugin work in Mozilla Firefox which works just fine. 

The jar file when run with 'java -jar <filename.jar>' opens a gui and walks me through the process and exits without any errors and states that the app is installed, but when I open the folder where the files are supposed to be installed, I see only one Uninstall folder and nothing else. The same jar file installs perfectly under Linux (FC10) and the install folder has a host of subfolders and files which are not installed under FreeBSD.

Is there a specific process for installing jar files? Where are errors written when programs are installed? (I didn't find any in /var/log/messages). I am a newbie wrt java and would like to know what environment variables are to be set (and to what) for the java installation (like JAVA_HOME,CLASSPATH etc.

thanks in advance.


----------



## graudeejs (Jun 25, 2010)

Where it was supposed to install, did you install as privileged user?
Did you have enough privileges to install where you wanted to install.


----------



## sherkhan (Jun 25, 2010)

Thanks killasmurf86, for your prompt reply!

I installed as a user who is member of wheel group. It installs in a folder in my home directory (but only a single uninstall folder appears in it).

Then, I tried installing as root but got the following message:

```
spotenadm# java -jar mpc-installer.MPC_5.0.6.5.29.jar 
No protocol specified                                 
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
        at java.lang.Class.forName0(Native Method)                                                                  
        at java.lang.Class.forName(Class.java:169)                                                                  
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)                    
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:89)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at java.awt.Toolkit$2.run(Toolkit.java:836)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:828)
        at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:120)
        at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
        at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
        at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:537)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:577)
        at com.izforge.izpack.installer.GUIInstaller.loadLookAndFeel(GUIInstaller.java:265)
        at com.izforge.izpack.installer.GUIInstaller.<init>(GUIInstaller.java:100)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at com.izforge.izpack.installer.Installer.main(Installer.java:47)
```

* Then I used sudo from my account (member of wheel) to install the jar file and by default it prompted to install (and got installed in) /usr/local/<its own dir>. But here again there is only one uninstall folder within.

BTW, in FC10 the jar file got installed as a normal user itself. Here I am able to use the application's full functionality.

I tried something else too..i ftpd the files (which were created when the jar file got installed) from the linux box into the bsd one under its corresponding directory (as in * above), and edited the startup script for path to bash. When the startup script is run, the application window opens with following mesg on command line:


```
[uvs@spotenadm ~/Raritan/Raritan Multi-Platform Client/5.0.6.5.29]$ sudo ./start.sh

path.conf not found

JAVA_HOME has not been found

[uvs@spotenadm ~/Raritan/Raritan Multi-Platform Client/5.0.6.5.29]$ LoggerThread started...
```

and in the status bar of the app, the info given is that the app is loaded, but still not able to get some options to work.

Thanks


----------



## OH (Jun 25, 2010)

Depending on how bleeding edge this app is, you might have better luck using the openjdk6-port. It solved my issues installing Glassfish 3


----------



## sherkhan (Jun 29, 2010)

Tried the openjdk6 port, tried the jdk15 port as well. Googled and learnt about the evn settings for Java. Things still in square one  Will give it one more try....


----------

