Run java in bat file

hi
i used .bat file to run my java program, here's what i put inside the run.bat
java testbut it seems that i can only run java classes which are in the same folder as the .bat file
when i tried
java d:\folder\testan error will occur. how should i do it here? thanks

You can creating a jar file. After taht you can execute the java program like
java -cp Example.jar com.examples.MainClass
MainClass included main method. You can write an manifest.mf file.In the manifest file, you can describe the main class.

Similar Messages

  • Cannot run the bcp_extract.bat  file OMWB created

    Hello Everyone,
    I am working on transferring data offline using the OMWB.
    In OMWB ORACLE Model pane, i selected a user schema object, a table, and i chose Object<Generate SQL*Loader script.
    Now that i was able to find my bcp_extract.bat file, i copied the contents of the directory where OMWB generated the data unload scripts onto the computer that my source database, SQL SERVER 7, is installed.
    Per OMWB documentation, I modified the bcp_extract.bat file to include the source database Server Name. And I did remove the angle brackets as well. I double clicked the bcp_extract.bat file and a command window poped up and went down immediately. No data file was generated nor anything was added to the sql_load_script.bat file in the Oracle directory that was creatd by the Generate SQL*Loader Scripts.
    Is there any other information that i need to modify/add in order to be able to run the bcp_extract.bat file. In fact, i thought about adding the password after -P switch and see if i can run the file, but after adding the password i still could not get the bcp_extract.bat file running.
    I appreciate if someone can help me out to get the bcp_extract.bat file running.
    Thank you so much!
    Mitra

    Hello Everyone,
    I am working on transferring data offline using the OMWB.
    In OMWB ORACLE Model pane, i selected a user schema object, a table, and i chose Object<Generate SQL*Loader script.
    Now that i was able to find my bcp_extract.bat file, i copied the contents of the directory where OMWB generated the data unload scripts onto the computer that my source database, SQL SERVER 7, is installed.
    Per OMWB documentation, I modified the bcp_extract.bat file to include the source database Server Name. And I did remove the angle brackets as well. I double clicked the bcp_extract.bat file and a command window poped up and went down immediately. No data file was generated nor anything was added to the sql_load_script.bat file in the Oracle directory that was creatd by the Generate SQL*Loader Scripts.
    Is there any other information that i need to modify/add in order to be able to run the bcp_extract.bat file. In fact, i thought about adding the password after -P switch and see if i can run the file, but after adding the password i still could not get the bcp_extract.bat file running.
    I appreciate if someone can help me out to get the bcp_extract.bat file running.
    Thank you so much!
    Mitra

  • Error when trying to run the rcu.bat file as part of OBIEE 11g installation

    when trying to run the rcu.bat file as part of OBIEE 11g installation on windows 7 64 bit I am getting the following error
    "windows cannot find C:\Users\manoj\Desktop\Oracle.Make sure you typed the name correctly, and then try again".
    Please help me how to overcome this error, I am not able to understand why it is looking for C:\Users\manoj\Desktop\Oracle.
    Thanks
    Manoj

    after setting the ORACLE_HOME and Path environment variables also....I am still getting the same error...so is it like RCU can be run only on windows 7 32-bit machines and it does not work on 64-bit machines? and also it seems like the previous versions of OBIEE 10.1.3.X does not support windows 7 64-bit machines...
    please help me finding a solution to this error....
    and what are all the versions of OBIEE can be installed on windows 7 64-bit machines?
    can't we install OBIEE 11g on windows 7 64-bit machines without including RCU?
    thanks
    Manoj
    Edited by: mkumar on Jun 2, 2011 3:47 AM

  • How to run Executables or .bat files from Java?

    Hi!
    I need to open a Web Browser from Java App.
    Please, help me to do this without calling JNI
    -or-
    provide me with sample which works with
    Runtime.execute() method.
    I have done full permission:
    grant
         permission java.security.AllPermission "","";
    };Thank You in advance!

    To run any command from java code, the method is
    Runtime.getRuntime().exec( myCommandString )
    Where, myCommandString is something like "/full/pathname/command".
    If the pathname contains spaces, e.g. "c:\program files\windows\notepad", then enclose it in quotes within the quoted string. Or pre-tokenize them into elements of an array and call exec(String[] cmd) instead of exec(String cmd).
    From JDK1.3 there are two new overloaded Runtime.exec() methods. These allow you to specify starting directory for the child process.
    Note, there is a gotcha associated with reading output from commands. When the runtime exec's the process, it passes to it 3 streams, for stdin, stdout, and stderr; the out and err are buffered but the buffer size isn't very big. When your process runs, it reads (if needed) from in, and writes to out and err.
    If it doesn't write more than the buffer-size, it can run to completion.
    But if it tries to write more data to one or the other stream than the buffer can hold, the write blocks, and your process hangs, waiting for you to empty the buffer so it can write some more.
    So after the exec call, get the streams, and read from them in a loop until they both hit end-of-stream (don't block on either one, just read whatever is available from each, each loop iteration).
    Then when the streams have ended, call the process.waitFor() method to let it finish dying.
    Now, here is a code snippet how you achieve this.
    String strCommand = "cmd.exe /c " + strCommand;
    boolean bWait = true;
    //execute the command
    try
         Runtime r = Runtime.getRuntime();
         Process pr = r.exec(strCommand);
         Process pr = r.exec(callAndArgs);
         BufferedInputStream bis =new BufferedInputStream(pr.getInputStream ());
         int c=0;
         /** Outlet for IO for the process **/
         while (c!=-1)
              c=bis.read();
         /**Now wait for the process to get finished **/
         if(bWait == true)
              pr.waitFor();
              pr.destroy();
    catch(Exception e)
         System.out.println("Could not execute process " + strCommand);
         return(false);

  • Running .bat files from java code

    Dear Forum,
    I have seen numerous postings on the web about this question, still I have found no answer that works (for me)
    I�m trying to run a simple .bat file from a piece of java code , however it does not work. No error message , but still.
    Does anyone have a tip?
    best regards
    temuj
    try{
                String cmd = "cmd.exe C:\\mybat.bat";
                Runtime.getRuntime().exec(cmd);
    catch(IOException e){System.out.println("ERROR: "+e);}Message was edited by:
    temujin

    "cmd.exe C:\mybat.bat" is being passed to the OS for execution
    what happens when in a terminal/dos window you execute letter for letter:
    cmd.exe C:\mybat.bat
    The output will be identical to what is happening when java makes this call.

  • Getting error while running ua.bat file of Oracle Data Integrator 12cR1 (12.1.2.0.0) version

    Hi,
    I am using windows 7 professional(service pack 1) 64 bit operating system.
    After installing the odi 12c (enterprise edition) by executing the odi_121200.jar file I am getting the following error while trying to run the ua.bat file.
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [UPGAST-00056] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] error initializing upgrade plug-in for ODI.ODI1
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Cause: An unexpected error occurred initializing an upgrade plug-in.
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Action: Contact Oracle Support Services.  See the secondary error message for additional details.
    [2013-10-24T16:49:07.861+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] [[
    java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at oracle.ias.update.plugin.Plugin.instantiatePlugin(Plugin.java:248)
      at oracle.ias.update.plugin.Plugin.<init>(Plugin.java:229)
      at oracle.ias.update.plugin.Plugin.getPlugin(Plugin.java:180)
      at oracle.ias.update.plan.PlanStep.getPlugin(PlanStep.java:335)
      at oracle.ias.update.plan.PlanString.<init>(PlanString.java:66)
      at oracle.ias.update.plan.PlanCustom.<init>(PlanCustom.java:74)
      at oracle.ias.update.plan.PlanStep.<init>(PlanStep.java:189)
      at oracle.ias.update.plan.PlanComponent.<init>(PlanComponent.java:203)
      at oracle.ias.update.plan.Template.load(Template.java:161)
      at oracle.ias.update.plan.Template.loadAllTemplates(Template.java:102)
      at oracle.ias.update.UpgradeDriver.loadConfiguration(UpgradeDriver.java:838)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:257)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:175)
    Caused by: java.util.MissingResourceException: Can't find oracle.ias.update.plugin.odi.bundle.ODIResourceBundle bundle
      at java.util.logging.Logger.setupResourceInfo(Logger.java:1518)
      at java.util.logging.Logger.<init>(Logger.java:265)
      at java.util.logging.Logger.<init>(Logger.java:260)
      at oracle.ias.update.UpgradeLogger.<init>(UpgradeLogger.java:60)
      at oracle.ias.update.UpgradeLogger.getLogger(UpgradeLogger.java:93)
      at oracle.ias.update.LoggingManager.create(LoggingManager.java:249)
      at oracle.ias.update.plugin.UpgradePlugin.createPluginLogger(UpgradePlugin.java:195)
      at oracle.ias.update.plugin.UpgradePlugin.<init>(UpgradePlugin.java:181)
      at oracle.ias.update.plugin.odi.ODIPlugin.<init>(ODIPlugin.java:136)
      ... 17 more
    [2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [UPGAST-00259] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
    [2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Cause: An error occurred when loading or initializing the plug-in which prevents the getInitialValue method from executing.
    [2013-10-24T16:49:07.869+05:30] [Framework] [ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] Action: Review the log file for additional details.
    [2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] UPGAST-00251: An error occured reading Upgrade Descriptor file ODI\INSTALLATION\odi12cInstallation_1\odi\plugins\upgrade\odi.xml
    [2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] The file does not conform to the expected syntax.
    [2013-10-24T16:49:07.870+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] See the secondary message for additional information. Contact Oracle Support.
    [2013-10-24T16:49:07.871+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] UPGAST-00259: The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
    [2013-10-24T16:49:07.871+05:30] [Framework] [INCIDENT_ERROR] [] [upgrade.Framework] [tid: 1] [ecid: e9250ad8-50dc-45fe-83f5-5c01e7a7dcb4-00000001,0] [[
    oracle.ias.update.exception.UpgradeException: UPGAST-00259: The getInitialValue method for plug-in ODI.ODI1 will not be called due to a previous error.
      at oracle.ias.update.plugin.Plugin.getInitialValue(Plugin.java:317)
      at oracle.ias.update.plan.PlanString.<init>(PlanString.java:67)
      at oracle.ias.update.plan.PlanCustom.<init>(PlanCustom.java:74)
      at oracle.ias.update.plan.PlanStep.<init>(PlanStep.java:189)
      at oracle.ias.update.plan.PlanComponent.<init>(PlanComponent.java:203)
      at oracle.ias.update.plan.Template.load(Template.java:161)
      at oracle.ias.update.plan.Template.loadAllTemplates(Template.java:102)
      at oracle.ias.update.UpgradeDriver.loadConfiguration(UpgradeDriver.java:838)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:257)
      at oracle.ias.update.UpgradeDriver.main(UpgradeDriver.java:175)
    Thanks and Regards
    Sunil

    ok - I think I've got it figured.  Appears to be a known issue.  You need to apply patch p17073913_121200.
    I downloaded that and applied to my Linux version - then re-ran the UA.  This time the GUI started and so now I'm going through the upgrade steps.
    The patch is generic, so should work for your windows environment too.  Good luck.

  • How to run a cygwin.bat from a java program?

    Can you please let me know how to run a cygwin.bat file from a java program and to give commands through java program. I have a program to run .exe files, but when I do the same for the cygwin.bat it doesnt work. In task mgr a BASH and a cmd.exe is running. Please help me on this & bit urgent. Thanks in advance!

    Can you please let me know how to run a cygwin.bat
    file from a java program and to give commands through
    java program. I have a program to run .exe files, but
    when I do the same for the cygwin.bat it doesnt work.Of course not. .bat files are no native executables. You need to open a shell first, like "cmd /c cygwin.bat ..."
    & bit urgent. Thanks in advance!If I had read this earlier I wouldn't have replied. Why exactly is your time worth more than anybody else's?

  • Scheduled task won't run .bat file

    Hi. On Windows Server 2008 I have a scheduled task that calls a .bat file. The fist step in the .bat file is write to a log file to the same directory in which the .bat file exists. This allows me to find out if it is ever run. When the .bat file is run from a command prompt it runs as expected writing to the log file and completing its actions. My problem is that when I run the scheduled task manually or allow it to run when scheduled it appears to run but the .bat file is never run. No log file is ever created. The History tab in the properties of the scheduled tasks shows the task being started and running then completing with an operation code of 2. I've disabled the UAC for the user account. I've set the task to run as the Administrator user and verified the permissions for that user. I know the password is correct for the task because I can make changes to the properties and save those changes with the username/password. I'm at a loss for further troubleshooting steps. Can anyone point me in the right direction to figure out why these .bat files are not being run? 

    So I had this problem, I double clicked on the .bat and notepad opened the .bat.  I ran through this whole long and very absorbing thread of this forum.   I wanted to save the entries that were most helpful, so I copied and pasted into
    a notepad document (.txt)  I could not find a way to attach it here, so I copied and pasted that below. I called it a synopsis....  Did I spell that right?
    As you can see, I added my experience at the top (A and B).  The stuff I copied is noted with the original author. This is the first time I posted anything to these here microsoft forums, although I have been telling computers what to do for 40+ years. 
    So hope I did not break any social protocols here.
    ==================================== Begin ====================================
         Running A Dot Bat File in Windows Server 2008 Vista 7 etc and beyond V01
    ============================================================================
    This was created as a synopsis of the entries at the following forum location:
    http://social.technet.microsoft.com/Forums/en/winservermanager/thread/d47d116e-10b9-44f0-9a30-7406c86c2fbe
    A) manually
         This is an opinion added by Thomas Rock
        1) Open a command window (that would be cmd.exe)
        2) In the command window navigate to the directory containing the .bat file and it's dependents
               ex...  C:\Program Files (x86)\Bobs\Your\Uncle
        3) Run the .bat file by typing the name including the .bat extension (in the command window of course)
                 TheBatFile.bat
           Note: Using this method, the .bat file will run in the current command window directory (the directory where the .bat file is located)
                             (this is the key for getting it to run in the task scheduler... Start in folder option)
    B) The double click
                This is an opinion added by Thomas Rock
         1) Using Windows exlporer, find the .bat file
         2) use the mouse or other device to double click on the .bat file
         3) if it does not run (in my case the wordpad application opened the .bat file)
              a) make sure that the .bat file extension is associated with the program c:\windows\system32\cmd.exe
              b) make sure the profile you are using has rights to run the cmd.exe
              c) make sure the profile has the rights to the directories, the .bat and any other objects used or affected by the .bat file processing.
    C) As a task using task scheduler
         Proposed As Answer by Brian Vandemark Wednesday, September 02, 2009 9:36 PM
    1) Make sure that the task is set to "configure for Windows Vista or Windows 2008" on the first page of the task properties (under the "general" tab)
    2) Make sure that the task is set to "start in" the folder that contains the batch file:
          a) open the task properties
          b) click on the "actions" tab
          c) click on the action and then the "edit" button at the bottom. 
          d) In the "Edit Action" Window there is a field for "start in (optional)" that you set to the path to the batch file.
          e) be sure to include an end backslash for the start in path "C:\dir1\dir2\"    (the last backslash is not optional)
    3) Make sure that the task is running as an account that has explicit "Full access" permissions to all these things:
          a) the .bat file itself
          b) the folder containing the .bat file
          c) the target files/folders that are affected by the .bat script. 
               Note:  Inherited permissions did not seem to work.
    4) Make sure that the account running the task is a member of the local "administrators" group for this machine
    5) Make sure that the task is set to "run whether logged on or not"
    6) Tick the box "Run with highest privileges".    
           Note: Point 6 here was from Edson F. Lima Wednesday June 30 2010 1:35 PM
                      The original point 6 was moved to point 7.
    7) The Task should run successfully with expected output when you right-click on the task and select "run" 
            If it does that then it will run successfully when you are logged off.
    D) Still another way as a task using task scheduler
          Proposed As Answer byDarren Wallace Thursday, July 15, 2010 1:41 AM
    This has been bugging me for 6 or 7 months.
    I don't have admin rights to the box and the guy who does is very busy...
    so I've felt the range of emotions mentioned above.
    I tried most everything above as well. But what seemed to get my processes processing, was ...
       • on the General tab, I clicked the Change User or Group button
       • in Select User or Group (first smaller dialog box)  I clicked the Advanced... button
       • in the next Select User or Group (second bigger dialog box) I clicked the Find Now button
       • in the Search results I selected the Administrators (a group) and it returned SERVERname\Administrators into the "Enter the object name to select" entry in the previous dialog box
       • then I clicked OK and returned to the General tab above
       • the options to Run only when user is logged on and Run whether user is logged on or not are no longer available
       • then I made sure that the Run with highest privileges was checked
       • then I clicked OK and during the next scheduled time to run ... it ran
       Note: See note in A) Manually above.
    E) Task scheduler recommendation
         Proposed As Answer byTamusJRoyceThursday, December 01, 2011 3:42 PM
    I have found .bat and .cmd files do not run correctly either.
        My solution:  Don't run the batch file directly. 
           Have TaskScheduler run:  cmd.exe
              with parameter:  /C YourBatchFile.bat
             and start in: C:\SomePath\ (without quotes!) where C:\SomePath\YourBatchFile.bat exists. 
            And then select the radio button for it to run regardless if you are logged in or not.
    Exit errors may not be logged to the Event Log (they weren't when the .bat ran directly from Task Scheduler when I was logged in), so I find it best to manually log your own Event in case a error occurs and you want to send an email.
     REM Logs an event which causes eventlog to send an email when it fails.  Also, "/l application" needs to be lowercase.
    eventcreate /t error /id 203 /l application /d "your logged description."
    And then make a completely separate task with a trigger:  On an event.  Basic Selected.  Log: Application.  Source: EventCreate. Event ID: 203.  And have the action on this task send an email (attaching any generated log files, if needed).
    Hopefully helpful (took me 3 days to figure all this out...gar)
    ===================================== End ===================================
         Running A Dot Bat File in Windows Server 2008 Vista 7 etc and beyond V01
    ============================================================================
     

  • Run tricky bat files

    I am trying to run a bat file which also runs a ksh script;The bat file is a bit tricky because it contains the following:
    set PATH=%CYGWIN_PATH_AGL%\bin;%PATH%
    %NUTC_PATH_AGL%\sh -c a.ksh %1 %2 %3 %4 %5 %6 %7 %8 %9
    These lines call Nutcracker, which is a UNIX-simulator on WindowsXP;
    When I double-click the bat file,it runs ok...but:when i try to call it with:
    try
    Runtime runtime = Runtime.getRuntime();
    String[] cmd =
    {"D:/Documents and Settings/stud6/jbproject/untitled3/a.bat"};
    Process p =runtime.exec(cmd);
    catch(Exception ex)
    ex.printStackTrace();
    ...it does absolutely nothing!
    Running an usual bat file also works fine;
    Please help me!Thanks in advance!

    ...it does absolutely nothing!It does something, just not what you thought it would. It probably aborts with a "bad command or filename", since you need the command shell to run a batch file.

  • EDI  X12 scenario,deq.bat file not generating any trace file.

    hello,
    i have worked on the EDI X12 over internet(AS2) Transaction,everything is working fine until the creation and deployment of configurations on both Acme and GlobalChips servers.But During the Verification of Purchase Order Transactions when i am running deq.bat file on both Acme and GlobalChips servers the dq script is not generating any t1.trc trace file.
    There is no problem with the Trading Partners on both servers they are on upstate,can anyone help me with this issue please,its very urgent.
    note: where will be the web.xml file for transportServlet located,can anyone provide me with the file path.
    thnx
    sunny

    Hello Sinkar,
    Thanks for your reply,Finally i have managed resolve the issue(deq.bat file is generating t1.trc file) successfully.But there are certain other issues regarding this topic in which i need your help.
    When i am running the deq.bat file in command prompt on both acme and globalchips servers it is showing the following status
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;deq.bat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPDeq
    ueue ipdequeue.properties
    IPDequeue start...
    Dequeue from IP_IN_QUEUE
    and it also generated a t1.trc file on both servers,but the prompt in which i have run deq.bat is not giving any further message
    i.e some thing like IPDequeue end.
    and not even coming back to the original path i.e
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;
    and even if close the prompt it is not showing anything in t1.trc file and if i am running the enq_850.bat in acme server it is showing following stat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;enq_850.bat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPEnq
    ueue enq_850.properties
    IPEnqueue start...
    IPEnqueue end.
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;
    and its didn't showing anything in the t1.trc file generated on the globalchips server and same thing is happening when i am running enq_855.bat file on the globalchips server its not showing up anything in the trace file generated on the acme server.
    I have tried one thing that u have suggested for such kind of issue(t1.trc empty) in your forums
    1.) I have applied the patch #6673231 and it is showing the Document Routing Id Field in the B2B UI,but when i am completing all the process in B2B UI and running deq.bat file the result is still the same,the IPDequeue is not ending
    But a certain change has taken place after applying the pat
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPEnq+
    ueue enq_850.properties+
    IPEnqueue start...+
    Action Name = null
    IPEnqueue end.+
    D:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;+
    C:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;enq_855.bat+
    C:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;java oracle.tip.adapter.b2b.data.IPEnq+
    ueue enq_855.properties+
    IPEnqueue start...+
    Action Name = null
    IPEnqueue end.+
    C:\oracle\OraJ2EE\ip\tutorial\X12\runtime&gt;+
    I Think that no action is taking place in both the cases
    bcoz its showing this Action Name = null+
    if that is the case what is the problem here
    I have also set oracle.tip.adapter.b2b.DocumentRouting=true.
    but the situation is still the same,please read the above problem carefully and suggest a solution which would be fruitful for my further progress.
    thanks
    sunny
    Edited by: user10470973 on Dec 16, 2008 10:43 AM
    Edited by: user10470973 on Dec 16, 2008 10:44 AM

  • 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.

  • Setting Oracle environment variable using batch (.bat) file in windows

    Hi,
    Oracle 9i db
    Windows OS
    I am in process to create the database (Considered that Oracle9i software is already installed) by running one batch file which consist of all the scripts for the database creation.
    But i also want to set the environment variables at MyComputer(right click)>properties>advance>environment, permenently by running the batch (.bat) file
    ORACLE_HOME
    ORACLE_BASE
    ORACLE_SID
    So, how can it be done ?
    With Regards

    Hi,
    *@echo off*
    set ORACLE_SID=iprsdb
    set ORACLE_BASE=C:\oracle
    set ORACLE_HOME=C:\oracle\ora92     
    call C:\install_bkp\test_env_var.bat
    echo Test Successfull.
    Above mentioned is the code written in the batch (.bat) file
    In that i have also called another .bat file which test the env. variable values which is as below:
    c:\>test_env.bat
    ===================
    Testing oracle sid
    ===================
    iprsdb
    =====================
    Testing oracle base
    ===================
    C:\oracle
    =====================
    Testing oracle home
    =====================
    C:\oracle\ora92
    Test Successfull.
    But when i checked at MyComputer(right click)>properties>advance>environment variables
    there, I saw none of the entries from the above, why so ?
    how to set env. variables permanently using the DOS commands. ?
    With Regards

  • Running Oracle startup or shutdown bat file from Java code

    I have two bat files for the startup and shutdown of Oracle instance which works fine from the command prompt. But my requirement is to run it through a Java program. Please reply with full Java code. Also mention how I would get the status of the bat files that it is successfully executed or not and if not what is the error.

    Your program is working fine, but there is another problem. What's happening now is I have to open the Login screen after the startup of oracle server is complete, but the next line of my program after Runtime.exec is the LoginScreen.show which immediately shows the login screen after executing Runtime.exec and when I am giving the login name and password and press enter, it shows Oracle not available exception, because the startup process is still in progress. I want to stop the execution of my next line of code until and unless my process of Oracle startup is complete.

  • Running bat files in java code

    Hi,
    I am trying to run a .bat file within java code like this.
    Runtime.getRuntime().exec("c:\\Test.bat");
    but no success. Could you please suggest how to run .bat file or simply a
    DOS command from java code.
    thanx in advance
    Deepak Garg.

    try this...
    n reply whether it worked or not......
    import java.util.*;
    import java.io.*;
    import java.net.*;
    try
    Runtime runtime = Runtime.getRuntime();
    Process process ;
    process= runtime.exec("./temp_install");
    //code to print command line replies
    InputStream stderr = process.getInputStream();
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while((line=br.readLine())!=null)
    System.out.println(line);
    catch(Throwable t)
    t.printStackTrace();
    }

  • How to get the erroe message, if i run java program using .bat file

    Hi,
    I have a java file which accepts two inputs as command line argument. I want to make this pgm a tool. So have created a *.bat file which has the following command
    java myprogram arg1 arg2
    I'm gonna share this program with others. So i'll keep the class file and the .bat file in a commaon folder. All the users have to do is, edit the .bat file to give his/her args and run the .bat file. The pbm is, if the user input is not valid, I have put displays in the pgm to show it.
    But if i run thru .bat, I'm not getting the error message or I don't know where it is getting displayed.
    Can anyone help me with this ?
    Thanks,
    Mary

    When i run from the console, I can see the output.
    But, when i double click on the .bat file from the
    folder, it runs fine and i couldn't see the output.
    nullThat's because the error message is printed, and then the console is closed. The message is there but you need to read really really fast :)

Maybe you are looking for

  • "END OF FILE REACHED"?????

    IT WILL NOT ALLOW ME TO CREATE INSTRUMENTS- NONE OF MY FILES ARE WORKING -IM GETTING NO SOUND WHATSOEVER--I AM COMPLETELY LOST AND GOING CRAZY WITHOUT MY MUSIC-- CAN SOMEONE HELP ME OUT HERE PLEASE [email protected]

  • Closing a Flash (.swf) in PDF

    I am trying to close a .swf file that appears in a floating window when triggered from the pdf.  The .swf file was created using Captivate and it comes with its own controller (skin).  The Exit button in this controller does not seem to work.  When y

  • Got notice that I have only 5 days to activate Photoshop 5.  Facts: new macbookPro 10.9.4 about 2 months ago (my old mac's logic board failed).

    URGENT HELP NEEDED:  got notice that I have only 5 days to activate Photoshop 5.  How can I continue using? I have an exhibit to print, deadline is one week from today (27 July 14). FACTS:  my old MBP had a failed logic board about 6 weeks ago.  Boug

  • GDM does not allow me to login

    Hello, I just updated my system after about one week. When computer starts I see initial boot output (information about decompressing kernel image and systemd-fsck output), then normally GDM was starting. Now I only see the same initial output and af

  • Resume for Freshers in SAP Basis

    Dear Friends,   I   Fresher in SAB Basis. I was finished the course in june 2010. I am doing the practices from june to till date on SAP IDES 4.7 and ECC6.0. Please send the resume format for fresher. Regards akhilesh