Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying pygcam with GCAM6: error while init confg file #36

Open
amnmalik opened this issue Dec 30, 2022 · 1 comment
Open

trying pygcam with GCAM6: error while init confg file #36

amnmalik opened this issue Dec 30, 2022 · 1 comment

Comments

@amnmalik
Copy link

Hi Richard,
I know the readme file says that you haven't tested pygcam with GCAM 6.0 but I thought to have a go at it anyway. I successfully installed pygcam as explained nicely in your docs, however when I try to initialize the configuration file, I get the following error:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: joptsimple/OptionException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: joptsimple.OptionException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
gt failed: Cannot get java home dir: Command 'java -cp "C:/Users/Aman/GCAM/gcam-v5.1.3/libs/jars/*;C:/Users/Aman/GCAM/gcam-v5.1.3/output/modelinterface/ModelInterface.jar;XMLDBDriver.jar" XMLDBDriver --print-java-home' returned non-zero exit status 1.

Could you help in addressing this issue? Thanks in advance!

@rjplevin
Copy link
Collaborator

It looks like the class path is looking in C:/Users/Aman/GCAM/gcam-v5.1.3 rather than in the 6.0 directory. Did you use the command-line argument -g / --gcamDir on the "init" command to set the location of the 6.0 distribution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants