From: OR Stats on
That did it! Thank you!! JAVA issue resolved. Now, if I can just figure
out why the STATGRAPH code, given by a SAS talent, is mysteriously bunking
out at the moment w. strange %'s on the y-axis...

On 1/25/08, Ken Borowiak <EvilPettingZoo97(a)aol.com> wrote:
>
> >
> >
> >>On Fri, 25 Jan 2008 11:15:45 -0500, OR Stats <stats112(a)GMAIL.COM> wrote=
:
> >>
> >>>Hello SAS-L:
> >>>
> >>>I tried running scripts to generate estimated density curves, but none
> of
> >>>the graphics generate. The error in the log was:
> >>>WARNING: The unsupported JRE version 1.5 was installed.
> >>>Can't load class com/sas/tk/util/SetStandardOut.
> >>>Can't redirect System.err to SAS log.
> >>>
> >>>Can't load class com/sas/tk/util/SetStandardOut.
> >>>Can't redirect System.out to SAS log.
> >>>
> >>>Can't load class com/sas/tk/util/SetStandardOut.
> >>>System.out not restored
> >>>Can't load class com/sas/tk/util/SetStandardOut.
> >>>System.err not restored
> >>>ERROR: Java class generated an exception.
> >>>
> >>>I need to overlay estimated density curves using PROC KDE or PROC
> >>>Univariate, but unfortunately I get the above error everytime. The
> codes
> >>>ran were:
> >>>1.
> >>>ods trace on;
> >>>ods html;
> >>>ods graphics on;
> >>>
> >>>proc kde data=3Dmydata;
> >>> univar x y z/ plots=3Dhistdensity ngrid=3D200
> >>>method=3Dsrot PERCENTILES=3D0.5 1 2.5 5 10 25 50 75 90 95
> >>>97.5 99 ;
> >>> run;
> >>> ods graphics off;
> >>> ods html close;
> >>>
> >>>2. after 1 failed, but below does not work either:
> >>>data _play ;
> >>> set mydata;
> >>>run ;
> >>>
> >>>ods graphics on;
> >>>ods HTMLCSS file=3D'Junk.HTMLCSS' style=3Dminimal ;
> >>>
> >>>/*-- define the graphical template --*/
> >>>proc template;
> >>>define statgraph Yikes.KDEPLay;
> >>> layout gridded;
> >>> entrytitle "Kernel Density Plots";
> >>> layout overlay / xaxisopts=3D(label=3D"Log Return");
> >>> densityplot x/ name=3D"X_kde" kernel()
> >>>legendlabel=3D"x-3MONTH"
> >>>linecolor=3Dred;
> >>> densityplot y/ name=3D"Y_kde" kernel()
> >>>legendlabel=3D"y-3MONTH"
> >>>linecolor=3Dblue;
> >>> densityplot z / name=3D"Z_kde" kernel()
> >>>legendlabel=3D"z-3MONTH"
> >>>linecolor=3Dgreen;
> >>> discretelegend "Y_kde" "X_kde" "Z_kde" /
> >>>across=3D1 halign=3Dright
> >>>valign=3Dtop;
> >>> endlayout;
> >>> endlayout;
> >>>end;
> >>>run;
> >>>
> >>>/*-- attach the data and template together --*/
> >>>data _null_ ;
> >>> set _play ;
> >>> file print ods=3D(template=3D"Yikes.KDEPlay");
> >>> put _ods_;
> >>>run;
> >>>
> >>>ods rtf close ;
> >>>
> >>>The microsoft document from 2. was just blank. Thanks for your help!
>
>
> A Birdie wrote ...
>
>
> This is from support.sas.com entered 5/24/2005 =85
>
> Problem Note 15237: "ERROR: Java class generated an exception" issued wit=
h
> 1.5 of the Java plug-in
>
> The following messages may appear in the SAS Log when using the JAVAIMG
> device driver or with ODS GRAPHICS:
>
> Can't load class com/sas/tk/util/SetStandardOut.
> Can't redirect System.err to SAS log.
>
> Can't load class com/sas/tk/util/SetStandardOut.
> Can't redirect System.out to SAS log.
>
> Can't load class com/sas/tk/util/SetStandardOut.
> System.out not restored
> Can't load class com/sas/tk/util/SetStandardOut.
> System.err not restored
> ERROR: Java class generated an exception.
>
> This problem occurs if Version 1.5 of the JRE has been installed on the
> system.
>
> To circumvent the problem, do one of the following:
>
> 1. If you do not actually need SUN's Java JRE 1.5.0_02 installed, you
> should first uninstall this version from your machine using
> Add/Remove Programs from your Windows Control Panel. Then you can
> install 1.4.1_02 from the following web site:
>
> http://java.sun.com/products/archive/j2se/1.4.1_02/
>
> 2. To get SAS 9.1.3 to work with Sun's Java JRE 1.5.0_02, follow these
> steps:
>
> To start with, exit any running SAS sessions and edit your SAS 9
> config file. This file is called sasv9.cfg and it typically found
> in the following location:
>
> !sasroot\nls\en
>
> Before editing your sasv9.cfg file, you may want to make a back-up
> copy called sasv9.old.
>
> When editing your sasv9.cfg file, find the line containing the
> JREOPTIONS parameter. Edit this line to remove the following
> option:
>
> -Xbootclasspath/p:!SASROOT\core\sasmisc\sas.ads.webAFrt.jar
>
> If the -JREOPTIONS parameter does not contain the parameter shown
> above, skip this step and continue with the rest of the information
> given below.
>
> Then, on the JREOPTIONS line, modify the parameter that reads:
>
> -Dsas.jre=3Dprivate
>
> so that it now reads:
>
> -Dsas.jre=3Dpublic
>
> At this point, save the changes to sasv9.cfg. Next, find
> the following file on your machine:
>
> !SASROOT\core\sasexe\jldplgin.dll
>
> and rename it to:
>
> !SASROOT\core\sasexe\jldplgin.old
>
>
> This has been totally resolved in 9.2 : it won't make any difference what
> you have installed on your machine.
>