From: rjf2 on
thanks for the good press, EBSO

imnsho, The Powers That Be had a good thing going in v9.1:
provide the JRE that SAS uses under the SAS installation folder

Do you want to know how many times MyCompany
has broken all my SAS graphics users' programs
w/MyCompany's Security Upgrades?

<shepard's hook incoming from stage left>
"Erk!"


> -----Original Message-----
> From: Epidemiology and Biostatistics Student Organization (EBSO)
> Sent: Tuesday, March 09, 2010 2:17 PM
> To: sas-l(a)uga.edu
> Subject: Re: This happened to me when windows tried an auto update.
I'm
> using 9.1.3 so it's "experimental". Any simple workarounds?
>
> On Feb 24, 3:14 pm, Bruce <bhthoma...(a)gmail.com> wrote:
> > The following error message might be issued when attempting to
> produce
> > output using ODS GRAPHICS or PROC SGRENDER:
> > ERROR: Java virtual machine exception.
> > java.lang.NoClassDefFoundError:
> > com/sun/java/swing/SwingUtilities2.
> > This problem is most likely to occur if SUN's Java JRE 1.6 or high
is
> > installed and the template that is being used to create the graph
> > contains an ENTRYTITLE, ENTRYFOOTNOTE, or ENTRY statement.
> > To circumvent the problem, remove Version 1.6 of Sun's Java JRE.
>
> I don't know how helpful this will be but I have tried to work around
> the sas-java problem for weeks until I found a solution that worked;
> but it's tedious, doesn't work everytime, and is a general headache to
> get what you want, so take this solution lightly until sas-java figure
> out a better solution.
>
> What I did was follow Ronald Fehd's advice in trying to edit the sas
> configuration file (here is his link:
> http://www.sascommunity.org/wiki/Java_JRE_1.5
> ). Unfortunately, this wasn't working at all. My problem was that I
> had sas-java working on one machine at home, but not in the office. My
> IT department is a pain to deal with, so what I tried was copying the
> sas configuration file from home and replacing it over the one at
> work. The only difference was in the part that Fehd mentions on the
> JREOPTIONS.
>
> So then what I did next was try to copy/paste the java folder from
> home (it contained three JRE versions: 12, 22, and JRE6). When I
> pointed the JREOPTIONS to the JRE6\bin\client\jvm.dll file, sas would
> recognize JVM but then I got the same error you did when I tried to
> actually use it for something important (like creating ROC curves
> through PROC logistic).
>
> So what I tried next was pointing the JREOPTIONS to the
JRE1.5.0_12\bin
> \client\jvm.dll file but then sas would return to giving me the same
> java virtual machine could not be loaded error.
>
> Finally, I tried this:
>
> close SAS.
> edit sas configuration file in nls\en\sasv9.cfg file
> point JREoptions to java1.5.0_12\bin\client\jvm.dll
> save configuration file
> open sas
> create new script > test per Fehd's method: %put
> %sysfunc(getoption(JREOPTIONS));
> make sure that the result is the same JREOPTIONS I edited (particular
> w.r.t. location of the jvm.dll file)
> test java > "proc javainfo; run;"
> IF THIS WORKED, I OPEN MY SAS CODE I WANT TO RUN
> RUN CODE
> GET RESULTS!! YESSSSS!!
>
> Unfortunately, once I close sas, the problem goes back to jvm could
> not be loaded. So.... I have to do that process above everytime I want
> to use jvm. :*(
>
> If you can figure out a better solution, please post it.
>
> -Michael Batech, MPH