Running Java program outside Jdeveloper -- issue with dependent libaries

Hello, I am using Jdeveloper 11.1.1.7 and have built a java application that imports XML Files into Oracle, then exports an XML file for others to pick up.  I use jaxb, java persistance, and javax.mail etc....
when I run the application in Jdeveloper it works properly, and now I am trying to place the application in my u:\temp directory to test run from the command line.  Later I will move this all to linux to run.
In Jdeveloper I followed the directions about adding all the dependent jars into the application using the File Groups ( http://tompeez.wordpress.com/2011/06/01/creating-a-jar-file-in-jdeveloper/ )
Doing this creates a very big jar file with all of the dependent jar files in it called xmlseprocessing.jar  and then I run it as such in dos
set classpath=.;javax.mail_1.4.jar;xmlseprocessing.jar
u:
cd u:\temp
C:\Oracle11117\Middleware\jdk160_24\bin\javac commandLineStartup.java
C:\Oracle11117\Middleware\jdk160_24\bin\java  commandLineStartup
I get this error: 
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException
I look on the internet, and finally decide to grab the javax.mail_1.4.jar and put it in my u:\temp directory, and update the classpath, and run it, but then I get this error.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Persistence
        at in_jpa_db_objects.JavaServiceFacade.<init>(JavaServiceFacade.java:19)
        at util_import_factory.OraConnInput.OraCleaner(OraConnInput.java:43)
        at startup.startImport.processIncomingXMLs(startImport.java:49)
        at startup.startAll.startupProcesses(startAll.java:92)
        at commandLineStartup.main(commandLineStartup.java:23)
Caused by: java.lang.ClassNotFoundException: javax.persistence.Persistence
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
        ... 5 more
My assumption is that I am going to have to grab every jar, add it to my local directory and create a very long path like oracle does when starting the application from jdeveloper (see below)
QUESTION:  Given that I have added all of the required libraries to the xmlseprocessing.jar -- why is this happening?  Any solution?  Am I doing something wrong?
Points awarded!!!!  Any help would be greatly appreciated.
This is what I see in the log window when I run the application in Jdeveloper. 
C:\Oracle11117\Middleware\jdk160_24\bin\javaw.exe -clientlasspath C:\JDeveloper\mywork\xmlProcessing20131021_1100\.adf;C:\JDeveloper\mywork\xmlProcessing20131021_1100\XML_SE\classes;C:\Oracle11117\Middleware\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle11117\Middleware\modules\com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar;C:\Oracle11117\Middleware\modules\org.eclipse.persistence_1.1.0.0_2-1.jar;C:\Oracle11117\Middleware\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\Oracle11117\Middleware\modules\javax.persistence_1.0.0.0_2-0-0.jar;C:\Oracle11117\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\Oracle11117\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\Oracle11117\Middleware\modules\javax.jsf_1.1.0.0_1-.jar;C:\Oracle11117\Middleware\modules\javax.ejb_3.0.1.jar;C:\Oracle11117\Middleware\modules\javax.enterprise.deploy_1.2.jar;C:\Oracle11117\Middleware\modules\javax.interceptor_1.0.jar;C:\Oracle11117\Middleware\modules\javax.jms_1.1.1.jar;C:\Oracle11117\Middleware\modules\javax.jsp_1.2.0.0_2-.jar;C:\Oracle11117\Middleware\modules\javax.jws_2.0.jar;C:\Oracle11117\Middleware\modules\javax.activation_1.1.0.0_1-1.jar;C:\Oracle11117\Middleware\modules\javax.mail_1.1.0.0_1-4-.jar;C:\Oracle11117\Middleware\modules\javax.xml.soap_1.3.1.0.jar;C:\Oracle11117\Middleware\modules\javax.xml.rpc_1.2.1.jar;C:\Oracle11117\Middleware\modules\javax.xml.ws_2.1.1.jar;C:\Oracle11117\Middleware\modules\javax.management.j2ee_1.0.jar;C:\Oracle11117\Middleware\modules\javax.resource_1.5.1.jar;C:\Oracle11117\Middleware\modules\javax.servlet_1.0.0.0_2-5.jar;C:\Oracle11117\Middleware\modules\javax.transaction_1.0.0.0_1-ar;C:\Oracle11117\Middleware\modules\javax.xml.stream_1.1.1.0.jar;C:\Oracle11117\Middleware\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\Oracle11117\Middleware\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\Oracle11117\Middleware\jdeveloper\ide\macros\..\..\..\oracle_common\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\Oracle11117\Middleware\jdeveloper\ide\macros\..\..\..\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n.jar;C:\Oracle11117\Middleware\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;C:\Oracle11117\Middleware\oracle_common\modules\oracle.dms_11.1.1\dms.jar -Djavax.net.ssl.trustStore=C:\Oracle11117\Middleware\wlserver_10.3\server\lib\DemoTrust.jks commandLineStartup

rp0428,
Thank you for your reply.  Please understand that I am on a tight deadline and have spent two weeks writing an application that I cannot run outside of jdeveloper.  I only have some experience with java -- I have been working with Jdeveloper extensively, but have only been deploying to Weblogic, so a lot of this is foreign to me.  
I had not noticed the comments underneath.  I now understand that I need to extract all the jars that are dependent (all the files added to my jar file when I added the File Group Library), and did so.  I also found a blog on this  https://blogs.oracle.com/bwb/resource/Jdev_jar_deployments/Creating_Jar_Deployments_with_JDeveloper.html
So I have all these jars and the jar of the application that was created.   I created a small class called commandLineStartup.java that simply had a main method in it, where I called the program to run in my xmlseprocessing.jar
I created a bat file that set the classpath (which I painstakingly created by taking the startup script that Jdeveloper created when running the program and replaced the various directory structure to match the location was running from
///// a.bat file runs this:
set classpath=C:\temp\xmlseprocessing.jar;%dir%\wlfullclient.jar;C:\temp\javax.mail_1.1.0.0_1-4-1.jar;C:\temp\wljmsclient.jar;C:\temp\com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar;C:\temp\org.eclipse.persistence_1.1.0.0_2-1.jar;C:\temp\com.bea.core.antlr.runtime_2.7.7.jar;C:\temp\javax.persistence_1.0.0.0_2-0-0.jar;C:\temp\xmlparserv2.jar;C:\temp\xml.jar;C:\temp\javax.jsf_1.1.0.0_1-2.jar;C:\temp\javax.ejb_3.0.1.jar;C:\temp\javax.enterprise.deploy_1.2.jar;C:\temp\javax.interceptor_1.0.jar;C:\temp\modules\javax.jms_1.1.1.jar;C:\temp\javax.jsp_1.2.0.0_2-1.jar;C:\temp\javax.jws_2.0.jar;C:\temp\javax.activation_1.1.0.0_1-1.jar;C:\temp\javax.xml.soap_1.3.1.0.jar;C:\temp\javax.xml.rpc_1.2.1.jar;C:\temp\javax.xml.ws_2.1.1.jar;C:\temp\javax.management.j2ee_1.0.jar;C:\temp\javax.resource_1.5.1.jar;C:\temp\javax.servlet_1.0.0.0_2-5.jar;C:\temp\javax.transaction_1.0.0.0_1-1.jar;C:\temp\javax.xml.stream_1.1.1.0.jar;C:\temp\javax.security.jacc_1.0.0.0_1-1.jar;C:\temp\javax.xml.registry_1.0.0.0_1-0.jar;C:\temp\ojdbc6dms.jar;C:\temp\orai18n.jar;C:\temp\ojdl.jar;.
C:\Oracle11117\Middleware\jdk160_24\bin\javac commandLineStartup.java
C:\Oracle11117\Middleware\jdk160_24\bin\java  commandLineStartup
/////  This is the commandLineStartup file
public class commandLineStartup{
    public static void main(String[] args) {
  startup.startAll s = new startup.startAll();
               s.startupProcesses() ;
I found this also on including the meta-inf directory files.   https://blogs.oracle.com/bwb/resource/Jdev_jar_deployments/Creating_Jar_Deployments_with_JDeveloper.html
Now it blows up with this error  java.lang.NoClassDefFoundError: weblogic/utils/NestedException
So I scour the internet and find a solution to create a wlFullClient.jar (http://docs.oracle.com/cd/E12840_01/wls/docs103/client/jarbuilder.html),
Now I run it and get Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/management/WebLogicMBean
And now I get this:  Exception in thread "main" java.lang.NoClassDefFoundError: oracle/dms/console/DMSConsole
This is absolutely crazy.  I am doing this all manually and by hand, which is error prone.  There has got to be a better way of doing it.  Does ant make it so you can deploy and run? Is there some program that does this for me?   What happens when I throw this out on linux?  Another two days of idiotic troubleshooting?
Thank you,
Stuart
All I want to do is run the thing.  I have now spent two days putting files into this and that directory, creating the Jar with and without the dependent jars and trying every combination.
Up to this point I have been impressed with Java.  Now I am about to throw my computer out the window.

Similar Messages

  • Can't run java program with GUI

    My computer can run java program properly.
    However, for those program with GUI (using swing),
    my computer is unable to display the GUI.
    What's wrong with it? Is there any PATH I need to set before running GUI program?
    Thanks
    icedgold

    Cut, copy, paste then compile and run this;-import java.awt.*;
    import javax.swing.*;
    public class MyJFrame extends JFrame {
      public MyJFrame() {
          super("My first JFrame");
          Container c  = getContentPane();
          JPanel panel = new JPanel();
          panel.setBackground(Color.white);//  (new Color(255, 255, 255));
          JLabel jl = new JLabel("Yes it works");
          panel.add(jl);     
          c.add(panel);
      public static void main(String[] args) {
        MyJFrame frame = new MyJFrame();
        frame.setSize(180,120);
        frame.setLocation(200, 300);
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.setVisible(true);
    }

  • Regarding Sun Java System Application Server Issue with JVM

    Regarding Sun Java System Application Server Issue with JVM
    Hi
    I have installed SJSAS9.1 on solaris system. I m trying to deploy war file which i compiled in windows enviorment by jdk1.5.0_05. Every time i got the following error :
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP
    PWC6199: Generated servlet error:
    [javac] javac: invalid target release: 1.5
    [javac] Usage: javac
    [javac] where possible options include:
    [javac] -g Generate all debugging info
    [javac] -g:none Generate no debugging info
    [javac] -g:{lines,vars,source} Generate only some debugging info
    [javac] -nowarn Generate no warnings
    [javac] -verbose Output messages about what the compiler is doing
    [javac] -deprecation Output source locations where deprecated APIs are used
    [javac] -classpath Specify where to find user class files
    [javac] -sourcepath Specify where to find input source files
    [javac] -bootclasspath Override location of bootstrap class files
    [javac] -extdirs Override location of installed extensions
    [javac] -d Specify where to place generated class files
    [javac] -encoding Specify character encoding used by source files
    [javac] -source Provide source compatibility with specified release
    [javac] -target Generate class files for specific VM version
    [javac] -help Print a synopsis of standard options
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1 logs.
    I have cheked jvm version on both system the only difference is :
    Solaris points to jdk 1.5.0_09
    Windows point to jdk1.5.0_05
    Even i tried to run blank jsp also but again i got the same error.
    Can any help me to sort out the problem or give me any idea so i can do something by my own.
    Thanks in Advance
    Gagan

    Do you have ANT installed and available?
    Thanks,
    Kedar

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • Run java program overnight

    Hey,
    I left my office yesterday evening leaving my macbook on
    while it was running a java program that it's supposed to requires between 2 and 3 hrs.
    This morning not only the program was still running (hard to believe it takes more than 12 hrs!)
    but when I typed in the shell the 'ps -all' command
    it says the program has been running for around 30 mins, and now it's still running!
    Is it possible that with certain settings the mac stops its processes after a while?
    What should I check?
    Thanks for helping, I'm actually a newbie in the mac world:)
    g

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • Can we able to run java program inside  javascript

    Hi all
    can we able to run java program inside javascript or integrate java with javascript.....whether its possible...

    No. You can't execute Java code from within a JS script in Acrobat/Reader.

  • Vim and Eclim (Java): Run Java program in embedded terminal window

    Hello all,
    I'm trying to create a decent Vim setup for Java programming. I've installed Eclim, and it works alright. However, one annoyance I have is the way that Eclim runs Java programs. When run (via the :Java command in Vim), a Java program runs in a new shell instance pretty independent from Vim, and then when the program terminates (and Enter is pressed), the output is put into a new buffer at the bottom of the Vim window with the output.
    The problem with this is that I must press Enter to go back to Vim after the program terminates, and then the output buffer is automatically selected even though I most likely do not care to copy any of the output.
    So, this is what I would like to happen:
    - I run my Java program somehow (doesn't have to be with :Java)
    - A buffer containing the running program in a shell is put on the screen (if not already there)
    - The program terminates, and the focus did not change to the output buffer
    At the very least, I want the focus to not change to the output buffer after the program is done running.
    Any ways to at least somewhat accomplish what I'm trying to  get at?

    Trent wrote:
    Yeah? I had AP CS when they first introduced the GridWorld case study. I hope you get more out of the class than I did.
    I have never used Java except for that and my first CS class at university. I eventually realized that software (as a job) wasn't for me and took a route closer to EE. I still fight to avoid being called a programmer though
    I like the idea of programming for a job, not necessarily "software development", something computer science-y sound good to me.
    But anyway, to end on an on-topic note, I embedded gvim inside Eclipse as described here.

  • Running java program as a server

    Please advise of what's difference in running java program with -server option and just runing it like java program1?
    Thx

    -server option uses the server VM for the program and if you use -client it will be run using client VM. Default is client.
    The main difference is the optimations. When you are running with -client option the program is optimized to startup faster and to give better response times.
    -server option optimizes for better resourse management which is important than start up time in server systems

  • Running java program at windows startup

    I need to run java program at startup and then it will continue to run in its own thread.
    Any body having idea how to do that programmatically?
    Zeeshan

    This is one option but this is not feasible in my scenario as this application will be running over a network which involves hundreds of computer so is there any way to do it programatically?
    I mean if I can load java class file through an exe file then I can load my class file in the startup using C++.
    Any Suggestions.
    thanks for the help
    regards,
    Zeeshan

  • Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

    Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

    Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

  • How to run java signed applet in vista with changing IE security options

    how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
    without changing the security setting, how to run.

    j_nanaji9 wrote:
    how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
    without changing the security setting, how to run.Can't be done without changing the security setting.

  • How to Set up the  variables and others to compile and Run Java Programs

    Hello,
    I have just downloaded the jdk1.6.0_07 and jre1.6.0_07 and installed it in C:\Program files\Java in my Windows XP ,So please tell me how to sett up the enviroment variables etc to compile and run Java Programs from Command Prompt.
    thanks

    To set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows on Microsoft Windows:
    1. Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System on Windows 2000.
    2. Click Advanced > Environment Variables.
    3. Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is:
    C:\Program Files\Java\jdk1.6.0_<version>\bin

  • Run java program in background

    I want to run a java program in background in windowsXP...can anyone help please......can anyone suggest an easy software for running java program as windows service...i tried one but without any success

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • Compile and run java programs in different directroy

    Hi,
    I often encounter many problems when I run java programs in the different directories. Like
    javac -d dir_name a.java
    java -cp dir_name a
    Something wired often happens, such as, there is not a.java file in some directory, but javac -d dir_name a.java can still work or "java -cp dir_name a" often doesn't work. Moreover, file_name.jar is also a tough problem and solving compiling problems is often time-consuming.
    So I hope to read something about how to compile and run java programs in different directory properly.
    Could you pleae give me a detailed description for that or recommend a book or website?
    Thanks a lot.

    Can you post a small amount of code that does not work, including the directory structure, and the error messages? Some one here can likely explain the problem.

  • Hw do  u run java programs in xcode 4?

    hw do  u run java programs in xcode 4?
    pls tell the detailed steps fr running a java program

    Here is a document dated 2009: Introduction to Jar Bundler User Guide - Apple Developer
    ...I don't think JB is included now.

Maybe you are looking for

  • Problem with display of movie dvd

    If a movie DVD displays with a black band at the top and at the bottom of the screen on my 15" MacBook Pro, is there a way to view the DVD full-screen?  The way the movie displays now, it's only utilizing 1/2 the screen.

  • Start over in Dreamweaver CS6

    Does anyone know how to delete everything I've done in CS6 so I can start again from scratch?

  • Video recording with USB 6509

    I am working on one project. In which I have CCD image sensor with EIA B/W video camera and its output is connected to Analog Front End(AFE). The output of AFE is 12 Bit Digital data at the rate of 9 MHz. I am thinking to use USB 6509 for data acquat

  • ADF and EJB. Why so little samples / information

    Hi All, I was wondering if other JDev / ADF developers have the same feeling as me in regards to ADF / EJB. There is barely enough information and examples on using ADF with EJB. Seems that most examples and blogs are related to BC instead. I was rea

  • Multi selecter prompt issue

    Hi All, **Below issue i faced in OBIEE 10.1.3.2** but In my Dashboard page i have created a Multiselecter Prompt and i have selected more than one values in prompt. While exporting the dashboard page into PDF format the PDF showing only one value fro