DATA Step, Macro, Functions and more

Calling jar through SAS

Accepted Solution Solved
Reply
Contributor
Posts: 65
Accepted Solution

Calling jar through SAS

[ Edited ]

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; 

 


Accepted Solutions
Solution
‎06-22-2016 07:32 AM
Super Contributor
Posts: 408

Re: Calling jar through SAS

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.

View solution in original post


All Replies
Solution
‎06-22-2016 07:32 AM
Super Contributor
Posts: 408

Re: Calling jar through SAS

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.

☑ This topic is SOLVED.

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

Discussion stats
  • 1 reply
  • 172 views
  • 0 likes
  • 2 in conversation