First time here? Check out the FAQ!

Ask Your Question
2

jmol cannot run while plot3d

asked 9 years ago

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?

Preview: (hide)

Comments

Did you restart Sage after installing jmol?

A.P. gravatar imageA.P. ( 9 years ago )

3 Answers

Sort by » oldest newest most voted
3

answered 9 years ago

slelievre gravatar image

updated 7 years ago

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')
Preview: (hide)
link

Comments

1

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

PHPirates gravatar imagePHPirates ( 6 years ago )

@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 ( 5 years ago )

@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 ( 4 years ago )
1

answered 5 years ago

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.

Preview: (hide)
link
1

answered 7 years ago

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.

Preview: (hide)
link

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: 9 years ago

Seen: 2,989 times

Last updated: Feb 18 '20