Could I run a jar application use a external class such as db2java.zip (ib

Could I run a jar application use a external resource in a zip format such as db2java.zip (ibmdb2 driver) not a jar format ?

Yes you can. Make a manifest for your jar, and include the manifest attribute 'Class-Path' that specifies your jar or zip file, like this:
Class-Path: db2java.zip
And then have the zip file in the same directory as your jar file. See the Java Tutorial, Jar Trail for more info on manifest, and/or see other messages in this forum.
-Ron

Similar Messages

  • Executing Jar Application using Java Programs

    Hello there,
    How can I run a java application using java programs.
    Desc:
    public class someapp {
       public static void main(String[] ext) {
           // How can I execute a jar application from here through java code
    }

    You could use java.lang.Runtime.exec(). Another way could be loading the main class of the jar file and invoking its main method dynamically.

  • Can we run a java application using Runtime.exec()?

    Can we run a java application using Runtime.exec()?
    If yes what should i use "java" or "javaw", and which way?
    r.exec("java","xyz.class");

    The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
    The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
    HIH
    ClassLoader cl = null;
    Class c = null;
    Class cArr[] ;
    Method md = null;
    Object mArr[];
    cl = ClassLoader.getSystemClassLoader();
    try{
         c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
    } catch(ClassNotFoundException e) {
    System.out.println(e);
         cArr = new Class[1] ;
         try{
         cArr[0] = Class.forName("java.lang.Object");
         } catch(ClassNotFoundException e) {
         System.out.println(e);
         mArr = new Object[1];
         try{
         md = c.getMethod("processPkt", cArr);
         } catch(NoSuchMethodException e) {
         System.out.println(e);
         } catch(SecurityException e) {
         System.out.println(e);
    try {            
    processedPkt = md.invoke( null, mArr) ;
    } catch(IllegalAccessException e) {
              System.out.println(e);
    } catch(IllegalArgumentException e) {
              System.out.println(e);
    }catch(InvocationTargetException e) {
              System.out.println(e);
    }catch(NullPointerException e) {
              System.out.println(e);
    }catch(ExceptionInInitializerError e) {
              System.out.println(e);
    }

  • How could I know if my applications use HRMS?

    Hi,
    How could I know if my applications use HRMS? Is HRI (Human Resources Intelligence) the same thing as HRMS? Could anybody tell me how could I find the aliases for all the products available (not neccesarily registered) in Oracle Applications?
    thanks,
    Paul

    you can find the complete details of how to find the list of products installed in the following thread
    Query for Appliation Products Installed
    Hope this helps
    Regards
    Ramesh Kumar S

  • How to run a .jar application via the web

    I have a java application called up.jar which runs a gui application when run via the command line:
    javaw com.vignette.integrate.runtime.ZipFileRuntime up.jar
    I want to run this in a web browser but am just starting to learn html and java. Can anyone please knock a quick script together that I can use to get this to run!!!?
    Thanks
    Ian

    The short answer is, it doesn't work like that.
    A longer answer: Something that runs as an application doesn't necessarily work as an applet (i.e., in a browser) and making it run as an applet usually can't be done without knowing the details about the code in question.
    However it's possible that the jar already contains code that allows it to be invoked as an applet. Did you check vignette.com to see if they have any documentation on this?

  • I could not run any java application

    I could not run any application program( even thouht the simplest one such as helloword). It would give NoClassDefoundError as:
    Exception in thread "main" java.lang.NoClassDefFoundError: Welcome1
    Press any key to continue . . .
    I use text pad editor. First I compile it, there is no error. But when I try to run ( by click run java application program button ) it gives me the same error message.
    I also always have compile error such as no class define when I try compile the program which need to import user defined class from differerent package. ( even though I did put all the classed in the same directory and also use import statement)
    I did try to run many other applet programs which do not use any user defined class, in this case every thing work fine and I could run the program.
    That mean I could run simple applet program but not application, also i always have compile error when ever I tried to import user defined class.
    I'm afriad there is some thing wrong with the sdk and java enviroment, therefore I did try to uninstall the program and redownload from the web( I try both version 1.3 and 1.4 many time, and I did check the size of the application when I finish down load) but I still got the same problem.
    My computer operating system is WinMe.
    I appreciate any help

    You probably have to set some settings for text pad. It looks like the java interpreter could not find your class, which most likely means that the classpath setting is not set properly.

  • Problems running an JAR application

    Hello, i'm using this command, in a Linux shell, to trying to run my application
    java --classpath "/root/Desktop/a/ESTGF_3D_Final_Window.jar" -Xms512m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=640m -XX:+640m WFPlayerFrame
    and i get the following error:
    ** ERROR **: file ../../../libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c: line 174 (Java_gnu_java_awt_peer_gtk_GtkFramePeer_nativeSetIconImageFromDecoder): assertion failed: (pixbuf != NULL)
    aborting...
    Aborted
    Can anyone tell me what i'm doing wrong...

    It depends on whether or not you wrote the jar file you are attempting to run. The application is failing because of an assertion error, but you can disable those on the command line. Add the following option parameter to the java command you have there..
    -disableassertions
    Assertions are normally disabled by default. But I understand that it is possible to activate them programmatically and I think that is what has been done in this case. I suppose. It makes one wonder why, perhaps there was good reason, but not knowing anything about the app, hard to say.

  • Can I install and boot mac os x 10.6.8 on a new mac mini model A1347 which shipped with osx 10.8.3?  I need to run a custom application using Mac OS X 10.6.8.

    Can I install and boot mac os x 10.6.8 on a new mac mini model A1347 which shipped with osx 10.8.3?
    I need to run an application customized using Mac OS X 10.6.8 on this new mini.

    Hi, not normally, but you can run a Virtual Machine, using 10.6 Server  within...
    Parallels...
    http://www.parallels.com/
    VmWare Fusion...
    http://www.vmware.com/mac
    VirtualBox...
    http://www.virtualbox.org/wiki/Downloads

  • JDev9i-Beta;How could I run two JSP applications in Jdev enviroment at the same time?

    Hi,
    I have two JSP applications located on different directories. I wanted to run both applications at the same time in Jdev enviroment. But the second one failed.
    More info:
    I successfully ran Application1, then minimized the browser and ran Application2, then again minimized the second browser. After I maximized the first browser(Application1) and tried to go thro pages, I received page not found. Because Jdev sat up the Class Path for the newer application(Application2) and looks for pages there. I believe thats why I could not run both at the same time. How could I get around of this?

    hi,
    can you provide more details on this. Are these jsp files part of the same project or different projects. I can not duplicate this issue. Please provide us more information.
    Thank you

  • Could not run Web dynpro application

    Hi
        I am having ECC 5.0, now I am trying to run Web Dynpro application which is already existing,I could not run this application. In SE84 that applications are available, but in SE80, not showing. Please suggest me what could be the reason.

    guess u need ECC6 for Webdynpro.For more info plz chk this link:
    Web Dynpro for ABAP
    Edited by: Kalyan Chakravarthi on Jan 30, 2009 11:28 AM

  • How to run a jar file using Java application.

    Hi all,
    I know that jar file can run using the following command, using the command prompt.
    java -jar jar-fileBut I don't know how to run that command through a Java code. Hope it's clear to you.
    So can you please explain how can I do it.
    Thanks,
    itsjava

    rayon.m wrote:
    The solution given by ropp appears to have nothing to do with what you asked about.Ok sir, I got the point.
    I've try a test as follows. But it doesn't give any output. Even not an exception.
            try {
                String[] temp = new String[]{"java", " -jar", " MainApp.jar"};
                Runtime rt = Runtime.getRuntime();
                Process proc = rt.exec(temp);
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);
                System.out.println("Temp_Values");
            catch(InterruptedException ex) {
                System.out.println(ex.getMessage());
            catch (IOException ex) {
                System.out.println(ex.getMessage());
            }I've debug and see, but the exitValue is even not exist at run time. Can you tell me where I'm going wrong.

  • Executing Jar application using API

    Hi,
    Java tutorial [http://java.sun.com/docs/books/tutorial/deployment/jar/apiindex.html] explains how to launch an application bundled in a jar using API.
    How can you set the class path of the launched application ?
    I tried to have the launched application read a text file that is bundled in the same jar but couldn't.
    Thank you

    Here is a complete example of my problem
    c.java launches App.java
    import java.io.*;
    import java.util.jar.*;
    import java.net.*;
    import java.lang.reflect.*;
    class c
    public static void main(String[] args)
    URLClassLoader ucl;
    URL            url;
    Class<?>       cls;
    Method         m;
    try {
          url = new URL ( "jar","","file:/Exec/App.jar!/" );
          ucl = new URLClassLoader ( new URL[]{url} );
          cls = ucl.loadClass ( "Exec.App" );
          m   = cls.getMethod ( "main",new Class[]{args.getClass()} );
          m.setAccessible(true);
          m.invoke ( null,new Object[]{args} );
    catch ( Throwable t )
            System.out.println("Error launching application\n"+t);
    package Exec;
    import java.io.InputStream;
    public class App
    public static void main ( String[] args )
    new App().launch();
    public void launch()
    InputStream is;
    byte        b[] = new byte[512];
    int         i;
    is = this.getClass().getResourceAsStream ( "Seal.txt" );
    try {
          i=is.read(b,0,b.length);
          System.out.print(new String(b,0,i));
    catch ( Throwable t ) {System.out.println(t);}
    try { is.close(); } catch (Throwable t) {}
    App.jar
    META-INF/
    META-INF/MANIFEST.MF
    Exec/App.class
    Seal.txtNotes:
    1. Running c.class produces java.lang.NullPointerException
    2. If I use is = ClassLoader.getSystemResourceAsStream ( "Seal.txt" ); instead of is = this.getClass().getResourceAsStream ( "Seal.txt" ); and put the jar on the -cp of the command line, it works
    Can you please tell me why I am getting the exception ?
    Thank you

  • Error while running SRDemo tutorial application using Jdeveloper 10.1.3.0.4

    Hi,
    I have completed all the ten chapters in the SRDemo tutorial and when i run the SRList.jspx it is been running and will ask for the username and password so i am logging as username:bernst,password:welcome. When it opens in the browser it displays the following error and it displays."No Rows Yet" message will be displayed. Please help me regarding this...
    Note: The same error is coming even if we run the files which are provided with tutorial.
    JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002
    JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002
    JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002
    JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002
    JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: java.lang.RuntimeException, msg=javax.servlet.jsp.el.ELException: An error occurred while getting property "userId" from an instance of class oracle.srdemo.view.UserInfo
    JBO-29000: Unexpected exception caught: java.lang.RuntimeException, msg=javax.servlet.jsp.el.ELException: An error occurred while getting property "userId" from an instance of class oracle.srdemo.view.UserInfo
    javax.servlet.jsp.el.ELException: An error occurred while getting property "userId" from an instance of class oracle.srdemo.view.UserInfo

    Hi,
    the databse is not available. Check the database connection and make sure the database listeber is up and running. If this issue persist and you run the tutorial based on TopLink, select the session.xml file and open the Structure window. Double click onto the entry shown and check the connect information.
    If you are usin ADF BC make use the tester to veriffy teh DB connection
    Frank

  • Display list of all phone Running the same application using wifi in c#

    someone help me  please
     I want list all the devices connected in my application usin wifi

    The closest can get is this thread
    http://stackoverflow.com/questions/2377426/how-to-scan-the-wireless-devices-which-exist-on-the-network/2396230#2396230
    To connect to wifi then you can use this:
    https://msdn.microsoft.com/library/windows/apps/dn297617
    chanmm
    chanmm

  • Is it possible to use Firefox to debug javascript files when running a web application using visual studio 2010

    I am trying to debug a ASP.Net web application within visual studio 2010 using Firefox. I am able to set breakpoints in my C# code and they work but if I set a breakpoint in a javascript file then these do not work when using Firefox. Is there any way to do this?

    Of course you can. I use the VS2010 built-in Javascript debug tool a lot, not only for IE, but also for firefox.
    I encountered the "break point not working" issue several times, according to my experience, following is the solution to this problem, give them a shot:
    1. There maybe errors in your javascript code, have a close look at your code, try to find the errors or eliminate this possibility.
    2. Sometimes you have to refresh the page once after the page is loaded the first time. This solves the problem most of the time.

Maybe you are looking for

  • Error while using Noetix Generator for OBIEE 11.1.1.6.8

    Hi Gurus, We are trying to implement Noetix views for OBIEE 11.1.1.6.8 using Noetix generator for oracle business intelligence,, but we are facing below error.. Please help, thanks in advance. " *Validation encountered following warnings..* *Could no

  • Importing word file into InDesign problems

    I use the following code: myText.Place("C:\Development\memoTest Assignments\temp.docx"), the doc file will become Objective Experience Education Statement although original doc file is Objective Experience Education Statement It seems it will cause b

  • How can we display photo of particular person on webdynpro abap view

    hello gurus,                  i am very new to webdynpro abap.i have one requirement.could any one can suggest me to overcome my requirement. in my requirement i have one view.in that view i need to display one photo image which ever saved on my desk

  • Excel charset issue. Scrambled output.

    I faced this issue many times, but whenever the issue recurs, I end up with no clue of what's going wrong. Trying to dump data to an excel file:                     iResponse.setHeader("application/vnd.ms-excel; charset=UTF-8", "content-type");      

  • WWSBR_ALL_ITEMS and item level security - BUG?

    Hi, View WWSBR_ALL_ITEMS does not seems to work correctly when using item level security on a folder. If I add an item to a folder with item level security enabled and do NOT define any special access settings for this item, ie the item setting is "I