Using external Jar with a mobile application

Hi folks!
   I need some help with my application, i make a simple mobile application and i need to use a external jar, in this case, this jar have a simple JAVA class that represents a manipulation with eSWT, so my problem is How to using external Jar in NetWeaver 7.1?
   I see other threads that have a same doubts, but i don´t have a solution for my problem.
   Thats it.

Hi Sivakumar,
I have similar problem. i want use iText or similar jar files to create pdf. I have currently developed a UI component for handheld. I have dont the following things:
1)Created a external dc of type external library
2) addedd the jar in the build path
3) added the jar in the lib folder of the webdynpro project
4) added the external jar dc as dependency in my webdynpro project
I am getting no class def found eror still for some wierd reason. please let me know if some step is missing. I have pasted the trace.
rror starting the framework
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/cete/dynamicpdf/Font
     at com.sap.demo.testui.testapp.comp.SignatureStandard.runApps(SignatureStandard.java:88)
     at com.sap.demo.testui.testapp.comp.TestCompView.wdDoInit(TestCompView.java:85)
     at com.sap.tc.mobile.wdlite.progmodel.core.Controller.enter(Controller.java:21)
     at com.sap.tc.mobile.wdlite.progmodel.core.View.enter(View.java:45)
     at com.sap.tc.mobile.wdlite.progmodel.core.Application.setCurrentView(Application.java:133)
     at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:169)
     at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:19)
     at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.setCurrentApplication(WDLite.java:148)
     at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:80)
     at com.sap.tc.mobile.wdlite.container.ContainerApp.startApp(ContainerApp.java:171)
     at com.sap.tc.mobile.wdlite.container.AppMenuView.onActionLaunchApp(AppMenuView.java:325)
     at com.sap.tc.mobile.wdlite.container.AppMenuView.invokeEventHandler(AppMenuView.java:368)
     at com.sap.tc.mobile.wdlite.progmodel.core.AbstractViewElement.doHandleEvent(AbstractViewElement.java:199)
     at com.sap.tc.mobile.wdlite.renderer.api.UIElement.doHandleEvent(UIElement.java:369)
     at com.sap.tc.mobile.wdlite.renderer.api.UIImageButton.mouseReleased(UIImageButton.java:148)
     at com.sap.tc.mobile.wdlite.renderer.api.UIElement.dispatchMouseReleasedWidgetEvent(UIElement.java:412)
     at com.sap.tc.mobile.wdlite.renderer.api.UIElement$1.mouseReleased(UIElement.java:455)
     at com.sap.tc.mobile.wdlite.renderer.swt.MouseEventDispatcher.mouseUp(SWTControl.java:380)
     at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137)
     at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

Similar Messages

  • Problem with using external jar file

    Hi
    I was using mail.jar library for swing application to send and receive emails. It just works perfect when I run with netbeans. But when I run the executable jar file at dist folder it runs but mail related functions doesn't work.What should I do now to make it work with mail features outside netbeans.
    thanks
    vinay
    Edited by: 899657 on Dec 24, 2011 5:07 AM

    899657 wrote:
    No. Because I am running the jar file which is created by netbeansNetbeans creates a 'dist' directory in which it puts your jar and a "dist/lib' directory in which it puts the dependent jars that are added to the project using 'project right mouse click'->Properties->Libraries. I would expect to see this 'dist/lib' directory contain mail.jar and activation.jar and any other jars that your jar needs. Within your program jar's manifest I would expect to see the Class-Path attribute have relative reference these jars ( lib/mail.jar lib/activation.jar ) and for the Main-Class attribute define your main class.
    Given this setup then you should be able to just type -
    java -jar yourjar.jarto run your program.

  • Using external libraries with Developer Studio 7.1 Composition Environment

    Hi,
    I downloaded DS 7.1 CE and tried to develop a simple application which uses an external library.
    I created a development component for "external library" for the local development -> MyComponent, giving it the name "test2" (for the domain basis).
    I imported the external library file using Import -> File System , then selecting the .jar file.
    In the component properties browser I added a public part naming it "mylib2" setting the purpose to "ASSEMBLY" (my intention was that the libarry will be transferred during the deployment to the application server).
    I right clicked on the public part to "managed entities". I selected the archive tree and checked the library file shown there (the one I imported before). #
    Then I opended component properties of my web dynpro project and clicked on "Dependencies". The I chose "Add..." and selected the "test2" development component I created before (see above).
    Then I tried to deploy the project (which uses this external library) using "Deploy Archive and Run"
    After deployment the browser window opens and shows the ClassNotFoundException
    So what did I oversee or do wrong?
    BTW: Is it necessary for using external libraries to use a full fletched NWDI? Or can I use external libs also with netweaver development environments freely available for download on sdn.sap.com?
    Any hints?
    Thanks a lot
    Hannes

    Hannes,
    If you want to use external libraries with DCs then you should follow the NWDI completely.
    Check this step, otheways of using external libraries is mentioned <a href="http://help.sap.com/saphelp_nw70/helpdata/en/e3/de813e77d46245e10000000a114084/frameset.htm">here.</a>
    Regards
    Abhilash

  • Using a jar file in my application... how?

    I have a JAR file which contains some classes I need to use in my application. I however, after looking in several books, cannot figure out how to use this JAR file within my application.
    Do I simply put it in the directory with my .java files, and use an import command? I'm confused.

    If the classes in the jar are part of a package then you can import them based on the package structure. The jar file will have to be part of your CLASSPATH variable.
    i.e.
    myUtils.jar
    resides in C:\"My Classes"
    CLASSPATH = .;"C:\My Classes";"C:\My Classes\myUtils.jar"
    within the jar I have the following class:
    \ameyer\Util\someUtil.class
    \ameyer\Util\anotherUtil.class
    To use these classes I could use the following import statement
    import ameyer.Util.*;
    This would import any class at that level in the jar.
    Note: the import part of the CLASSPATH is "C:\My Classes\myUtils.jar"
    hope this helps.

  • How to use external jars in NW2004

    Hello Experts,
    can i use the same approach mentioned in the below Weblog for using the external jars in NW2004.
    /people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components
    and if not then what will be the best way to achieve it in  NW2004.
    Please provide your inputs on above.
    Regards,
    Siddharth

    Hi Sidharth,
    If you are using web dynpro DC perspective then you need to follow the following points to use the external jar files in it.
    1. Create a external library project.
    2. copy the external jars in the library folder os the projects.
    3.) Select all the jars from the u201CLibrariesu201D folder, Right click and then select Development Component and click on Add to Public Part
    4.Select the first Radio Button (Provides an API)and give some nameto it.
    5. Repeat the step no 3 but now select the second radio button other than as selected in step no 4.
    6. Now build your lirary DC.
    7. Now create a j2ee DC project.
    8. ) Expand the node DC Definition and Right Click on Used DC. Select Add Used DC.
    9. Select the External Library DC with build time dependency.
    10.Right click on the J2EE DC and then select Development Component followed by Build
    11. Right click on the J2EE DC and then select Development Component followed by Deploy
    now you can use both the libary DC and the j2ee DC in your web dynpro DC as used DC.
    But if you have created a web dynpro project only(but not DC) than you can directly add the external jars in java build path
    hope this will help
    regards
    Narendra
    Edited by: Narendra Singh on Oct 27, 2009 11:22 AM

  • As I heard, If i get an unlocked iphone 5s, I can use it with my Wind Mobile which i have to have a $40 monthly plan for it. So, I want to buy an Iphone 5s that I can use it here with Wind Mobile and in turkey with my turkish line tht supoprts Iphone.

    As I heard, If i get an unlocked iphone 5s, I can use it with my Wind Mobile which i have to have a $40 monthly plan for it. So, I want to buy an Iphone 5s that I can use it here with Wind Mobile and in turkey with my turkish line that supports Iphone. So, is it possible that I can purchase an Iphone 5s that will be usable within Canada and Turkey? Im asking because, In Turkey, you need to register the Imei of the phone on your Passport to use it. Also, if i buy an unlocked Iphone 5s, will I be down to use it anywhere with any line?

    I dont know if you know the procedure in Canada and Turkey. Wind mobile wasnt supporting Iphones until they decided to let people use Iphone 5s with their $40 plan.And as i know, Turkey is the only country that asks you to register the imei on your passport to use it. So, most of people did not know it. so procedures are changing country by country. Are you sure that If I buy an Iphone 5s from a canadian apple store, use it with my wind mobile line and the turkish line in Turkey?

  • Can we use external drive with ipad air

    can we use external drive with ipad air?

    There are some wifi-enabled drives that allow you to stream content (music, films, tv programmes) to an iPad, but you can't directly connect one to an iPad.

  • Can I use external speakers with the iPad when using Facetime?

    Can I use external speakers with the iPad when using Facetime?  How do I do that?

    They have to be either plugged in via headphone jack or the dock port at the bottom. If you can. I've used it on apple tv, but that's it. I don't know if the others work, but I don't see why not. Try plugging in speakers in the headphone jack. You will get an answer :)

  • Problem using misc jar-Files in Composite Application

    Hi there,
    I want to use different jar-Files in my Composite Application on SAP Netweaver 7.3.
    I have created an external Lib DC where I have inserted the libs. After that I created an enterprise EAR and added the dependency to the PP of the external lib DC.
    After that I added the a dependency to my CAF-EAR. But I cannot access the mehtods and functions from my jar files.
    What's wrong there?
    Another question: Is it possible to add the jar-files directly to my CAF-EAR without creating the external library DC and adding a dependency?
    Any help would be greatly appreciated
    Thanks

    Hi, I've downloaded Jacob and got it running on my installation by doing the following:
    1. Download http://danadler.com/jacob/jacobBin_17.zip.
    2. Extract to Jdeveloper10g/jdev/lib/ext/Jacob
    3. Copy jacob.dll to c:/windows/system32
    4. Add JDeveloper10g/jdev/lib/ext/Jacob/jacob.jar to JDev user libraries, calling it 'Jacob'
    5. Add the 'Jacob' library to the project.
    6. Create a word document at c:/java/jacob/file_in.doc
    7. Create a new class with the following code:
    package view;
    import com.jacob.*;
    import com.jacob.activeX.ActiveXComponent;
    import com.jacob.com.Dispatch;
    import com.jacob.com.Variant;
    public class TestJacob
    public TestJacob()
    * @param args
    public static void main(String[] args)
    TestJacob testJacob = new TestJacob();
    testJacob.runTest();
    public void runTest()
    boolean tVisible = true;
    String sDir = "c:\\java\\jacob\\";
    String sInputDoc = sDir + "file_in.doc";
    ActiveXComponent oWord = new ActiveXComponent("Word.Application");
    oWord.setProperty("Visible",new Variant(tVisible));
    Object oDocuments = oWord.getProperty("Documents").toDispatch();
    Object oDocument = Dispatch.call(oDocuments, "Open", sInputDoc).toDispatch();
    }

  • How to use other jar with my executable

    Hello everybody
    I'm developing project in JBuilder which uses BC library "bcprov-jdk15-137.jar" This jar I got in reguired libraries section and it work fine in case that I run my application through JBuilder. Now I created executable jar file for my application but it works wrong. I don't know what dependencies shall I setup in JBuilder
    Can somebody help how can I run my application from jar file and I will use BC lilbrary without problem ?.
    What all shall I setup for correct work ?
    Thanks

    Hello
    I created new project(Frame application) in JBuilder 2006, Im using mentioned library therefore I put it into reguired libraries in project setting. When I run application through JBuilder (F9) it works fine.
    Now I would create executable jar file from my project, which will use this mentioned library. My project has one class CMTModule.class with main function. I created jar file via achrive wizard(AppletJAR). There are options of dependency rules in this wizard, so I choose Includes dependencies. Then I created manifest file and insert this item Main-Class: cmt.CMTModule.
    My application start but works wrong , I mean that there is problem with necessary library is not imported. How can I set up it in order to my executable jar can use this library without problems, because in JBuilder all works fine.
    What's is wrong ?
    Thanks

  • Possible to use external HD with 2 machines?

    Aloha all, I have been using an external HD with my MacBook to store librarys for iPhoto, & Aperture. It has worked great, but today I hit a snag. I cannot get the drive to show up when I plug it into my G5. I would like to be able to use it with both.

    Do you have a LAN that you can connect the two Macs to? If so then log into the MacBook from the G5 and select the external HD. That will let you access any of the libraries on the external HD. Just be sure to set the ownership of the external HD to be ignored as seen here.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • How to use external JARs in Eclipse

    Hello.
    I created a jar file like that:
    jar -cvf0 WarShell.jar WarShell.class
    I want to use WarShell.class in Eclipse but it not in my classpath,so I choose [Project] -> [Properties] -> Java Build Path -> Libraries -> Add External JARs and add WarShell.jar to the list.
    But when I run the program I got a Exception:NoClassDefFoundError.
    Why?How to fix it?
    Another question... Your classpath is not available in Eclipse,right?
    Thanks for your time! ^_^

    Hello.
    I created a jar file like that:
    jar -cvf0 WarShell.jar WarShell.class
    I want to use WarShell.class in Eclipse but it not in
    my classpath,so I choose [Project] -> [Properties]
    -> Java Build Path -> Libraries -> Add External JARs
    and add WarShell.jar to the list.
    But when I run the program I got a
    Exception:NoClassDefFoundError.
    Why?How to fix it?Did you run your program from Eclipse ?
    If yes, it should work (or seek for an Eclipse-specific forum.)
    But if not, keep in mind that your project settings are limited to Eclipse. You'll have to define a correct classpath for running your application.
    Another question... Your classpath is not available
    in Eclipse,right?Mine? I don't think it is available for anyone ;-P

  • How to use external jar files ??

    Hi all,
    In my user-defined function for mapping (IR) , I want to make use a Class which is available in an external .jar file.
    Our XI is working on Windows2003 OS. I set the classpath in OS environment variables.
    But it is not working.
    Where I should set the classpath ?
    Can anyone help.
    Thanks in Advance
    Chemmanz
    Message was edited by: Chemmanz

    Hi Chemmanz,
    For user defined functions, it is not necessary to use the external jar files.
    Just follow the below steps:
           1.      To create a new user-defined function, choose <b>Create New Function</b> in the data-flow editor at the bottom of the screen, on the left-hand side.
           2.      Specify the attributes of the new function in the subsequent window:
    Name:
    Technical name of the function. The name is displayed in the function chooser and on the data-flow object.
    Description:
    Description of how the function is used.
    Arguments:
    In this table, you specify the number of input values the function can process, and name them. All functions are of type String.
           3.      In the subsequent window, you can create Java source code:
                                a.      You can import Java packages to your methods from the Imports input field, by specifying them separated by a comma or semi-colon:
    You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since all message mappings require these packages and therefore import them.
    In addition to the standard packages, you can also specify Java packages that you have imported as archives and that are located in the same, or in an underlying software component version as the message mapping.
                                b.      Create your Java source text in the editor window or copy source text from another editor.
           4.      Confirm with Save and Close.
           5.      User-defined functions are limited to the message mapping in which you created the function. To save the new function, save the message mapping.
           6.      To test the function, use the test environment.
    The new function is now visible in the User-Defined function category. When you select this category, a corresponding button is displayed in the function chooser pushbutton bar. To edit, delete, or add the function to the data-flow editor, choose the arrow next to the button and select from the list box displayed.
    Regards,
    Prasad U

  • Using remote JARs with the JVM?

    I was wondering if using remote JAR files with the JVM has any impacts on the performance / stabilities of the Java Virtual Machine?
    The thing that concerns me the most is how the JIT compiler works with remote JARs? What about garbage collection?
    I know one thing for sure if that the application startup is slower since the "client" need the download the needed classes locally in order to load them in the local memory.
    The command line would look like this (under Win2000):
    start javaw -cp .;\\192.168.0.1\some_dir\file1.jar;\\192.168.0.1\some_dir\file2.jar SomeClass
    The big PROS is the application deployment since the JAR files are centralized and not install on the client workstation. The CONS... You tell me!
    Thanks in advance,
    - Nik

    1. Performance.I need more details here. Premilinary benchmark shows that only the application startup is affected by the use of remote JARs. Is there anything else I should look for?
    >
    2. If the network is down so is the application.Point granted. But the application need the database to run anyway. And the DB is residing on the server.
    3. If the server is down so is the application.See my previous comment.
    4. If the server is bounced while a class is loading
    it would be a problem.The server are in a datacenter. They shouldn't be to much bouncing happening =)
    The point I want to make here is that using remote JARs simplify a lot the deployment of the application. Unless there's a big drawback to this setup, I think it's a good way to install 2 or 3 tier application on a close LAN.
    Any other thought(s)?

  • Problem using external jars in my java component

    Hi Guys,
    I just wanted to ask how to properly reference an external jar to a java dc. I already have an external library dc which contains my external jars and also compilation and assembly public parts,  a j2ee library which has the assembly public part of the external jars that is deployed to the server, a java dc which has the compilation public part of the external jar.
    My problem is whenever I trigger a method of the java dc in my webdynpro dc I'm having an exception. weird thing is when I put the whole method from the java dc to the webdnypro dc it functions well. So I'm thinking if the interaction between my java dc and j2ee lib dc has to do with this maybe I'm missing some configuration.
    need your insight on this one.
    Thanks,

    Hi TznHuang,
    Pleaserefer to this blog might helpful for you
    /people/raphael.vogel/blog/2008/05/05/how-to-use-external-libraries-in-the-sap-component-model-part-ii
    Also please build external DC and then sync sorurces and sync used DC from inactive DC TAB for DC where you have used
    external DC.
    Hope bit helps
    Regards
    Arun Jaiswal

Maybe you are looking for