# Sage on Mac unable to use plot3d due to Java/jmol issues

Hi,

I am a relative newbie to the Mac and Sage on the Mac. I tried to run the following code from the Sage tutorial on my Mac in the console mode of sage:

sage: x, y = var('x,y')

sage: plot3d(x^2 + y^2, (x,-2,2), (y,-2,2))

The error message I get is

--------------------------------------------------------------------------- RuntimeError

Traceback (most recent call last) <ipython-input-2-878191366deb> in <module>() ----> 1 plot3d(xInteger(2) + yInteger(2), (x,-Integer(2),Integer(2)), (y,-Integer(2),Integer(2)))/Applications/SageMath/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result) 244 self.start_displayhook() 245 self.write_output_prompt() --> 246 format_dict, md_dict = self.compute_format_data(result) 247 self.update_user_ns(result) 248 self.fill_exec_result(result)

/Applications/SageMath/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in compute_format_data(self, result) 148 149 """ --> 150 return self.shell.display_formatter.format(result) 151 152 # This can be set to True by the write_output_prompt method in a subclass

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/display/formatter.pyc in format(self, obj, include, exclude) 158 # First, use Sage rich output if there is any 159 PLAIN_TEXT = u'text/plain' --> 160 sage_format, sage_metadata = self.dm.displayhook(obj) 161 assert PLAIN_TEXT in sage_format, 'plain text is always present' 162 if sage_format.keys() != [PLAIN_TEXT]:

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.pyc in displayhook(self, obj) 806 self._backend.set_underscore_variable(obj) 807 plain_text, rich_output = self._rich_output_formatter(obj, dict()) --> 808 return self._backend.displayhook(plain_text, rich_output) 809 810 def display_immediately(self, obj, **rich_repr_kwds):

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/rich_output/backend_ipython.pyc in displayhook(self, plain_text, rich_output) 264 return ({u'text/plain': msg}, {}) 265 elif isinstance(rich_output, OutputSceneJmol): --> 266 msg = self.launch_jmol(rich_output, plain_text.text.get_unicode()) 267 return ({u'text/plain': msg}, {}) 268 elif isinstance(rich_output, OutputSceneWavefront):

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/rich_output/backend_ipython.pyc in launch_jmol(self, output_jmol, plain_text) 367 jdata = JmolData() 368 if not jdata.is_jvm_available() and not DOCTEST_MODE: --> 369 raise RuntimeError('jmol cannot run, no suitable java version found') 370 launch_script = output_jmol.launch_script_filename() 371 from sage.env import SAGE_LOCAL

RuntimeError: jmol cannot run, no suitable java version found

I believe I have the latest version of Java installed:

$ java --version java 9.0.1 Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Sage version

$ sage --version SageMath version 8.0, Release Date: 2017-07-21

I would appreciate any inputs and advice about how to fix this issue. Thanks in advance!