How to include 3rd party jar package in the native code aiming to generate ane for android

in my native java code,i need to reference a class in another jar package.Simply to say,i want to make use of member functions of a class of some jar package A in the call function of the native class which have implemented the FREFunction class.To generate the native extension,native java code needs to be compiled to a jar package B.i have tried serveral methods to compile jar package A into B.Howerver my flex project failed to proceed when calling function of package A in the call function of native java code.To be sure of the correctness of the package A and B,i referenced them in a java project with main function and succeeded. at the same time my other call functions of classes impemented FREFunction work well,Then, why did i fail referencing package A?
in the discussion http://forums.adobe.com/message/3965757, i found the same problem,but i was unable to get a workaround,can anybody give me same help?

Standard Java does not support jars within other jars.
Either re-architect your stuff so jars in jars is eliminated, or write a custom classloader that can load from them, or look into 3rd-party solutions, which you can find by searching the net and these forums.

Similar Messages

  • How can I include 3rd party jar files with my custom extention?

    I'm writing an extension that is dependent upon some 3rd party jars. How can I include/package these with my extension?
    we're using the 11g tech preview
    thanks,
    Dylan

    Do you mean that you need these files to appear in JDeveloper as a library available for the developers who build a project and use your extension?
    You can create a library in JDeveloper with JAR files by simply adding the following to your extension.xml file:
    <jdeveloper-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
    - <libraries xmlns="http://xmlns.oracle.com/jdeveloper/1013/jdev-libraries">
    <library name="My Extension Library">
    <classpath> ${ide.extension.install.home}/lib/some.jar</classpath>
    </library>
    </jdeveloper-hook>

  • How to include third party .jar files into my jar file

    Hi,
    how do i include a open source third party jar file into an executable jar?
    i have a class called BlogBox.java and it uses org.apache.commons.net.ftp.FTPClient, i want to create an executable file, where do i put the .jar file containing FTPClient aka Apache Commons Net?
    currently i'm getting the following error from when executing my BlogBox.jar
    C:\MyJava\BlogBox>java -jar BlogBox.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
    at blogbox.BlogBox.<init>(BlogBox.java:27)
    at blogbox.BlogBox.main(BlogBox.java:103)
    Any suggestions? i have searched google and this forum but could not find the solution to my problem, thanks
    [edited msg] do i need to add the classpath at execution or something of the apache commons net library?
    Message was edited by:
    gekkokid

    When you use an executable jar the normal class path
    is ignored, but you can put a classpath inside the
    jar. The usual trick is to place the library jar
    files in a directory inside the application directory
    and direct the manifest file to it. The manifest file
    live in the jar inside the META-INF directory and
    it's called manifest.mf
    The two heavilly used entries are Main-class: and
    Class-path: lines. Class-path just has a
    comma-separated list of library paths.
    The jar utility has a special option to load it up.Thanks :) I created a "/lib" directory, placed in the packages in there and redirected the Class-Path: lib/commons-net-1.4.1.jar
    and it works,
    thank you everyone :)

  • How to consume 3rd Party WSDL which contains the Include statement

    I have a 3rd Party WSDL I am trying to consume using the BizTalk WCF Consume Wizard.
    When I try and consume the WSDL it gives me blank XSDs and Binding files. It does produce the Port Types in an Orchestration.
    This
    article mentions how to use the svcutil tool to get around the use of Import statements but does not give the full command. I have tried svcutil /t:metadata <Path of WSDL> but get an error stating can't load file or assembly.
    Any ideas anyone?

    Hi,
    Please refer to the blog which might helpfull:
    #The BizTalk WCF Service Consuming Wizard and a Look at the Artefacts Created
    http://jamescorbould.wordpress.com/2013/09/27/biztalk-and-wcf-consuming-a-wcf-service-part-2-the-biztalk-wcf-service-consuming-wizard-and-a-look-at-the-artefacts-created/

  • How to include  3rd Party swc files in my Application

    Hi ,
    I have downloaded , a calendar component namely "kccalendarflex1.4.0beta-4.1.swc" . 
    I want to include this 3rd party swc file in my Application , please suggest me what are the
    steps i need to follow to use it in My Application . 
    Thanks

    1) You have to just copy your swc file into your project libs folder.
    2) Right click on your project and choose properties->Flex Build path->Library Path then click on Add SWC button and choose your swc file and finally hit ok button

  • How to use 3rd party jar files for xml transform

    Hi all,
    Am using OAS9.0.4 and I deployed my .ear successfully.
    In my application am using 4 jar files for xml transformation. (xerces.jar, xalan.jar, xml-apis.jar,xercesImpl.jar)
    OAS has its own xmlparserv2.jar file. Its using this jar file for transforming xml data and not even looking for above mentioned 4 jar files.
    In opmn.xml, I provided these 4 jar files in to class path. Then also it didn't effect my output.
    I also tried as put these 4 jar files into j2ee\home\applib directory, but o result.
    Can anybody tell me where should I keep these 4 jar files in OAS and OAS should use these 4 jar files instead of its own xmlparserv2.jar for transforming data.
    Thanks in Anticipation,
    Regards,
    RK

    Add the Xbootclasspath variable in the java-options field. It will somewhat look like the following in your opmn.xml file
    <process-type id="<OC4J Instance Name>" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options value="........... -Xbootclasspath^/a:<location of your jar files>" />
    Ensure to use th ^/a (append) signature
    Regards,
    Chirag

  • How to include seconds and millisecon​d in the CSV file time stamp generated by the SpreadShee​t Object?

    I'm Using Lookout 6.02, in a XP Pro Windows Machine, Service Pack 3.
    I have an application that collects data at the rate of 20 samples per second. It works just fine, the CSV File contains all the samples without missing a single one.
    The problem is that the time stamp in the data file only shows hours and minutes. With 20 sample per second, there are 1200 samples per minute. It is hard to figure out in which second or sample number, occurred some events collected. These files are open with Excel and analyzed with Excel. There is no easy way to implement a search or a guidance for knowing the sample number or the exact time in Excel.  My problem is to add the seconds and if possible the milliseconds to the time stamp done by the spreadsheet object.
    Any suggestion?
    Other ways to do the same that includes the time stamp all the way down to milliseconds?

    Create another column with the Now() function, then set the calumn format to hh:mm:ss.s
    expression would be now(trigger) for the date and time or now(trigger)-today(trigger) for just time
    The trigger will cause the expression to stay updated, perhaps using the same trigger for logging the spreadsheet.
    Good luck
    Mike
    Message Edited by Mike@DTSI on 01-16-2009 04:12 PM
    Mike Crabtree - Lead Developer
    Destek of Nevada, Inc. / Digital Telemetry Systems, Inc.
    (866) 964-6948 / (760) 247-9512

  • Classpath and 3rd party jar files

    We have been searching for a long time and have not been able to find an answer to our question. Do you think that you could help us out?
    We need to include 3rd party jar files in our application. Where in the deployment classpath directory structure can we place these. This does not seem to happen when we publish.
    We also need to give our clients the ability to modify our configuration. Currently we do this with an xml file, which we place under server/config in our JBoss directory. We also need to find a home for out log4J configuration file.
    Where does this type of thing exist in the SAP world?

    We have had problems with 3rd party jar files also. We ended up including them in the WEB-INF/lib directory of our WAR file and packaging/deploying them everytime.
    If you are looking for your project on your server, it is deployed to a directory similar to this:
    /usr/sap/J01/JC00/j2ee/cluster/server0/apps
    Hope this helps.
    Chris

  • How to make the ear file including the 3rd party jar files without menttion in the System Classpath.

    Hai Sir,
    I am facing one problme in weblogic8.1 while depolying the .EAR FILE.
    Please help me sir.
    Case1)     1) I am using the struts and log4j frameworks and 3rd party jar files with
    weblogic8.1.
         2) I make the ejbs,webapplications and 3rdparty jar files, ear file the following
    dir structure .And i mentioned the Class-path including all jar files in the MANIFEST
    OF EAR FILE.
         While deploying the ear file it is giving following error.If log4j.jar does not
    mention in the Weblogic script file
         java.lang.NoClassDefFoundError: org/apache/log4j/Priority
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:1494)
    at java.lang.Class.getDeclaredFields(Class.java:1073)
    at weblogic.ejb20.deployer.EJBModule.disableImplClassLoader(EJBModule.java:1082)
    at weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassDependencies(EJBModule.jav
    a:982)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:419)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.j
    ava:2792)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.
    java:1478)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:11
    36)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:97
    5)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareCon
    tainer(SlaveDeployer.java:2571)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(Sla
    veDeployer.java:2523)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeploy
    er.java:2453)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer
    .java:820)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:
    536)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java
    :494)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:
    25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Please provide the soluation without mentioning classpath in the weblogic script
    .How to make the EAR file incliding ejbjar,webapplication and 3rd party jar files.
    Thanks & Regards,
    ASHOK SAMRAT
    [email protected]

    Refer to the section
    Handling Utility classes
    http://dev2dev.bea.com/products/wlserver/articles/musser.jsp
    thanks,
    Deepak
    "Ashok Samrat" <[email protected]> wrote:
    >
    Hai Sir,
    I am facing one problme in weblogic8.1 while depolying the .EAR FILE.
    Please help me sir.
    Case1)     1) I am using the struts and log4j frameworks and 3rd party jar
    files with
    weblogic8.1.
         2) I make the ejbs,webapplications and 3rdparty jar files, ear file
    the following
    dir structure .And i mentioned the Class-path including all jar files
    in the MANIFEST
    OF EAR FILE.
         While deploying the ear file it is giving following error.If log4j.jar
    does not
    mention in the Weblogic script file
         java.lang.NoClassDefFoundError: org/apache/log4j/Priority
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:1494)
    at java.lang.Class.getDeclaredFields(Class.java:1073)
    at weblogic.ejb20.deployer.EJBModule.disableImplClassLoader(EJBModule.java:1082)
    at weblogic.ejb20.deployer.EJBModule.setupEJBToImplClassDependencies(EJBModule.jav
    a:982)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:419)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.j
    ava:2792)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.
    java:1478)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:11
    36)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:97
    5)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareCon
    tainer(SlaveDeployer.java:2571)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(Sla
    veDeployer.java:2523)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeploy
    er.java:2453)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer
    .java:820)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:
    536)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java
    :494)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:
    25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Please provide the soluation without mentioning classpath in the weblogic
    script
    How to make the EAR file incliding ejbjar,webapplication and 3rd party
    jar files.
    Thanks & Regards,
    ASHOK SAMRAT
    [email protected]

  • Applets and 3rd party jars

    Hi,
    I'm trying to use a 3rd party jar with an applet. I can access the functions just fine when using an applet viewer, but when I try deploying the applet from a web page I get classNotFound exceptions. How do I go about getting the applet to recognize the jar file?
    Thanks

    Eva, yes, if that class in one of the 3rd party jars wants to access your class directly, then it is necessary that your class is loaded by the same classloader that loads that 3rd party jar or even higher up the classloader hierarchy.
    Why do you consider putting your class library into applib "a bit rude"? As long as your classes are named distinctively so that they will not clash with other classes, it is not a problem.
    On the other hand, it seems that the design of that 3rd party class is not classloader friendly. Had it used something like the following to load a class that is undefined at the compile time, you might not have this problem.
       Class userClass = Thread.currentThread().getContextClassLoader().loadClass(nameOfUserDevelopedClass);
       Object plugin = userClass.newInstance();

  • How to include javamail and jaf package in ApacheTomCat Server

    org.apache.jasper.JasperException: Unable to compile class for JSP
    C:\Program Files\Apache Tomcat 4.0\work\localhost\examples\jsp\SendMail$jsp.java:6: Package java.mail not found in import.
    import java.mail.*;
    ^
    1 error
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Unknown Source)

    hey pnarkodu
    put your activation.jar and mail.jar packages in the
    /tomcat_directory/common/lib - there are a bunch of jars here and just include the above two here
    then stop and run tomcat again
    think this will work
    let me know
    sincerely
    laodingsockjavaguy

  • Common 3rd Party Jars in an EAR

    Hi
    I have some common 3rd party jars and zips that are accessed by my WARs and EJB
    JARs. Where in my EAR structure do i place them so that these common jars like
    classes12, formulaone etc can be accessed from within my WARs and EJB jars?
    Regards
    Sudhindra

    Just place them at the root level of the .ear and mention them in the
    Class-Path entry of the .war manifest.
    In article <3e701ee8$[email protected]>, [email protected]
    says...
    >
    Hi
    I have some common 3rd party jars and zips that are accessed by my WARs and EJB
    JARs. Where in my EAR structure do i place them so that these common jars like
    classes12, formulaone etc can be accessed from within my WARs and EJB jars?
    Regards
    Sudhindra

  • Problem deploying new version of 3rd party jar

    I have a third party jar file that was recently updated with to a new version. I deleted the old jar file and replaced it with the new version. Modified classpath accordingly. The strange thing is that the only way I could get the classes that use this jar file to work was to recompile them. What am I missing?

    When replacing a jar file it is alway a good idea to recompile against it... this ensures backward compatibity and also prevents Incompatible Class Change Errors. Your new 3rd party jar may not be completely backwards compatible, although it is always a good idea to recompile when implementing a new jar that your application depends on.

  • 3rd party jars/zips in EAR

    Hi
    I have some common 3rd party jars and zips that are accessed by my WARs and EJB
    JARs. Where in my EAR structure do i place them so that these common jars like
    classes12, formulaone etc can be accessed from within my WARs and EJB jars?
    Regards Sudhindra

    http://www.jcp.org
    Cheers
    mbg
    "joe" <[email protected]> wrote in message news:[email protected]..
    >
    what do you mean by "to integrate this back into the specifications"? whatis the
    J2EE way to achieve it if there is one? Thanks
    "Mark Griffith" <[email protected]> wrote:
    Nope, embrace and extend. We are working to integrate this back into
    the
    specifications.
    cheers
    mbg
    "Joe" <[email protected]> wrote in message
    news:3e77c70d$[email protected]..
    Is that part of J2EE or weblogic's implementation?
    "Mark Griffith" <[email protected]> wrote:
    Upgrade to 8.1 and stick the jar's in myEar/APP-INF/lib
    cheers
    mbg
    "Jen" <[email protected]> wrote in message
    news:3e724f46$[email protected]..
    Is there a way to put in one shot instead of modifying every .jar
    and
    ..war's manifest
    file.
    Philip Strube <[email protected]> wrote:
    Hi Sudhindra,
    you can put them in your EAR (on top level or you can create a
    directory
    for them, like "libs" or sth.), and then create class-path entriesin
    the manifest files of your WAR and ejb-jars.
    Example: if myApp.war needs myUtil.jar, then write a line
    Class-Path: myUtil.jar
    in the manifest file of myApp.war. If myUtil.jar is in libs, write
    libs/myUtil.jar and so on.
    -- Philip
    Sudhindra wrote:
    Hi
    I have some common 3rd party jars and zips that are accessed
    by
    my
    WARs and EJB
    JARs. Where in my EAR structure do i place them so that these
    common
    jars like
    classes12, formulaone etc can be accessed from within my WARs
    and
    EJB
    jars?
    Regards Sudhindra

  • Signing of 3rd Party jars

    I have developed an app which uses Java Web Start. I created a self signed certificate for now an that works fine.
    What I was wondering about was 3rd party jars. Are they responsible for their own signing if they do system or disk I/O? Do I need to contact the vendor to get a signed version? I don't think I should be signing someone elses archive files.
    I need to run with all permissons set.

    My understanding is that if you sign one jar, you need
    to sign them all (and with the same certificate).This is only true within the the same jnlp file - not within the whole app.
    You can factor out sets of jar files into component extenions (a seperate jnlp file referenced by the original jnlp file.)
    Each component extension can have or not have the all-permissions tag, and if it does, the set of jar files in it can be signed by the same or a diferent certificate chain than the original.
    /Dietz

Maybe you are looking for

  • Error when running reset.bat

    Hello, I used to get an error while re-deploying some ESB projects on SOA Suite 10.1.3.4. This installation is with olite database. To solve this problem, I wanted to run reset.bat which is in \OracleAS_1\integration\esb\bin folder. reset.bat file ga

  • Java IDE's - Choices, choices, choices.

    Hey, I'm new to java and I hate having to program with notepad. So I got myself a trial version of Borland JBuilder. Boy, was that a bad experience. What I'm looking for is a simple program to help me get started with Java (auto formatting, pretty co

  • Numbers formula assistance needed

    I'm having a problem coming up with a formula for a schedule worksheet. Every template and tutorial that I've come across so far only allows for one length of lunch break to be subtracted from the total hours worked and what I'm trying to do is subtr

  • TV Episode Will Not Sync!?

    Hey everyone I just purchased the new 80gb iPod and everything sync'd fine except one of my south park episode's that I purchased from iTunes? Any ideas how I can get it on my iPod? Thanks for your help.

  • NW04s: How to change column settings like 'do not adjust' 'fit to resuts' e

    In the new Analyzer, old report format: how to change column settings: do not adjust, fit to results, etc.? Regards -Bala