Justas
Justas

Reputation: 5962

Running jnml results in Error: Could not find or load main class org.neuroml.JNeuroML

When running jNeuroML, I get the following error:

Error: Could not find or load main class org.neuroml.JNeuroML

How do I fix it?

Upvotes: 0

Views: 298

Answers (1)

Justas
Justas

Reputation: 5962

I was getting the error after reboot, the following makes sure it doesn't happen after a restart.

  1. Find the folder where jNeuroML was extracted. There should be jnml executable in that folder and it runs from that folder without the above error. E.g. /Users/YourName/Downloads/jNeuroML-XYZ/
  2. Set the JNML_HOME variable to the folder location, and append the folder location to the PATH environment variable.

Under MacOS, run these in Terminal (replace with your path)

export JNML_HOME=/Path/To/jnml/here/
export PATH=$PATH:$JNML_HOME 

Under Win7:

My Computer > Right Click > Properties > Advanced System Settings > Environment Variables > Add New JNML_HOME variable, and Append to PATH variable

  1. To keep these after reboot

Under MacOS, run this in terminal:

pico ~/.bash_profile

Paste the above two lines at the end of the file and save with CTRL+X, Y, and ENTER

Under Win7:

If you set them in Advanced System Settings, they will be preserved after reboot automatically.

Upvotes: 0

Related Questions