Ask Your Question
2

jmol cannot run while plot3d

asked 2015-11-25 15:46:27 +0100

CXMA479 gravatar image

Well,the internet connection is terrible which makes me a mess... I downloaded the source(version 6.9 in Ubuntu 12.04).When I typed these following in sage command line,I got a problem...

g(x,y)=x^2+y
plot3d(g(x,y),(x,1,3),(y,1,10))

It said something about jmol,so I went to get jmol,then invoked it again,however didn't work.IT SAYS: RuntimeError: jmol cannot run, no suitable java version found
And I tried to call jmol in Terminal,it seemed to work well.
Does sage cann't find the right path?What should I do?

edit retag flag offensive close merge delete

Comments

Did you restart Sage after installing jmol?

A.P. gravatar imageA.P. ( 2015-11-30 17:07:22 +0100 )edit

3 Answers

Sort by ยป oldest newest most voted
3

answered 2015-11-25 17:59:11 +0100

slelievre gravatar image

updated 2018-03-01 11:56:09 +0100

I suggest visiting http://java.com/en/download/installed... to check if your Java is up-to-date.

Another useful trick is to plot using threejs instead of the default Jmol.

For this, you could do:

sage: g = lambda x, y: x^2 + y
sage: plot3d(g, (1, 3), (1, 10), viewer='threejs')
edit flag offensive delete link more

Comments

1

... or use viewer='tachyon' when threejs also doesn't work (Windows 8, Sage 8.1).

PHPirates gravatar imagePHPirates ( 2018-06-02 13:52:46 +0100 )edit

@PHPirates -- was that with Firefox?

Viewing SageMath Three.js 3d plots in Firefox on Windows did not work in SageMath <= 8.9. But it worked in other browsers.

This problem was reported as

and fixed in

which was merged in Sage 9.0.beta9.

So, when Sage 9.0 comes out, viewing Three.js 3d plots in Firefox on Windows will work.

slelievre gravatar imageslelievre ( 2019-12-24 15:35:35 +0100 )edit

@slelievre I don't remember, and I don't have that Windows system anymore. However, I can say it works fine in Firefox under Linux, Sage 9.1.

PHPirates gravatar imagePHPirates ( 2020-09-07 19:31:31 +0100 )edit
1

answered 2020-02-18 20:27:58 +0100

Anik Samiur Rahman gravatar image

This can also happen due to mismatched java version number. The java version expected by sage is declared in "~/.local/lib/python2.7/site-packages/sage/interfaces/jmoldata.py" There, in the "JmolData" class at "is_jvm_available" function you'll find the code responsible for java version check.

java_version = re.search("version.*[11][.][06]", version)

See, I've changed the version number to 11.06, it previously was 1.78(=[1][.][78]). Then voila, JMol started working normally.

edit flag offensive delete link more
1

answered 2018-02-28 21:39:40 +0100

toricweb gravatar image

This is what I get it to work.

  1. Run

/usr/libexec/java_home -V

  1. Identify version 8 of Java, and remove the others using a command like

rm -rf /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/

(with the version suitably changed; also you'll probably have to run this as sudo)

It turns out that JMol is incompatible with version 9, which I originally had. After getting rid of version 9, closing the shell session and restarting it, I am now able to plot 3d objects in Sagemath through JMol.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-11-25 15:46:27 +0100

Seen: 2,931 times

Last updated: Feb 18 '20