Starting Cytoscape with JAVA 9

197 views
Skip to first unread message

diyoyo

unread,
Sep 26, 2017, 5:06:08 AM9/26/17
to cytoscape-app-dev
Hi, 
I have had trouble starting Cytoscape using Java 9. Surprisingly, I get the following error:
 







I have tried decreasing the -Xmx in the cytoscape config, but it does not work. 
Everything works fine using jre1.8.0_144.
Any idea?
Thanks.

Barry Demchak

unread,
Sep 26, 2017, 10:10:53 AM9/26/17
to cytoscap...@googlegroups.com

Hi –

 

Cytoscape does not support Java 9. Please use Java 8.

--
You received this message because you are subscribed to the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-app-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/787d185a-fcba-43d0-b972-4fb4ec266867%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

diyoyo

unread,
Feb 7, 2018, 6:14:40 AM2/7/18
to cytoscape-app-dev
Hi, 
I have seen that the 3.7.0 snapshot had been released and according to the roadmap, I guess it supports Java 9 now, doesn't it?
In the end, I removed two lines of the karaf.bat to make it kind of start, but now I am stuck on the splashscreen with this message:

karaf.base: D:\PortableApps\PortableApps\Cytoscape_v3.7.0\framework\bin\..
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.ext.ClassPathEx
tenderFactory$DefaultClassLoaderExtender (file:/D:/PortableApps/PortableApps/Cyt
oscape_v3.7.0/framework/system/org/apache/felix/org.apache.felix.framework/5.6.1
0/org.apache.felix.framework-5.6.10.jar) to method java.net.URLClassLoader.addUR
L(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.f
ramework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflect
ive access operations
WARNING: All illegal access operations will be denied in a future release

Is there any trick?

Thanks 

David Otasek

unread,
Feb 7, 2018, 11:22:41 AM2/7/18
to cytoscap...@googlegroups.com
I haven't run into anything like this yet, but will test the windows execution again. What lines were removed from the .bat file?

To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cytoscape-app-dev@googlegroups.com.

David Otasek

unread,
Feb 7, 2018, 11:28:28 AM2/7/18
to cytoscap...@googlegroups.com
Also, how are you getting the snapshot build?

diyoyo

unread,
Feb 7, 2018, 11:50:46 AM2/7/18
to cytoscape-app-dev
I am getting the snapshots here: http://code.cytoscape.org/jenkins/job/cytoscape-3-gui-distribution/lastSuccessfulBuild/org.cytoscape.distribution$cytoscape/
as mentioned here (Nighly builds) from here: http://cytoscape.org/download-platforms.html

I removed the two lines after $CLASSPATH definition, about "ext" and "endorsed". I forgot to make a backup first, but if I remember well, it was around line 417 from karaf.bat.
When I switched back the snapshot 3.7.0 to the JRE1.8.0_152, it worked well, even without these two lines.

diyoyo

unread,
Feb 7, 2018, 11:52:15 AM2/7/18
to cytoscape-app-dev
So you confirm that it should work with Java9, right?

diyoyo

unread,
Feb 8, 2018, 5:55:25 PM2/8/18
to cytoscape-app-dev
I have also tried with Mac and Java 9.0.4, and I get this error on the splashscreen (without removing any line or anything) : 

Exception in thread "main" java.lang.NoClassDefFoundError: com/apple/eawt/OpenFilesHandler

at org.cytoscape.launcher.internal.Launcher.main(Launcher.java:60)

Caused by: java.lang.ClassNotFoundException: com.apple.eawt.OpenFilesHandler

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)

... 1 more

David Otasek

unread,
Feb 9, 2018, 11:54:36 AM2/9/18
to cytoscap...@googlegroups.com
I can confirm; it should work with Java 9. I will try to replicate on a Windows machine myself, but at present I'm working on Linux. Has anyone else in the group run with Java 9 on Windows?

To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cytoscape-app-dev@googlegroups.com.

David Otasek

unread,
Feb 13, 2018, 2:55:51 PM2/13/18
to cytoscap...@googlegroups.com
I set up a machine to test on, and can replicate the issue.

There are instances of this issue and similar on the Karaf forums; the version of Karaf we're using for 3.7 is still a release candidate, and hasn't been made final. I will try to get a bug report to them quickly so they can offer us solutions or make fixes.

David Otasek

unread,
Feb 13, 2018, 3:05:07 PM2/13/18
to cytoscap...@googlegroups.com
To confirm, these are the offending lines from the karaf.bat file:

-Djava.endorsed.dirs="%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed" ^
                -Djava.ext.dirs="%JAVA_HOME%\jre\lib\ext;%JAVA_HOME%\lib\ext;%KARAF_HOME%\lib\ext"

 

David Otasek

unread,
Feb 13, 2018, 3:53:13 PM2/13/18
to cytoscap...@googlegroups.com
After a look at the karaf.bat script, and the nature of some of the karaf forum posts regarding similar errors, it looks like the script is executing thinking that Java 8 is still being run. 

Earlier in Karaf development, they had a similar problem compiling under Java 9, and the fix came rather quickly, and had to do with the logic they were using to identify Java versions.

I made them aware of the bug here, if you're interested in keeping track: https://issues.apache.org/jira/browse/KARAF-5611

diyoyo

unread,
May 14, 2018, 6:46:16 AM5/14/18
to cytoscape-app-dev
Hi, 
even though the bug is marked as resolved, the problem is still present using the latest nightlies.
I haven't tried again, but it seems like the bug I previously reported for Mac is completely different from the karaf one, isn't it?
Cheers,
Y
Reply all
Reply to author
Forward
0 new messages