Install OpenFire on Mac

I have been trying to install openfire server(4.0.1 version) on mac OSX El Capitan (version 10.11.3) for development and testing purpose.

I also installed latest jre

I tried to run open fire from preference but always give error attached in screenshot

What is the solution to this error?

Thank you in advance.

Screen Shot 2016-03-07 at 11.00.04.png

I have the same issue but on Snow Leopard.

I have essentially downloaded the .dmg file opened it, clicked on the pkg file and proceeded through the wizard but upon trying to start OpenFire through the dialog on the System Preferences it tries for 3-4 seconds then just falls back to “Stopped” with no error output?

I am not even sure where to start looking for and error log or similar on this. Can anyone point me in the right direction please?

Spadeki

I have dug into this and found the openfire files in /usr/local/openfire and when I look in the log folder the stderr is showing the following error repeated over and over:

at: 2230: No such file or directory

cat: 2228: No such file or directory

cat: 2230: No such file or directory

cat: 2228: No such file or directory

Exception in thread “main” java.lang.UnsupportedClassVersionError: org/jivesoftware/openfire/starter/ServerStarter : Unsupported major.minor version 51.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)

at java.lang.ClassLoader.defineClass(ClassLoader.java:621)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

The “Unsupported major.minor version 51.0” appears to refer to a version of Java which corresponds to (Source: http://en.wikipedia.org/wiki/Java_class_file)

J2SE 8 = 52, J2SE 7 = 51, J2SE 6.0 = 50, J2SE 5.0 = 49, JDK 1.4 = 48, JDK 1.3 = 47, JDK 1.2 = 46, JDK 1.1 = ``45

But Java on my MAC claims to be “Java 8 Update 66” which I am assuming corresponds to version 52 which should be backwards compatible with Version 7/51 ?

Any thoughts out there, I am not sure how to proceed?

Best regards

Spadeki

So where to begin?

So I have found three separate issues that appear to prevented OpenFire running on my Mac (Snow Leopard) from the wizard version of the Openfire installer version 4.01… and it seems there is at least one more to solve to get it running from the console.

I am half expecting to find out I have done something stupid like running the installer without enough privileges or something (I am not much of unix guy).

So after digging around on the “Unsupported major.minor version 51.0” error as it pertains to the Mac it became clear that Apple are several versions of Java back on their Apple version of the JVM and perhaps the “Java 8 Update 66” was not equivalent to Oracles JSE 8… So the error was being thrown because I am indeed trying to run a new Class version on an old version of Java? The stuff I found suggested I go an look in /Library/Java/JavaVirtualMachines to see what version of JRE I am running and when I looked there was nothing, No Oracle Java.

So I went to Oracle’s site and downloaded the latest Java SDK version 8 and installed and low and behold I now have a jdk in /Library/Java/JavaVirtualMachines.

I go back to the console in SystemPreference to fire up the server and nothing, same issue…

I poke through the OpenFire directory in /usr/local/opefire and poke around and find the script openfire.sh, I have a look to check if I could execute it and realise that everything installed the openfire directory is set with rwxr–r-- I am no expert but I realise that the sh files at least will need to be executable so I chmod 755 the directory to get it all executable and go back the SystemPreferences console and try to fire it up. Again nothing.

I open up openfire.sh in my text editor and it looks like it should start up the server directly bypassing the SystemPreference console.

I try running opefire.sh script to fire up Openfire, nothing… error log still showing version 51.0 problem

I review the openfire.sh script and realise the line that points to JAVA_HOME is pointing to the Mac JRE still:

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home

I comment this out and replace it with the new ORACLE JRE path:

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home

The script runs and I follow the link produced on the command line the server appears in my browser ready to configure!!!

Phew, that is some painful stuff.

I stop the server on the command line and try and start the server through SystemPreferences console. Nothing!!! version 51.0 problem again…

This is my final frontier, does anyone know where the config the SystemPreferences openfire console stuff lives and how I can get it to point at the right VM.