cancel
Showing results for 
Search instead for 
Did you mean: 

How to include third party jars in ui5 controller?

vevek_pj
Explorer
0 Kudos

Hi Experts,

I have java related jars and I have to use it in ui5 controllers.

Since our controller will be of java script how should I import those jars in my code.

Thanks and Regards,

Vevek P J

Accepted Solutions (0)

Answers (5)

Answers (5)

vevek_pj
Explorer
0 Kudos

We are trying to create an UI5 user interface through which we can
send the data to selenium, and after testing the result has to be displayed in
customized format through UI5.

Provide with some suggestions.

Regards,

Vevek

vevek_pj
Explorer
0 Kudos

Actually I am trying to develop an UI5 web application to do automated testing
based on selenium jars. I kept those jars in lib folder of Web-Inf. When I tried using a class present in that lib it throws some error.

Here are some screenshots.

Suggest some ways to use those libraries.

Regards,

Vevek P J

karthikarjun
Active Contributor
0 Kudos

Hi Vevek,

Try to insert your jar file in index page.

for ex: <link href: "your locaion">

Thanks,

Karthik A

WouterLemaire
Active Contributor
0 Kudos

If you want to do automated tests on SAPUI5 apps you can use OPA. Check the following examples:

https://sapui5.hana.ondemand.com/explored.html#/entity/sap.ui.test.Opa5/samples

Kind regards,

Wouter

former_member182372
Active Contributor
0 Kudos

javascript files should be assembled as war ( and then ear if we are talking about SAP Java WAS)

WouterLemaire
Active Contributor
0 Kudos

Hi Vevek,

Javascript is not the same as Java. Java runs on the server-side while Javascript runs on the client. You'll need a Java server. On that Java server, you could create a Java project with your jar files. If you want to use it in javascript. You'll have to create a servlet and use json to communicate with ajax calls in your javascript.

http://www.htmlgoodies.com/beyond/javascript/article.php/3470971/Java-vs-JavaScript.htm

Kind regards,

Wouter

former_member182862
Active Contributor
0 Kudos

HI Vevek

Sorry I do not know how this will work. Why do you need java jars to be in SAPUI5 controller (in Javascript)

Thanks

-D