In .jar file how can I call API's of other .Jar file

Hi all,
I have created a "MyApplication.jar" file that dose not need any other .jar file Like xercesImpl.jar thne it is working fine.
but If I make the .jar file of application that needs xercesImpl.jar API's
of this .jar file then how I can call that xercesImpl.jar in my Application.jar newly created.
please help me
Thanks in advance.

either add the other jar file to your classpath or do the following (taken from http://javaalmanac.com/egs/java.lang/LoadClass.html)
e68. Loading a Class That Is Not on the Classpath
A URLClassLoader can be used to load classes in any directory.
    // Create a File object on the root of the directory containing the class file
    File file = new File("c:\\myclasses\\");
    try {
        // Convert File to a URL
        URL url = file.toURL();          // file:/c:/myclasses/
        URL[] urls = new URL[]{url};
        // Create a new class loader with the directory
        ClassLoader cl = new URLClassLoader(urls);
        // Load in the class; MyClass.class should be located in
        // the directory file:/c:/myclasses/com/mycompany
        Class cls = cl.loadClass("com.mycompany.MyClass");
    } catch (MalformedURLException e) {
    } catch (ClassNotFoundException e) {
    }

Similar Messages

  • How can i call a function of a swf-file which is embedded as a Resource in 3D-Annotation?

    Hi.
    I use a Flash-menu as an embedded *.swf in a 3D-Annotation. Now i want to trigger one of the ActionScript-Function out of the 3D-Annotation.
    How can i get access to that function?
    Cause of it is embedded, the callAS() Methods still not possible. But how else can i do that?
    Can u give me a simple example? How is the usability of Flashvariable in the Ressource-Tab of 3d-Annotation?
    Kind regards
    Florian

    It depends to some extent on how your SWF has been bound to the 3D scene. If you have bound it using a script, then you have a FlashMovie object that has a .call() method - but if you've attached it to something using the binding option on the Resources panel you will need to collect a reference first. If you know you are going to talk to the SWF it's best to bind it using JavaScript.
    Let us assume you have a SWF in the resources collection but it's not bound to anything. In the 3D scene there is an object called 'cube' on which the SWF must appear as a material, and the SWF has declared a function to the ExternalInterface engine that is called "myFunction", which expects a string as a variable. Here's what you would put in the script attached to the 3D scene:
    var fm = new FlashMovie("demo.swf");
    var matl = scene.meshes.getByName("cube").material;
    matl.useFlashMovie(fm);
    fm.call("myFunction","hello");
    The call() method is strictly typed - for example if your AS function expects a boolean and you sent it a string, it will not execute. There is also a limit on the possible returned variables - e.g. you cannot send back an Object.
    Note that commands sent in the other direction using ActionScript's ExternalInterface.call() method are targeted at  document-level by default, not at the 3D API - so if your AS is trying to call something it must exist as a document-level JavaScript function. It is possible to divert this traffic into the 3D API using the FlashEventHandler object, but it gets complicated as your code must implement XML encoding of the traffic - this is done automatically by the document-level script but not by the 3D API.
    To answer your second question, in the resources dialog you can define the FlashVars string which is passed to the SWF when it loads - this is the same URL-encoded set of variables that you would send to a SWF when embedding it in an HTML page. It's a static string; you cannot read or edit it with JavaScript but this means it will still work if the user disables the JavaScript engine.

  • How can I share a library (or other image files) across computers

    Hi All;
    My wife and I are both freelance photographers. We recently bought aperature ad per the license agreement installed it on my laptop and her mac desktop. We also just bought a 2-Terabyte network RAID storage array.
    I want to be able to pull up the images on the network array from either machine (via aperature)
    What's the best way to do this ?
    Thanks in advance

    First off, even if you are allowed to install it on both computers Aperture will not let you run two copies on the same subnet with the same serial number at the same time.
    Second, Aperture is not designed as a multi-user concurrent access application. The workflows that I have helped people design for multiple photographers do not revolve around accessing the the same library at the same time. They are more like a project check-out/check-in when more than two people contribute to what ends up being a consolidated library. I have monkeyed around and gotten what you ask to work but it is highly inadvisable due to the nature in the way Aperture accesses and modifies the data (a disaster waiting to happen if you access it concurrently). You can share masters but that is pretty much useless if you are working on the same images. If you are not I would suggest something more along the lines of what I have outlined here:
    http://rwboyer.blogdns.com/managing-aperture-2-on-multiple-computers/
    if my new test site is not functioning it is also here:
    http://www.rwboyer.com/RBDesign/Blog/Entries/2008/9/6_Managing_Aperture_On_MultipleComputers.html
    RB

  • How can we call actionscript functions from js

    hi
    how can we call Action script function from js file . i
    tried ExternalInterface. add Callback() .but it throws an error .is
    there any other chance to call action script method .thnx in
    advance

    angadala,
    some people have found it is good to include the full
    qualification path, ie
    if (flash.external.ExternalInterface.available)
    flash.external.ExternalInterface.addCallback("ext_method_name",int_method_name);
    } // if (flash.external.ExternalInterface.available)
    There are also browser differences which affect how you find
    the Flex application object which are documented at
    http://www.adobe.com/livedocs/flex/3/html/help.html?content=passingarguments_5.html
    Richard

  • How can we call a jar files(seperate projects jars) to each link of the tre

    how can we call a jar OR WAR files(seperate projects jars OR War) to each link of the tree.

    i want have home page that have this menu
    ========================
    -- Sale
    --- Customer
    --- Reader
    -- Energy
    --- Calc
    -- Service
    --- Chnage Name
    --- Change Code
    =======================
    For example
    --- Change Name
    ---- Page Reister
    ---- Page Confirm
    ---- Page Anoc
    ---- Page Save
    ======================
    i want user to access to every page From Each Case(Change Name) .
    i create for change name one project in my fushion web app and for other case
    How to I Can Call Page register From change name in Menu of The home page ????
    Edited by: user13151366 on Feb 4, 2013 4:44 AM

  • How can i call a DLL file from labview?

    Iam using a sensoray 2601 module.It is given as DLL file(S2600.DLL).How can i call this function from LabVIEW?
    Please Mark the solution as accepted if your problem is solved and donate kudoes

    As far as I can tell problems might occur with the call library function node if the the DLL from visual basic is actually an ActiveX dll if that is the case it seems calling the dll by using the Invoke node is the way to go.
    Have a look at this 
    /sletten

  • How can we call a class file of one package for class file of another

    How can we call a class file of one package from class file of another package and both packages exist in a same folder

    How can we call a class file of one package from
    class file of another package and both packages exist
    in a same folder
    Luckily they don't so it's really not a problem after all.

  • How can i call this file path into my bsp-html  to display the images?

    Hi
    I have a file path for an image like c:/test_logo.bmp.
    How can i call this file path into my bsp-html  to display the images?
    moosa

    Try this...
    Can i have  sample code in BSP-HTML to display images?

  • How can i call forpro prg file from java

    Hai friends,
    I have a doubt,clear it.
    how can i call forpro prg file from java file
    by,
    N.Vijay

    Thanks to your reply,
    I have some print statements in my foxpro program file.
    Then i like to invoke that foxpro file from my java file
    This want i want..,
    by,
    N.Vijay

  • How can i call ajax and extract the data?

    Hi all,
    I don't know briefly about ajax..i want to learn ajax, so my question is how can i call ajax and extract the data. for ex, i have JSON file
        "mobile": [
                "Name": "Micromax",
                "Model": A310
                "Name": "samsung",
                "Model": grand 2
    for above example how can i call ajax..please anyone explain with small example because it'll help me a lot.
    Thanks & Regards,
    Palsaran

    Hi Palsaran,
    As i understood, your requirement is to POST data from UI to backend.
    The above code you given is not correct if you want to use model based implementation.
    In UI5 you don't need to do an explicit Ajax call, for which we can use Models like OData, JSON etc.
    For your JSON example, you can use like,
    var oModel = new sap.ui.model.json.JSONModel();
    var oData = "YOUR JSON DATA";
    oModel.setData(oData)
    oModel.loadData(yourURL/Entityset,"POST");
    For ref, you can use the below link
    JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.json.JSONModel
    Thanks
    Naveenraj

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • How can I call a RFC from dynpage ?

    Hi!
    I would like to know how can I call a RFC from a Portal aplication, dynpage or jspdynpage. there include some libraries ?
    any idea?
    thanks

    for deploying SAP Jra :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4#search=%22how%20to%20use%20jca%20sapjra%20site%3Asap.com%22
    For lookup of SAP Jra use:
    com.sapportals.connector.connection.IConnectionFactory connectionFactory =(IConnectionFactory) initctx.lookup( "deployedAdapters/SAPFactory/shareable/SAPFactory");
    Using SAP Jra
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/13044258bdd417e10000000a1550b0/content.htm
    The important jars required are:
    connector.jar
    Genericconnector.jar
    prtjndisupport.jar
    Thanks

  • How can i link a video to a text file on iPad2

    how can i link a video to a text file on iPad2

    Alrite mate,cheers for replying....You are right,my mistake,,It is Frame and not Panel...therefore Frame 1 is home and Frame 2 is Add User. Frame 1 has a button called Add User,which if i press it should run and open up my Frame 2. I can run Frame 1 and 2 seprately and it works fine,but Now i want to link them. So When i run Frame 1 at first i only get Frame 1,but then when i press Add User button my program should start Frame 2.Resuting in 2 Frames opened. I dont know how to link them.

  • How can i get the column names in CSV file.

    Hi,
    After execution of infospoke i can not see the column names in that file.How can i get column of respective infoprovider?
    Thanks,
    Gananadha Lenka

    Hello Gana,
    Actually while exporting the data using Info Spoke, we have the possibility to modify the data that we send. This is possible using transformations.
    In your Info Spoke, you have a tab called Transformations.
    Here you need to create an implementation and then use BADi to populate data.
    Check if you can write a start routine sort of thing here and insert a new record into the internal table by hardcoding with your field headings.
    Let me know if you dont know how to create transformations.
    Kris...

  • Vertical Color Lines on my imported file how can i remove and edit

    Vertical Color Lines on my imported file how can i remove and edit

    If you haven't used After Effects before, you should understand that posession of a template is NO guarantee of success without prior AE knowledge.  It appears you haven't used AE before.
    The color bars indicate a missing file, and your screen shot reveals no text layers. Looking at the precomp names, opening the one called, "edit text" might be useful.
    I will guess that the following would be even more useful:
    http://blogs.adobe.com/aftereffects/2010/01/getting-started-with-after-eff.html
    Without knowledge of the AE basics, templates are pretty much useless.

Maybe you are looking for

  • Windows 8.1 on Mac Mini late 2012

    Hello, I'm trying to put Windows 8.1 on my Mac Mini late 2012 (as my Windows laptop is dying) but I'm not getting anywhere. What I've done so far: Use BCA to use Win8.1 ISO and make the bootable USB, it reboots, "No available drivers" Use BCA to make

  • Can't delete a song somehow downloaded from iCloud OS 8.1.2

    I cannot get rid of a song on my iPhone. Previously, I had Show All Music enabled, so several of the songs in my iPhone were in iCloud but with a little download icon (cloud). Once this song played, however, it stayed, which is odd, I guess. Never sa

  • Error when starting new video recording

    When I try to start a new video recording I receive the following error: The operation couldn't be completed. (OSStatus error -536870206.) I am using Quicktime Pro on an iMac running Mac OS X 10.6.5. Quicktime will work with iSight but not with my PS

  • Is 3D type included in Photoshop CS6 in Creative Cloud subscription?

    At a previous job, I used to be able to do 3D type in Photoshop CS2, but that may have been due to a plug-in, I'm not sure. At my current job, I have a Creative Suite CS6 Creative Cloud subscription and I was watching a tutorial to refresh my memory

  • DV8000t and Windows 7 (x86) -- Microphone

    Hello.  I've got a problem with my microphone.  Here's the details: -  my audio device is the Conexant High Definition Audio device -  the microphone worked fine on windows xp pro sp3 AND vista -  the microphone is not built in, it's a mic stereo inp