Startup error with Java? (without Matlab version on Windows 10)

I've tried installing the latest Java. the problem is still there. Any advice will be appreciated!

ERROR: JOGL not supported

BST> Starting Brainstorm:
BST> =================================
BST> Version: 14-Nov-2020
BST> Compiling main interface files...
BST> Emptying temporary directory...
BST> Deleting old process reports...
BST> Loading configuration file...
BST> Loading default montages...
BST> Initializing user interface...
BST> Starting OpenGL engine... Error using hgopengl
Java exception occurred:
java.lang.NoClassDefFoundError: com/jogamp/common/type/WriteCloneable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.mathworks.hg.uij.OpenGLUtils.getGLData(OpenGLUtils.java:78)
Caused by: java.lang.ClassNotFoundException: com.jogamp.common.type.WriteCloneable
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 23 more

Error in hgopengl

Error in panel_options>StartOpenGL (line 666)

Error in panel_options (line 28)

Error in bst_startup (line 378)

Error in brainstorm (line 205)

... Matlab M-code Stack Trace ...
file C:\Program Files\MATLAB\MATLAB Runtime\v98\mcr\toolbox\matlab\graphics\private\hgopengl.p, name hgopengl, line 0.
file C:\Program Files\MATLAB\MATLAB Runtime\v98\mcr\toolbox\matlab\graphics\private\hgopengl.p, name hgopengl, line 0.
file C:\Users\YUXC9N\AppData\Local\Temp\YUXC9N\mcrCache9.8\bst_ja0\bst_javabuil\toolbox\gui\panel_options.m, name StartOpenGL, line 666.
file C:\Users\YUXC9N\AppData\Local\Temp\YUXC9N\mcrCache9.8\bst_ja0\bst_javabuil\toolbox\gui\panel_options.m, name panel_options, line 28.
file C:\Users\YUXC9N\AppData\Local\Temp\YUXC9N\mcrCache9.8\bst_ja0\bst_javabuil\toolbox\core\bst_startup.m, name bst_startup, line 378.
file C:\Users\YUXC9N\AppData\Local\Temp\YUXC9N\mcrCache9.8\bst_ja0\bst_javabuil\brainstorm.m, name brainstorm, line 205.
com.mathworks.toolbox.javabuilder.MWException: Java exception occurred:
java.lang.NoClassDefFoundError: com/jogamp/common/type/WriteCloneable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.mathworks.hg.uij.OpenGLUtils.getGLData(OpenGLUtils.java:78)
Caused by: java.lang.ClassNotFoundException: com.jogamp.common.type.WriteCloneable
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 23 more
at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclFeval(Native Method)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$600(MWMCR.java:33)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclFeval(MWMCR.java:897)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$2.invoke(MWMCR.java:784)
at com.sun.proxy.$Proxy0.mclFeval(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.invoke(MWMCR.java:447)
at bst_javabuilder_2020a.Run.brainstorm(Run.java:200)
at org.brainstorm.RunCompiled.main(RunCompiled.java:18)

When running the compiled version of Brainstorm, the Matlab Runtime uses its own internal version of the Java environement (C:\Program Files\MATLAB\MATLAB Runtime\v97\sys\java\jre\win64\jre), therefore the version of Java you install on your system should not have any impact.

The issue is in the installation or the execution of the Matlab Runtime itself.
The errors reported suggest there is an OpenGL problem (the 3D rendering library). It could be due to:

  • A problem in the installation of the Matlab Runtime: try reinstalling it
  • A problem in your graphic drivers: update your video card drivers, restart your computer and try again
  • A bug in the Matlab OpenGL renderer related to some of your hardware or drivers: for this, you would have no other option to solve this than post a bug report on the Mathworks website (requires that you create an account there, but you don't need to own a Matlab license). They might provide a workaround for you.

Another thing you could try: using the version of Brainstorm compiled with Matlab 2015b.
On the download page, get the file bst_bin_R2015b_200618.zip, and install the Matlab Runtime 2015b (https://fr.mathworks.com/products/compiler/matlab-runtime.html)
If you get the same error, it would suggest a problem related with your graphics drivers rather than a bug that could be fixed in Matlab.

Thank you for the solutions! I ended up using the Matlab 2015b version. It works but it doesn't support .mff file importing. (not supported with the complied version). I'll see if I can get matlab.

Hi Francois, so I installed Matlab R2019b and the .zip brainstorm file (source + binary). Followed the instruction of installation. When typed in brainstorm, it says Unrecognized function or variable 'brainstorm'. I also tried "set path ->add folder" but then the same error as initially posted "ERROR: JOGL not supported....." occurs. Thank you for taking a look!

When typed in brainstorm, it says Unrecognized function or variable 'brainstorm'

You are not in the correct folder.

I also tried "set path ->add folder"

The installation instructions explicitly ask you NOT to do this:
https://neuroimage.usc.edu/brainstorm/Installation

but then the same error as initially posted "ERROR: JOGL not supported....." occurs. Thank you for taking a look!

This is not a blocking error, but it indicates that there is an error in the way OpenGL is handled.
To test this better, you don't need Brainstorm, try the following command:

>> opengl('software')
>> opengl('hardware')
>> opengl info
>> d = opengl('data')

If you get any error: update your graphics drivers.
If it doesn't solve the problem, report the bug to the MathWorks.

Thank you! Have tried everything so reported the bug to mathworks, hopefully there's a solution!