The SAS Output Delivery System and reporting techniques

"Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Accepted Solution Solved
Reply
Contributor
Posts: 48
Accepted Solution

"Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

To someone who may concern,

Hi I'm plotting the ACF of CAD with the following code:

proc autoreg DATA=Combined
plots(unpackpanel only) = ACFPlot;
model CAD = Date;
run;

However, I got the following error in log:

log.png

Can someone provide some advise with this error? Thank you.


Accepted Solutions
Solution
‎04-25-2017 11:44 AM
Super User
Posts: 10,500

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

This kind of message may indicate that the version of Java is incorrect for your version of SAS. You need to verify the version of Java installed and the version that SAS expects.

 

Try running:

proc options option=jreoptions; run;

Look for the JRE it will look somewhat like C:\path\Java\JRE1....\bind\client\jvm.dll on windows where the .... will be the java version number.

Verify that path is there and has a JVM entry.

 

A not-uncommon issue with this is an IT staff "updating" java for you and removing the old version. SAS is somewhat picky abou the versions it can use. If you see a "later" version of java and the expected one not there re-install the older version and things should work again. At least it did for me when IT did this to me.

 

View solution in original post


All Replies
Solution
‎04-25-2017 11:44 AM
Super User
Posts: 10,500

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

This kind of message may indicate that the version of Java is incorrect for your version of SAS. You need to verify the version of Java installed and the version that SAS expects.

 

Try running:

proc options option=jreoptions; run;

Look for the JRE it will look somewhat like C:\path\Java\JRE1....\bind\client\jvm.dll on windows where the .... will be the java version number.

Verify that path is there and has a JVM entry.

 

A not-uncommon issue with this is an IT staff "updating" java for you and removing the old version. SAS is somewhat picky abou the versions it can use. If you see a "later" version of java and the expected one not there re-install the older version and things should work again. At least it did for me when IT did this to me.

 

Contributor
Posts: 48

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Hi ballardw, thank you for replying.

I think your advise led me to the right track. Here is the log after I ran your code:

jvm.png

And here is what looks like in my c drive:

c.png

if my understanding is correct the java is installed with the right version, which is 9.4?

Looking forward your reply.

Super User
Posts: 10,500

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

That looks like the correct JVM and right path.

Can you generate plots with other statistical procedures or do this only occur with Proc Autoreg?

Contributor
Posts: 48

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Hi ballardw, I correct a black error in the middle of the code and it can plot ACF and other figures now.

Thank you.

New Contributor
Posts: 4

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

I have the same problem, how did you solve it exactly?


problem sas.png
New Contributor
Posts: 2

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Well, turns out that my problem was that I have been running sas from windows search, I would run "sas 9.4 (English)", it probably runs some flawed trimmed version of sas.

So I went to my 64bit sas folder - C:\Program Files\SASHome\SASFoundation\9.4 and ran the file "sas.exe", now everything works fine for me (you can test it with : proc javainfo;run;  and if this shows you any information instead of error, you are good to go). If this fixes your java problem as well, just make a shortcut for sas.exe file on your desktop. 

Hope this will be your case too. 

New Contributor
Posts: 2

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

OK, taking it all back, seems like this was just a luck, apparently the java sometimes run and sometimes it doesnt in my SAS, I figured that if you go to tools->ODS graphics editor in sas and java is not running, it crashes the whole sas, then sometimes when you run sas again, the java just kicks in (again, test with running ODS graphics editor). So what I basically do is I keep crashing the sas with ODS ge until it starts running Smiley Very Happy
Contributor
Posts: 48

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Hi ep121, sorry for the very late reply, I was away from Country and didn't get this notification from gmail by firewall.

 

In terms of the problem. I found that if you are still having the problem, try to run two sas, you will get an error within the first opened sas, just ignore that one and close first sas, and the second sas would work perfectly. 

 

I hope that helps.

Regular Learner
Posts: 1

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Hi, I have the same trouble with my SAS since I do a Windows update yesterday. I check the path and it was the same than Xusheng. I try to open 2 SAS, it doesn't work. I try sas.exe, the English version and the French version. It doesn't work. It's the first time I have this kind of issues. Does anyone have a clue what happen since yesterday (yesterday, everything was fine, I could do many graphics without any problem!).

Thank you.

Contributor
Posts: 48

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Hi JPGilbert, if you are currently using SAS 9.4 TS1M1, maybe you can
try to update
your SAS from SAS 9.4 TS1M1 to SAS 9.4 TS1M3 and SAS 9.4 TS1M4. I heard
that would help.

Good luck.

##- Please type your reply above this line. Simple formatting, no
attachments. -##
Frequent Learner
Posts: 1

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

it works for me after I updated SAS 9.4 TS Level 1M1 to SAS 9.4 TS Level 1M3 or M4, which should be released the second half year of 2016 and afterwards
Contributor
Posts: 48

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

It's great to hear.

Senior User
Posts: 1

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

I noticed this problem has been solved. But for the record, here was my accidental solution:

 

I had the same problem when using  "ods graphics on" and it crashed when I attempted to open ods graphics editor.

 

SO it turned out I was having a virtual machine on. I closed the virtual machine then runing "ods graphics on;" had no problem generating graphs.

 

 

 

Contributor
Posts: 48

Re: "Unable to load the Java Virtual Machine" when plotting ACF with SAS 9.4

Thank you for your advice xpingli. 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 14 replies
  • 2549 views
  • 0 likes
  • 7 in conversation