Executing jar from java code, then kill parent java code

Please suggest if there is any best way around on executing jar from java code then killing parent java code.
a) I have desktop based java application say "Monitor.java" which runs every 5 minutes.
b) How can I START external java application say "execute.jar" from Monitor.java THEN EXIT Monitor.java
I tried various options using "ProcessBuilder" and calling bat file but I need Monitor (parent application to EXIT, immediately after calling child (execute.jar)
Try1) ProcessBuilder builder = new ProcessBuilder("java -jar execute.jar");          
Process process = builder.start();
Try2) Runtime r = Runtime.getRuntime();
Process p = null;
p = r.exec(new String[] { "cmd", "/c", "start C:/temp/Test.bat" });

I have a requirement to transfer data from one db to another db from Java Application Layer.Maybe, maye not. We get all sorts of weird "requirements" - which are nothing but thoughts or proposed solutions.
But,
Did the "requirement" mention whether the table existed already or not in the target database? - If not, did it tell you to create it - drop/create it?
Did the "requirement" deliver some explanation to why this copying was neeeded? - Are we talking replication? - Or a one time cloning?
Etc, etc,
Personally I would always argue against a "reuirement" like that. - It just isn't the way to do it. Period.
Regards
Peter
P.S: If you are satisfied with what COPY does, then you could let Java make an OS call and do it from there?

Similar Messages

  • Creating executable JAR from JDeveloper 11

    Hello
    Iv'e been using JDeveloper for developing my Java desktop app. It includes my classes and some additional external jar's. From within JDeveloper everything works fine, but now I want to deliver my app as a single JAR file (including the external jars).
    I searched and searched and couldn't find such an option. I tried creating deployment profiles and deploy my app but the resulting JAR was very small, did not include the utility jars and did not run in double clicking.
    I tried both Eclipse and NetBeans and they produced nice running executable jars of the sane application with only a few clicks. However, Im used to JDeveloper and would rather continue working with it. Is there a way to create a complete executable jar from JDeveloper (or maybe a plugin) ?
    If not than how do I do it manually so I can write my own generator ? (I know the basics, but how do I include the library jars ?)
    Thanks
    Guy Shilo

    Hi
    If you to want include external jars, don't keep those inside src folder but outside to that folder. Then only framework consider this as resources and will be packed while deploying. You can ensure it by creating a simple file using wizard. It will be displayed in application navigator under the folder 'Resources'
    See the related thread from How to read .txt file from adfLib jar at model layer using relative path . See what
    Frank Nimphius has replied. You may get some idea
    Edited by: Raguraman on Dec 13, 2011 10:12 PM

  • Running executable jar from within a java program

    Is there a way to launch an executable jar in a java program? I tried wrapping the jar in an exe and calling it using Runtime exec() and though this approach works it does only for windows. I want it to work for unix/linux too.

    jaki wrote:
    Yes, but it's a sub process.Nope.
    Hence the calling process doesn't quit unless the called one returns.Wrong.
    My calling program is actually a jar and what Im trying to do is delete the jar after it's done running. But the above method (of launching a separate jar doing the deletion) doesn't seem to work for the above mentioned reason.Wrong.
    If you could tell me any other way it would really be a big help.You don't need any other way. Maybe you need to allow some time for the calling program to wind up. 20 seconds may be overkill, but I'm not in the mood to find how short it can be and still succeed.
    The two classes are packaged in separate jars.import java.io.IOException;
    public class Deletee {
        public static void main(String[] args) {
          try {
             String[] cmds = {"java", "-jar", "E:/temp/Deleter.jar"};
             Runtime.getRuntime().exec(cmds);
             System.exit(0);
          } catch (IOException ex) {
             ex.printStackTrace();
    import java.io.File;
    import javax.swing.JOptionPane;
    public class Deleter {
       public static void main(String[] args) {
          File file = new File("E:/temp/Deletee.jar");
          try {
             Thread.sleep(20000);
          } catch (InterruptedException ex) {
             ex.printStackTrace();
          if (file.delete()) {
             JOptionPane.showMessageDialog(null, "Deleted");
          } else {
             JOptionPane.showMessageDialog(null, "Oops");
    }Try it and see for yourself.
    db

  • Input to an executable jar from a batch file

    Hi, I have created an executable jar program to receive the input during runtime from a batch file. I have tried to run the program by passing arguments at runtime but the code doesn't seem to execute. Can anyone help me out to pass an argument to the java program using the batch file. The flow of my project is -> The batch file triggers the executable jar file (I am able to execute till this !) -> The input to the executable jar file should be fetched from the arguments given in the batch file which will be taken as the input for the java program.

    My java code prompts the user to enter the data but the batch file when executed executes the code but does not wait for the user input. This is the message my batch file displays when executed.
    C:\Users\Administrator\Downloads\BatchTool>java -Xms512M -Xmx512M -jar Program.jar -o true
    Enter custom directory :
    C:\Users\Administrator\Downloads\BatchTool>PAUSE
    Press any key to continue . . .
    If I press any key the program exits
    Is there an option to give the input via batch code ? My doubt is not in the java code. Its the batch file which triggers the code and i want the batch command which will trigger the input to the code being executed.
    Is there a way to give the input to this batch file ?
    C:\Users\Administrator\Downloads\BatchTool>java -Xms512M -Xmx512M -jar Program.jar -o true * Can i replace this code with an input for the java code ? *
    Edited by: Raja Pandian C on Dec 21, 2012 2:26 PM
    Edited by: Raja Pandian C on Dec 21, 2012 2:27 PM

  • Running executable JARs from Windows

    Hi!
    I have this executable JAR file with no problems for running it from the Windows console using the "java -jar jarfile" command. But if I double click the same JAR file in Windows explorer I get a "Main class not found" error. Does anyone know what's happening here ?
    Thanks in advance

    I think the following varies somewhat depending on which Windows you are using. On Win 2000 in a Windows folder, select Tools menu, Folder Options and select File Types. Then select JAR and click on Advanced. Under Actions, there select "open" and click on Edit. For the Application, you should see something like "C:\Program Files\Java\j2re1.4.1_01\bin\javaw.exe" -jar "%1" %*

  • Error when executing jar from command window pla help

    Hello
    I have a project which calls a webservice, I am using Jdeveloper 10.1.3.4
    I deployed the project in a jar file and included all the necessary libraries in it,
    but when executing the jar from command window I am getting the exceptions below
    the statement which cause the error is : PROXY= new JoPayWebServiceClient();
    please help
    Exception in thread "main" java.lang.NoClassDefFoundError
    at oracle.j2ee.ws.common.encoding.soap.StandardSOAPTypeMappings.class$(S
    tandardSOAPTypeMappings.java:125)
    at oracle.j2ee.ws.common.encoding.soap.StandardSOAPTypeMappings.<init>(S
    tandardSOAPTypeMappings.java:558)
    at oracle.j2ee.ws.client.BasicService.createSoapMappings(BasicService.ja
    va:259)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:236)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: java.lang.ClassNotFoundException: javax.activation.DataHandler
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    ... 17 more
    C:\>

    Hi Arun
    I added all the jars I found in jdeveloper log as you told me , but still I have this error:-
    standard type mapping initialization error: javax.xml.rpc.JAXRPCException: javax
    .xml.soap.SOAPException: Unable to create SOAP Factory: Provider com.sun.xml.mes
    saging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.LiteralAnyElementSerializer.<i
    nit>(LiteralAnyElementSerializer.java:16)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 14 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:33)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:93)
    ... 18 more
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.LiteralAnyElementSerializer.<i
    nit>(LiteralAnyElementSerializer.java:16)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 14 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:33)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:93)
    ... 18 more
    Exception in thread "main" java.lang.NullPointerException
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.registerS
    erializer(JoPayWebServiceService_SerializerRegistry.java:45)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:32)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    C:\>

  • Error when executing jar from command window PLZ HELP URGENT

    Hello
    I have a project which calls a webservice, I am using Jdeveloper 10.1.3.4
    I deployed the project in a jar file and included all the necessary libraries in it,
    but when executing the jar from command window I am getting the exceptions below
    the statement which cause the error is : PROXY= new JoPayWebServiceClient();
    please help
    Exception in thread "main" java.lang.NoClassDefFoundError
    at oracle.j2ee.ws.common.encoding.soap.StandardSOAPTypeMappings.class$(S
    tandardSOAPTypeMappings.java:125)
    at oracle.j2ee.ws.common.encoding.soap.StandardSOAPTypeMappings.<init>(S
    tandardSOAPTypeMappings.java:558)
    at oracle.j2ee.ws.client.BasicService.createSoapMappings(BasicService.ja
    va:259)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:236)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: java.lang.ClassNotFoundException: javax.activation.DataHandler
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    ... 17 more
    C:\>

    I added all required jars but still I get this error :-
    standard type mapping initialization error: javax.xml.rpc.JAXRPCException: javax
    .xml.soap.SOAPException: Unable to create SOAP Factory: Provider com.sun.xml.mes
    saging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.LiteralAnyElementSerializer.<i
    nit>(LiteralAnyElementSerializer.java:16)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 14 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:33)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:93)
    ... 18 more
    CAUSE:
    javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable to create SO
    AP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl n
    ot found
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:282)
    at oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(
    BasicService.java:244)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:26)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    Caused by: javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Unable t
    o create SOAP Factory: Provider com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFacto
    ry1_1Impl not found
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:95)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:62)
    at oracle.j2ee.ws.common.encoding.literal.LiteralAnyElementSerializer.<i
    nit>(LiteralAnyElementSerializer.java:16)
    at oracle.j2ee.ws.common.encoding.literal.StandardLiteralTypeMappings.<i
    nit>(StandardLiteralTypeMappings.java:198)
    at oracle.j2ee.ws.client.BasicService.createLiteralMappings(BasicService
    .java:280)
    ... 14 more
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP Factory: Provider
    com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl not found
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:33)
    at oracle.j2ee.ws.common.encoding.literal.LiteralFragmentSerializer.<ini
    t>(LiteralFragmentSerializer.java:93)
    ... 18 more
    Exception in thread "main" java.lang.NullPointerException
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.registerS
    erializer(JoPayWebServiceService_SerializerRegistry.java:45)
    at has.proxy.runtime.JoPayWebServiceService_SerializerRegistry.getRegist
    ry(JoPayWebServiceService_SerializerRegistry.java:32)
    at has.proxy.runtime.JoPayWebServiceService_Impl.<init>(JoPayWebServiceS
    ervice_Impl.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactory
    Impl.java:92)
    at oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryIm
    pl.java:121)
    at has.proxy.JoPayWebServiceClient.<init>(JoPayWebServiceClient.java:18)
    at moict.Main.confirmPayment(Main.java:142)
    at moict.Main.main(Main.java:93)
    C:\>

  • Creating executable jar from a project

    Dear all,
    I created a GUI project with ms-access as backend. now i want to create an executable jar out of these project(all classes). so any one please guide to achieve this. I am using netbeans 5.5.
    thank you,
    ishan

    From Projects window in netbeans, right click your project, and from context menu select Properties. From Project Properties Dialog
    highlight Run which in the left pane tree.
    on the right pane select the main class of your project by writting its complete package path in the field beside "Main Class:" label, or simply click "Browse..." to choose it.
    And have a nice time.
    Thanks.
    Ahmad Elsafty

  • Execute jar from my java code

    Hi,
    My CDC application run in Windows Mobile, with Creme JVM.
    I need from my java code, run other .jar. and later, finish may application atual.
    I try like this:
    Runtime.getRuntime().exec("\\Windows\\CrEme\\bin\\CrEme.exe -jar \\Windows\\sample\\cube.jar");
    System.exit(0);
    But my second jar its not started. Anybody can help me?
    Other question, If I getRuntime(), am I using the atual instance of my JVM. If I exec other JAR, and later exit() my atual, the second jar its exit too?
    I'm building a automatic upgrade module in my application. With Hessian (Web Service), I download my new jar. But, I need have other jar, start it and close my jar atual. My second jar showld be delete my atual, rename the new jar downloaded for the standard name, and later start the jar download, how new version.
    thanks,
    Fabio
    Edited by: FabioPinheiro on Mar 28, 2008 4:41 AM

    Hi all,
    The Mr. Rene (from NSIcom) answer my question
    Just
    Add flag -mi.
    (multiple instance)
    I try and work fine.
    thanks Rene..
    Fabio

  • Executing WINWORD from both Windows and linux using Java

    Dear All,
    I have a problem when trying to use Runtime class to execute a winword document. My code is as follows.
    Runtime r= Runtime.getRuntime();
    try{
    r.exec("rundll32"+" "+"url.dll,FileProtocolHandler"+" "+"WINWORD"+ " "+"file://C://welkom.doc");
    catch(Exception ex){
    System.out.println("Unable to open the doc file:"+ex);
    When I execute this swing application with the above, the program is unable to open the specific file. And it says "Problem with the short cut, unable to open the file". When I run the program without the file name, it opens a new doc file.
    Attn: what I want to do here is I need to open the winword file from both windows and linux. So I cannot use the relative path of the WINWORD.exe file.
    Can anyone help me?
    Thanks in advance.
    Regards,
    Bala

    If you take a look at the api, there's an exec(String[]) method. This is the one you should use when calling a command with multiple parameters.
    so something like...
    String[] cmd = new String[] {"rundll32", "url.dll,FileProtocolHandler", "WINWORD", "file://C://welkom.doc"}
    r.exec(cmd);

  • Runtime.exec() then kill parent process, then you lose the System.out

    If I do this:
    in Proggie 1:
    Process proc = Runtime.getRuntime().exec("proggie");
    System.exit();in Proggie 2:
    System.out.println("some string"); // goes nowhere??How can I redirect Proggie 2 System.out to the console that was used to start Proggie 1?

    How can I redirect Proggie 2 System.out to the
    console that was used to start Proggie 1?No way with current Java. This is a long and sad story that Java does not have i/o redirection. See for example one of the entries in the bug database:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4960438
    Harald.
    http://www.ebi.ac.uk/Rebholz-srv/whatizit/software

  • Executable JAR file: Could not find the main class.

    Hello,
    I have a problem with making an executable JAR file.
    I have written a JAVA program that consists of five different classes of which User.java is the main class and I have saved a text document with Main-Class: User and a blank line after that.
    If I try:
    jar cmf MainClass.txt User.jar User.class Beheerder.class Operator.class Manager.class MaakVisueelSchema.class
    it makes a executable jar file which actually works! :)
    But when the Operator class trys to open the MaakVisueelSchema class the screen stays blank.
    I can run MaakVisueelSchema with java MaakVisueelSchema.
    So I tried to make an executable JAR that consists only of MaakVisueelSchema, the same way as I did for User:
    Main-Class: MaakVisueelSchema
    jar cmf MainClass.txt MaakVisueelSchema.jar MaakVisueelSchema.class
    Then I get the error message:
    Could not find the main class. Program will exit.
    from the Java Virtual Machine Launcher.
    The big difference between MaakVisueelSchema and the other classes is that MaakVisueelSchema contains a PaintComponent method and an ComponentListener. Is it possible that one of those creates the error?
    Can anyone help me with this problem?
    Thanks in advance!
    Bye!

    Yes,
    I tried:
    jar xvf MaakVisueelSchema.jar
    and it returns:
    META-INF/
    META-INF/MANIFEST.MF
    MaakVisueelSchema.classN/G. You need to manually create a manifest file in a text editor, have it point to your main class, and enter it in your jar command as an argument.

  • Unable to execute JAR files

    I am unable to execute jar files and applets. Also, the Java Web Start and the Java Plugin Control Panel will not load. I have unloaded the JRE and installed other versions. To date I have loaded and unloaded the following:
    1.4.1
    1.4.2_01, _02, _04
    1.4.2_04 SDK
    But no change in the outcome.
    The javaw application starts but does not load the jar file.
    The applets and jar files run fine on other computers with any of those JRE/SDK's installed.
    Any suggestions would be helpful.

    Command line
    To create a JAR file >jar cvf filename.jar filename.class(s)
    To view the contents of a JAR file >jar tvf filename.jar
    To extract the contents of a JAR file >jar xf filename.jar
    To extract specific files from a JAR file >jar xf filename.jar archived-file(s)
    To run an application packaged as a JAR file
    >jar xvf filename.jar META-INF/MANIFEST.MF
    The above will place META-INF/MANIFEST.MF file in your working directory. Open this file in text editor. Under Version, type in
    Main-Class: filename
    example;
    Manifest-Version: 1.0
    Main-Class: SelectPurchase
    Created-By: 1.3.0 (Sun Microsystems Inc.)
    save file
    update META-INF/MANIFEST.MF file in jar file with;
    jar umf META-INF/MANIFEST.MF filename.jarto run jar file from command line;
    java -jar filename.jarTo run an application packaged as a JAR file
    (version 1.1) jre -cp app.jar MainClass
    (version 1.2 -- requires Main-Class
    manifest header)
    To invoke an applet packaged as a JAR file <applet code=AppletClassName.class
    archive="JarFileName.jar"
    width=width height=height>
    </applet>
    Does anyone know how to get the application to run by clicking on a Desktop Icon?

  • Why -jar option used to install a software which is in executable jar file?

    Hi all,
    i have a query, i have a generic installer which is used to install the oracle weblogic 10.3 software in unix platform(i.e., which is in .jar extension) which is executable jar file.
    To install this software which have to use -jar option to install
    java -jar net_server<version>_generic.jar
    my question that why we use -jar option to install or to extract the software
    can any one clarify my doubt...
    thanks in advance
    abhi
    Edited by: sumanth_abhi on Jan 27, 2009 11:50 PM

    According to the Jar Guide (http://java.sun.com/j2se/1.4.2/docs/guide/jar/jarGuide.html)
    Executable Jar Files
    On Microsoft Windows systems, the Java 2 Runtime Environment's installation program will register a default association for Jar files so that double-clicking a Jar file on the desktop will automatically run it with javaw -jar. Dependent extensions bundled with the application will also be loaded automatically. This feature makes the end-user runtime environment easier to use on Microsoft Windows systems.
    The Solaris 2.6 kernel has already been extended to recognize the special "magic" number that identifies a Jar file, and to invoke java -jar on such a Jar file as if it were a native Solaris executable. A application packaged in a Jar file can thus be executed directly from the command line or by clicking an icon on the CDE desktop.
    Despite that every JAR file can be executed as a program if and only if the META-INF/Manifest.mf contains the Main-Class tag. This done through java -jar jarfile.jar
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Executable JAR witn anoter JAR

    Hello, I need some help to be able to create an Executable JAR from a project containing already one JAR
    Here is the situation :
    I've made a program who acceses Oracle DB and therefore I have integrated an External JAR (ojdc14_g.jar) in my project so I can get access to the classes needed to synchronize with the DB.
    I'm using Eclipse so I was able to generate automatically an auto-executable JAR. But the problem is that obviously the import statement :
    import oracle.jdbc.*;
    that I'm using to access the classes in the oracle External JAR is not undersood by the auto-executable JAR and I get :
    A fatal exception occured - Program will Exit
    Anyone an idea ??
    PS: the generation of auto-executable JAR with eclipse works perfectly with my other projects
    I'm using j2sdk 1.4.2.05
    Thanks in advance

    Hi guys!
    Sorry for the dot, I had missed that :(
    But still doesn't work.....
    I have been trying the following :
    Class-Path: . ./JarLibrary/ojdbc14_g.jar
    Class-Path: . /JarLibrary/ojdbc14_g.jar
    Class-Path: . JarLibrary/ojdbc14_g.jar
    Class-Path: . .\JarLibrary\ojdbc14_g.jar
    Class-Path: . \JarLibrary\ojdbc14_g.jar
    Class-Path: . JarLibrary\ojdbc14_g.jar
    and even
    Class-Path: . .JarLibrary.ojdbc14_g.jar
    Class-Path: . JarLibrary.ojdbc14_g.jar
    But I always get NoClassDefFoundError
    any ideas ? Could it be my java version ? I'm working with 1.4.2_05
    or any other ideas to be able to double-click on a Icon to run an Java application ?
    Hope I can give you those 10 Dukes soon

Maybe you are looking for

  • It hangs when playing games

    My system is Windows 7 - 64 bit operating system I've used Firefox for many many years and always praised it compared to EI. I am afraid I wont be able to praise it much more. It stinks. It hangs mostly when I am playing games or looking at pictures

  • BI Publisher Enterprise 11g prevent users from scheduling reports

    Hi there I have created an intranetreptuser that I would like only to have access to running reports in BI publisher and not scheduling them. I also created an application policy that only has the one policy: runreportsonline and granted that policy

  • Ipod only charges for a few seconds when connected through USB

    Hello. Thank you for reading. I recently got a replacement ipod. No problem with putting songs back on the new one. However, whenever i plug my ipod into the usb cord on my work computer to charge my ipod, the do not disconnect will come on and the i

  • Problems with word files in pages

    I have been able to open word documents in Pages on my MacBook Pro since I got iWork '09 last year. However, I have just purchased an 27in iMac, and I can no longer open word documents using Pages. Anybody have a similar experience, and if so, what's

  • API to update MINORITY OWNED at supplier header

    Hi, can anybody brief me about the following API in r12 and also if have script please provide: " POS_SUPP_CLASSIFICATION_PKG.update_bus_class_attr " I am trying to update APPLICABLE flag and MINORITY OWNED at Suplier Header level (AP_SUPPLIERS). Tha