I have created a Java application installer using install4j for Mac OS X. My application uses JDK 1.7.
I have set the JDK version in install4j properly as well.
I have also installed JDK 1.7 on Mac and when I type java -version
command on console it gives me JDK 1.7.
Application also installed successfully but I am out of luck, when I try to start the application it gives me this error:
Exception in thread “main” java.lang.UnsupportedClassVersionError: a (Unsupporte d major.minor version 51.0)
The above error occurs because it uses Apple's inbuilt JDK 1.6. I want app to use JDK 1.7 which is already installed on the machine.
Edit
Now I have created installer by selecting OpenJdk in jre option. Now it is not giving me the UnsupportedClassVersionError but now application icon blinks on the dockbar and goes.
Below is the cosole log.
5/23/13 11:16:47.777 AM com.apple.launchd.peruser.502[154]: ([0x0-0x92092].com.install4j.9409-6211-0940-9008.25[800]) Exited with code: 1 5/23/13 11:17:09.166 AM com.apple.launchd.peruser.502[154]: ([0x0-0x93093].com.install4j.9409-6211-0940-9008.25[802]) Exited with code: 1 5/23/13 11:17:12.400 AM com.apple.launchd.peruser.502[154]: ([0x0-0x94094].com.install4j.9409-6211-0940-9008.25[804]) Exited with code: 1
Please help me.