Reputation: 21
I am trying to make an XS project in HANA which will use some of the classes and methods that can be found in a .jar file. These classes and methods will do some calculations and present it to the user in the UI.
The question is: How do I access methods and classes of that .jar file?
I have registered it as an external library, but I have no idea how to call it from my XS javascript source files.
Upvotes: 2
Views: 2055
Reputation: 328
If you want to outsource some of your xsjs functions to an external library, xsengine provides a special format for this, called ".xsjslib". You can import a library using the following code:
$.import("<package_your_library_was_deployed>","yourLib");
access functions inside your lib by this path:
$.path.to.your.library.filename.yourFunction();
Upvotes: 1
Reputation: 83
there's no way to invoke external .jar package from XS's server-side JavaScript. You can use an external library using function "$.import", but this is only valid for JavaScript library.
Upvotes: 2