JGCRI / gcam-core

GCAM -- The Global Change Analysis Model
http://jgcri.github.io/gcam-doc/
Other
275 stars 162 forks source link

error when i try to run object-main it says jvm.dll is missing but i have installed java im on win 10 #19

Closed natieth closed 6 years ago

pralitp commented 7 years ago

Judging from the title of this issue my first question is are you trying to run objects-main.exe directly? If so could you try running the executable script run-gcam.bat instead? The purpose of that script which is a wrapper around the call to objects-main.exe is specifically to find the correct location of Java on your computer.

natieth commented 7 years ago

thank you for replying fast yes I run executable script run-gcam.bat but it also shows an error saying objects-main.exe is not known command or executable file.

pralitp commented 7 years ago

Ok, that is unexpected. Perhaps something about writing the .bat files has changed on windows 10. We could edit the .bat to debug this alternatively we could just change your system settings to be able to find Java manually thus being able to run objects-main.exe directly:

You will first need to find the path to the correct version of Java. Note for GCAM we require a 64-bit version of Java. Thus a typical path might be in C:\Program Files\Java\jre1.8.0_101.

Next we will have to update the PATH environment variables. Here is some webpage with some answers as to how to find this on windows 10: https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10

Finally you will need to find the PATH variable and append to it's existing values something like the following: <leave the previous portion alone>;C:\Program Files\Java\jre1.8.0_101\bin;C:\Program Files\Java\jre1.8.0_101\bin\server

Once that is set you should be able to double click on the objects-main.exe directly and it will now be able to find jvm.dll and the other Java related DLLs that may be required.

natieth commented 7 years ago

well thank you for your help it worked by adding JAVA_HOME to the environment variable name and locating it C:\Program Files\Java\jre1.8.0_101\bin

tyw0115 commented 6 years ago

hello @natieth, I followed your instruction and it still has problem, it throws the error : ERROR: XML Read Exception message is: unable to open primary document entity 'C:\Users\tyw\Desktop\GCAM\windows_binaries\exe/log_conf.xml' and after I copied log_conf to the exe files, it throws another error: ERROR: XML Read Exception message is: unable to open primary document entity 'C:\Users\tyw\Desktop\GCAM\windows_binaries/input/gcam-data-system/xml/modeltime-xml/modeltime.xml' and when I double clicked the object-main.exe it just flashed.

pralitp commented 6 years ago

@tyw0115, it appears your error is unrelated. If you are still having trouble could you open a new issue?

tyw0115 commented 6 years ago

@pralitp Thank you for your reply, my error is unrelated, I changed the configuration into absolute path before I recognized the problem, and I can run the model now. Thank you again.