Page 1 of 1

jreality doesn't start

Posted: 14 Jan 2023, 06:46
by beew
Hi, I compiled and installed polymake 4.8 from source. There was no error in building and make check. When compiling and start up jreality is listed as bundled.

Code: Select all

Application polytope currently uses following contributed and third-party software packages: 4ti2, SVG, bliss, cdd, flint, geomview, graphviz, jreality, latte, libnormaliz, lrs, permlib, polyDB, povray, ppl, qhull, singular, sketch, soplex, sympol, threejs, tikz, tosimplex
However, when I tried

Code: Select all

cube(3)->VISUAL;
the browser opened up and it was three.js

so I tried

jreality(cube(3)->VISUAL) nothing happens and there was no error message.

OS is Ubuntu 22.04 and java version is openjdk 11


Please help. Thanks.

Re: jreality doesn't start

Posted: 14 Jan 2023, 14:06
by gawrilow
Indeed, when you start polymake with -dd option, which produce more debugging output, you'll see an exception thrown during OpenGL native module initialization (jogl). Probably, the version bundled with polymake sources is too old. It still works, however, with openjdk-8. Install it parallel to other jdk versions, then delete the directories polymake/build/*/bundled/{java,jreality}, rerun the configure script with additional option --with-java=/usr/lib/jvm/java-8-openjdk-amd64/bin/java and ninja to rebuild.

Admittedly, jreality did not receive much care from our side in the recent years, albeit we don't own this project. We should try to renew the jogl modules and fix errors arising with newer JDKs.

Re: jreality doesn't start

Posted: 15 Jan 2023, 08:33
by beew
Hi,

it works with java 8, thanks for the help.

java 8 is old, it is no longer in Ubuntu's repo and I don't think it is packaged by many Linux distros. I get the binary tarball from https://bell-sw.com/pages/downloads/#downloads Maybe it will be helpful for someone looking for java 8

Now if I just type

Code: Select all

cube(3)->VISUAL;
threejs shows up, to invoke jreality I have to do

Code: Select all

jreality(cube(3)->VISUAL);
Is there a way to make jreality the default?

Re: jreality doesn't start

Posted: 16 Jan 2023, 14:25
by blorenz
You can set the default to jreality with

Code: Select all

prefer "jreality";
This will be stored in the polymake configuration (~/.polymake/settings) and persist across sessions, until you use reset_preference to restore the default behaviour, see https://polymake.org/doku.php/user_guid ... references for more details.

Unfortunately jreality is no longer developed and also the Java OpenGL interface (JOGL) has no new releases since 2015.
Since we cannot provide support for discontinued legacy software we might just disable that interface by default in the near future and add a warning that it requires an old Java version.