BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tpr
Obsidian | Level 7 tpr
Obsidian | Level 7

I have SAS 9.4 installed on a Windows 2008 R2 terminal server, and it's configured to use the SAS private JRE. When I run this ODS test code, I get the output and graph as expected:

 

title 'Comparing Group Means';

data Scores;
   input Gender $ Score @@;
   datalines;
f 75  f 76  f 80  f 77  f 80  f 77  f 73
m 82  m 80  m 85  m 85  m 78  m 87  m 82
;


ods html body='ttest.htm' style=HTMLBlue;

proc ttest;
   class Gender;
   var Score;
run;


ods html close;

 

 

However, if I run the java example code below, I get prompted to install the latest java version (currently jre 8u73).

 

 

filename odsout "sales.htm";

/* Close the current ODS HTML destination. */
ods html close;

data sales;
   length Region $ 4 State $ 2;
   format Sales dollar8.;
   input Region State Sales Year Qtr;
   datalines;
West CA 13636 1999 1
West OR 18988 1999 1
West CA 14523 1999 2
West OR 18988 1999 2
East MA 18038 1999 1
East NC 13611 1999 1
East MA 11084 1999 2
East NC 19660 1999 2
West CA 12536 1998 1
West OR 17888 1998 1
West CA 15623 1998 2
West OR 17963 1998 2
East NC 17638 1998 1
East MA 12811 1998 1
East NC 12184 1998 2
East MA 12760 1998 2
;
goptions reset=all border device=java;

ods html file=odsout style=listing;

title "Company Sales, Mid Year";

proc gchart data=sales;
   vbar3d region / sumvar=sales
   group=year subgroup=state;
run; quit;

ods html close;
ods html;

Java code found here:

http://support.sas.com/documentation/cdl/en/grapaxug/67223/HTML/default/viewer.htm#n01tdxygiq7h9in1w...

 

I'm an administrator, not a programmer (Dammit, Jim), so I found this while helping someone troubleshoot one of her sas programs with java. I also may not fully understand the relationship between ODS and Java, so maybe what's happening is perfectly normal.

 

I can install the newer java and update it almost every month like I do with my 9.3 installations, but I was really hoping to stick with the included version. Is there any way to make a program with java code like the example use the included version of java?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

I believe that the computer needs a Java plug-in over and above the JRE.

 

Anyone viewing the file would need to have the plug-in.

 

From http://support.sas.com/documentation/cdl/en/grapaxug/67223/HTML/default/viewer.htm#p1eaexgwdb5om3n1l...

 

Note: To run an applet, your users must be able access the appropriate Java archive files. Two archives are referenced by default: one is the Java plug-in from Oracle, and the other is the SAS Java archive.
In the HTML output file, the location of the Java plug-in from Oracle is specified in the CODEBASE attribute of the OBJECT tag. If you need to change this default value, then use the ATTRIBUTES= option of the ODS statement, as described in Specifying Parameters and Attributes for Java and ActiveX. On Windows systems, the user is prompted to install the plug-in if it is not already installed. On other systems, the plug-in can be installed from the SAS Third-Party Software Requirements web page.

View solution in original post

2 REPLIES 2
ballardw
Super User

I believe that the computer needs a Java plug-in over and above the JRE.

 

Anyone viewing the file would need to have the plug-in.

 

From http://support.sas.com/documentation/cdl/en/grapaxug/67223/HTML/default/viewer.htm#p1eaexgwdb5om3n1l...

 

Note: To run an applet, your users must be able access the appropriate Java archive files. Two archives are referenced by default: one is the Java plug-in from Oracle, and the other is the SAS Java archive.
In the HTML output file, the location of the Java plug-in from Oracle is specified in the CODEBASE attribute of the OBJECT tag. If you need to change this default value, then use the ATTRIBUTES= option of the ODS statement, as described in Specifying Parameters and Attributes for Java and ActiveX. On Windows systems, the user is prompted to install the plug-in if it is not already installed. On other systems, the plug-in can be installed from the SAS Third-Party Software Requirements web page.
tpr
Obsidian | Level 7 tpr
Obsidian | Level 7

Thanks. I'll go ahead and install Oracle JRE and configure SAS to use it. Not a big deal, but it would be nice if Oracle would make java updates default to updating in the same folder like it used to. Sometimes I get the option of picking the install folder during the installation, sometimes I don't.

/gripe

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1559 views
  • 0 likes
  • 2 in conversation