Call to specific class from JAR file - java

I want to call a Class A from JAR-1. But I have same Class in JAR-2 hence my app is calling Class A from JAR-2.
All the packages are same in both the JARs. For Eg,
com.package.classes.A in JAR-1 and com.package.classes.A in JAR-2
I want my app to call A from JAR-1.
I am using IntelliJ.(If this information helps)

Related

WaitForInputReady method is not availlable in Host Access Control Library(HACL)

I have ECL-14.53.0 jar in this jar WaitForInputReady method is not available from ECLOIA class, I have WaitForInput method in my ECLOIA class, I want to know in which version of jar WaitForInputReady method is available from ECLOIA class or is both methods are same, please let me know the details of this jar.

How to add a Class that extends FlutterPlugin to GeneratedPluginRegistrant?

I have my class that extends FlutterPlugin and MethodCallHandler. I would like to add this to the GeneratedPluginRegistrant. If i add it manually, fultter run is going to overwrite the list. What is the solution here? (Its not a flutter package, just a Class in the native android project)

Can we use same #HandlerChain for all my webServies which there are in different package name?

i have couple of webservice with different package location
what i want is to use same HandlerChain for all the webservice but
maven build is failing with
[Could not parse handler chain file] could not find file ....
as its locking for handler in same path where the webservice file is
but i want to use 1 location for all
its possible?
#javax.jws.HandlerChain(file = "../../../../handler.xml")
public class GetOrderDataJWS extends com.amdocs.aif.provider.jaxws.AifJws {
#Resource
It should work if you have it declared fully qualified:
package me.webservices.one
#WebService(...)
#HandlerChain(/me/util/security/handlers.xml)
public...
package me.webservices.two
#WebService(...)
#HandlerChain(/me/util/security/handlers.xml)
public...
When using maven you would place your handlers.xml file (or whatever you call it) under src/main/resources/me/util/security/

Passing a customized object to Scala template

I have an object profileModel in my profile package and my profile.scala.html file have following code
#(model: ProfileModel)
when I compiles, it is giving an error recursive value model needs type
But when I moved this class to models with my application.conf as
ebean.default="models.*"
it works.
My guess is scala compiler automatically adds models.* to class path at the time of compilation
Is there a way to make this work without moving the class back to models package ?
I am using play 2.2.1 built with Scala 2.10.2
If I understand you right, if your ProfileModel exists in profile package correct declaration in the view should be:
#(myProfile: profile.ProfileModel)
And 'yes', Play imports automatically all models and controllers (and also other well known types), but if you want to use any type in custom package (or ie. imported lib) you need to use full qualified path to it.

call method from class in jar file

Ask previous question but in another form.
Class callapi contains method MainMethod(String name). I put this class in jar file callapi.jar.
Class staticapi calls method MainMethod from jar.
So question:
How to call method MainMethod(String name) from callapi.jar?
P.s staticapi class and callapi.jar are in staticapi.jar
import PACKAGE.callapi;
add the call as
new callApi().MainMethod(name_toBePassed);
PS:- the jar file should be in the class path of JVM

Categories

Resources