InstantJChem error

User 794797687e

22-09-2016 12:33:20

Hello,


Updating InstantJChem to 16.9.12.0 version results in an error window after launching it. I tried to uninstall and install again to no avail. I am on Mac OS X El Capitan 10.11.6.


java.lang.UnsupportedClassVersionError: com/chemaxon/ijc/form/api/WidgetContainer : 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 org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:266)
    at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:300)
    at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:227)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.im.ijc.core.api.actions.CurrentSelectionTextField.updateCurrentVS(CurrentSelectionTextField.java:145)
    at com.im.ijc.core.api.actions.CurrentSelectionTextField.access$000(CurrentSelectionTextField.java:49)
    at com.im.ijc.core.api.actions.CurrentSelectionTextField$1.propertyChange(CurrentSelectionTextField.java:75)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
    at org.netbeans.core.windows.RegistryImpl.tryFireChanges(RegistryImpl.java:304)
    at org.netbeans.core.windows.RegistryImpl.selectedNodesChanged(RegistryImpl.java:239)
    at org.netbeans.core.windows.WindowManagerImpl.notifyRegistrySelectedNodesChanged(WindowManagerImpl.java:1148)
    at org.netbeans.core.windows.WindowManagerImpl.topComponentActivatedNodesChanged(WindowManagerImpl.java:1348)
    at org.openide.windows.TopComponent.setActivatedNodesImpl(TopComponent.java:424)
    at org.openide.windows.TopComponent.access$400(TopComponent.java:125)
    at org.openide.windows.TopComponent$SynchronizeNodes.run(TopComponent.java:1827)
    at org.openide.windows.TopComponent$SynchronizeNodes.resultChanged(TopComponent.java:1809)
    at org.openide.windows.TopComponent$SynchronizeNodes.<init>(TopComponent.java:1799)
    at org.openide.windows.TopComponent.setLookup(TopComponent.java:1374)
    at org.openide.windows.TopComponent.associateLookup(TopComponent.java:1350)
    at com.im.workbench.project.simpleview.SimpleProjectViewTopComponent.<init>(SimpleProjectViewTopComponent.java:117)
    at com.im.workbench.project.simpleview.SimpleProjectViewTopComponent.getDefault(SimpleProjectViewTopComponent.java:189)
    at com.im.workbench.project.simpleview.SimpleProjectViewTopComponent.access$400(SimpleProjectViewTopComponent.java:75)
    at com.im.workbench.project.simpleview.SimpleProjectViewTopComponent$ResolvableHelper.readResolve(SimpleProjectViewTopComponent.java:277)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1066)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1786)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
    at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.readSerial(XMLSettingsSupport.java:549)
    at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:581)
    at org.netbeans.modules.settings.convertors.SerialDataConvertor$SettingsInstance.instanceCreate(SerialDataConvertor.java:424)
    at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentPersistentForID(PersistenceManager.java:571)
    at org.netbeans.core.windows.persistence.PersistenceManager.getTopComponentForID(PersistenceManager.java:681)
    at org.netbeans.core.windows.PersistenceHandler.getTopComponentForID(PersistenceHandler.java:489)
    at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:171)
    at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:81)
    at org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:234)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:162)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Thanks for your help.


Laurent

ChemAxon 26d92e5dcd

26-09-2016 09:07:28

Dear Laurent,


please see the release notes. IJC stopped support for Java 6 already some time ago and recent versions were finally fully migrated to Java 7, so Java 6 will not work. 


The error you report is caused by this. Please run your application with either Java 7 or Java 8. In case of Mac OS X, Java 6 unfortunately takes preference over other installed Java versions (this is due to Apple's Java support policies) and unless needed, Java 6 should be removed from the Apple system. If Java 6 is needed for some other applications, then IJC has to be started with --jdkhome startup option where you specify what Java Home to use (please see documentation on more details where to set this option up)


Wishing all the best


David

User 794797687e

29-09-2016 13:57:36

Hello dpech,


Thank you for your help. I installed Java 8 from Oracle and when I ask for Java version I got in Terminal


java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)


However, I got the same previous error when starting InstantJchem.


Also, I put this path in $IJC/etc/instantjchem.conf file to no avail,


--jdkhome="/Library/Java/JavaVirtualMachines/jre1.8.0_101.jre"


Regards,


Laurent

ChemAxon 26d92e5dcd

29-09-2016 14:49:03

Dear Laurent,


your Java home settings is incorrect, so IJC did a "fall back" to the system-wide settings for Java - which is still probably Java 6 if you have not removed it yet (there is some info on how to do so here). I would definitely recommend removing Java 6 from your system as it is an obsolete versions anyways, unless you really do need Java 6 on your system for some specific reasons.


To have the proper Java Home settings, you have to provide with the full path to the Java Home, which you did not.


The correct path in your case should be 


/Library/Java/JavaVirtualMachines/jre1.8.0_101.jre/Contents/Home

You can verify the correct path by running the following command in the terminal (it will return to you the value of your actually set JAVA_HOME


/usr/libexec/java_home

Your instantjchem.conf can be found by right-clicking your InstantJChem app, selecting "Show Package Content" and then navigating to Contents/Resources/instantjchem/etc and editing the file there. 


I hope this helps


Wishing all the best


David

User 794797687e

29-09-2016 15:11:24

Hello dpech,


I finally removed Java 6 to get working InstantJChem.


Thanks


Laurent