Hi,
I want to call a java class, which resides in a jar file, through SAS. Also while calling to the java class I want to provide runtime parameters.
Please let me know how this could be achieved.
I am referring below code to call java program but not sure where to provide jar file location.
data _null_;
* -- set length of variable to capture message ;
length message $ 200 ;
* -- initiate java object ;
declare javaobj jobj ("helloWorld");
* -- get message and clean up ;
jobj.callStringMethod('getMessage', message);
jobj.delete();
put message = ;
run;
You can add the location to the classpath in the jreoptions in the sas config file:
-jreoptions (-Djava.class.path= "c:\my java\classes\myclasses.jar";c:\java2\classes2\classes2.jar -oss600k)
Regards,
- Jan.
You can add the location to the classpath in the jreoptions in the sas config file:
-jreoptions (-Djava.class.path= "c:\my java\classes\myclasses.jar";c:\java2\classes2\classes2.jar -oss600k)
Regards,
- Jan.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.