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 :)

Similar Messages

  • How to get the current process Id from a java program

    Can we fetch the process id froma a program as we do it in c++ as getCurrentProcessId()

    why not to launch a process like ("rundll.exe _params_") and get its output data
    sorry, i'm not in WinAPI to continue with params, but you should know i think or consult somebody.
    or there is special java package, which can call windows functions. you can find it in Microsoft Java SDK.

  • How to get the Error message from hr_contact_rel_api.create_contact

    Hello All,
    I am using this API for creating a contact for an employee in R12.
    But, some times i am not able to create the contact successfully, and Unable to figure out proper reason for record erroring out.
    I dont find any out msg data variables for this API in order to check it for the Error.
    So, can any body help me how to get the ERROR Message for such APIs.
    Thanks inAdvance,
    Amarnadh Js

    user12243334 wrote:
    solved the issue on myselfIt would be nice if you could share the solution with us.
    Thanks,
    Hussein

  • How to get the XML messages from JMS Queue in BPM

    I have one requirement in my application.we are sending XML messages to the JMS Queue.How to get the XML messages from JMS Queue and how to Extract the details from XMl.
    can you please send me the code to get the XML messages from the JMS Queue.
    Thank you,

    Hi,
    Sure others will have some other ideas, but here's what I typically do to get the XML from a JMS queue. Inside the Global Automatic that pops the messages off the queue you'd have logic similar to this:
    artifactInfoNodes as Any[]
    xmlObject as Fuego.Xml.XMLObject = XMLObject()
    load xmlObject using xmlText = message.textValue
    . . . Once you have this, it's a matter of deciding what you want to do with the message. Most times you'll parse the XML (using XPATH statemens), set argument variables and create a work item instance.
    Hope this helps,
    Dan

  • HI, Im using Iphone 4 and i recently got my IOS updated to IOS7 and  now im getting the error message as "PDP authentication failure" Im using Aircel carrier.

    HI, Im using Iphone 4 and i recently got my IOS updated to IOS7 and  now im getting the error message as "PDP authentication failure" Im using Aircel carrier.
    Please let me know how to fix this issue

    update...
    I am not one to give up. So I called AT&T today. Now they are telling me they canceled my order because they were unable to fulfill my order. Basically, AT&T told me they sold out so they canceled my order so I can proceed to reorder again. It took them 4 days to realize this. I will be lucky if I get a new phone by Christmas. I am sure they will find a way to cancel my order again.
    Again, I argued, how is this my fault. I placed my order at the store around 11 a.m. Pacific time. My friend ordered his phone online sometime after me. He got his but my order was canceled. AT&T tried to explain to me that they sold over 600,000 phones, almost 500 per minute during there peak. Again, I asked, how this was my fault.
    I can understand over selling the phone. It is a great product. There is no reason to cancel my order. You adjust my order and tell me you will let me know when my phone will be in. I would have been mad that my phone was going to be late but I would have survived. At least I would be getting one.
    At this point, I have no order and AT&T or Apple website will allow me to order one. I just want to get in the QUEUE for one.
    Frustrated.

  • How to get the today's julian date in java?

    how to get the today's julian date in java?
    hi can any one tell me how to get the todays julian date using Calender class or GregorianCalender class....
    Julian date for 2006.November.01 AD 05:54 PM : 2454041.0
    i have tryied with
    calJ.setGregorianChange(new Date(Long.MAX_VALUE));
    System.out.println(sdf2.format(calJ.getGregorianChange()));
    thanks
    Tushar
    Message was edited by:
    lad_tushar

    thanks a lot....for intrest....
    I have found some details about the Julian calendar as follows:
    The Julian date for 2006: JAN: 01:12:01:59 is 2453737.00138
    245 represent the year digits for year 2006
    3737 represent the date fir 1 Jan
    .00138 represents the time for 12:01:59
    Julian date change as per every day 12 noon it increase one digit in it.
    As per ref from
    http://www.aavso.org/observing/aids/jdcalendar.shtml
    Also chk this calendar where Julian date is 20. October 2006 for 02 November 2006
    As per ref from
    http://www.calendar.sk/julian_calendar-en.php
    I have tried the pure �GregorianCalendar� class from jdk1.4 API and its setGregorianChange method but not getting as per the expected Julian date format. Using the �setGregorianChange()� i have setting the cutover date to Long.MAX_VALUE it means GregorianCalendar now have to act as per the Julian calendar ...so after setting the cutover date it return me changed date using �getGregorianChange()� but that was not the Julian date of the current date...as expected or as per above both scenario. Even though the last two digits are nowhere equal to the actual Julian date.
    Program
    GregorianCalendar cal = new GregorianCalendar();
    cal.setGregorianChange(new Date(Long.MAX_VALUE)); // setting the calendar to act as a pure Julian calendar.
    // cal.set(Calendar.DATE, new Date().getDate()); // seting the current date
    // Date todayJD = cal.getGregorianChange(); // getting the changed date after the setGregorianChange
    Date todayJD = cal.getTime(); // getting the calculated time of today�s Julian date
    SimpleDateFormat sdfJulianDate = new SimpleDateFormat("yyDDD");
    SimpleDateFormat sdfJuliandayOfYear = new SimpleDateFormat("DDD");
    System.out.println("today Date = " + new Date());
    System.out.println("Today as julian date = " + sdfJulianDate.format(todayJD));
    System.out.println("Today as day of year = " + sdfJuliandayOfYear.format(todayJD));
    OUTPUT:
    USING : Date todayJD = cal.getGregorianChange();
    Today Date = Thu Nov 02 15:17:05 IST 2006
    Today as julian date = 94229
    Today as day of year = 229
    USING : cal.set(Calendar.DATE, new Date().getDate());
    Today Date = Thu Nov 02 15:19:22 IST 2006
    Today as julian date = 06319
    Today as day of year = 319
    USING : Date todayJD = cal.getTime();
    Today Date = Thu Nov 02 15:17:59 IST 2006
    Today as julian date = 06306
    Today as day of year = 306
    There is one another concept i found to get the Julian day of the year as per the Julian day chart mention on nasa site (http://angler.larc.nasa.gov/armsgp/JulianDayChart.html) and i m getting the moth of the year that is 306 for nov 02 2006 using getTime() method in above code then the out put is right for Julian day. But it was not as per the expected Julian date format. So in conclusion we can only able to retrieve the day of year for the Julian calendar. hope their will be a solution for this problem in java api ....else we allways have to depend upon the third party api that was not accepteble some times.....
    Kindly chk chart on the site
    http://angler.larc.nasa.gov/armsgp/JulianDayChart.html
    http://weather.uwaterloo.ca/julian.html
    http://www.fs.fed.us/raws/book/julian.shtml
    Thanks,
    Tushar Lad

  • How to get the kerning value and set it to back use script?

    hi,guys
    I come back again.
    I encountered a kerning problem.
    how to get the kerning value and set it to back use script?
    Thanks very much!

    For both cases, the filename can be found on the FILE.ReceivedFileName Context Property.  You can access this Property in a Pipeline Component or Orchestration and take any action you want, such as apply to a database.
    The value is accessed by: MyReceivedMessage(FILE.ReceivedFileName)
    In the case of a duplicate EDI Interchange, you would use the Failed Message Routing feature to capture the error message with either an Orchestration or Send Port.

  • I can no longer charge my iPhone5 through either of my macbook pros. I get the error message that a USB device is using too much power. Can anyone help?

    I can no longer charge my iPhone5 through either of my macbook pros. I get the error message that a USB device is using too much power. Can anyone help?

    I reconnected the original powered hub that I thought probably caused the problem and this time it shut down the whole computer. When I rebooted everything now works perfectly. The system reset. I tried another powered hub and it didn't have the same effect so the old one is heading for the bin and with fingers crossed all systems are now working perfectly. Trying to reset PRAM or reset the SMC didn't work but causing the same power issue did. Thanks for your input though. It did get me to think what was the original cause.
    Cheers
    Guy

  • Why do i get the following message when i attempt to open my backup file for lightroom cc?  "Lightroom cannot use the catalog named "Lightroom Catalog" because it is not writable and cannot be opened".  This message just started coming  up after downloadi

    why do i get the following message when i attempt to open my backup file for lightroom cc?  "Lightroom cannot use the catalog named "Lightroom Catalog" because it is not writable and cannot be opened".  This message just started coming  up after downloading lightroom cc (previously using lightroom 5)...am i backing up properly or not???

    Open Pictures folder and move the files named lrcat-journal and lrcat.lock to Desktop.
    Make sure that , they are not inside Pictures folder any more and try to open backup from Lighrtroom and check..
    Any LRcat file with .lock extension , move it to Desktop.

  • How to get the query result of improvement (Before and After ) using sql de

    how to get the query result of improvement (Before and After ) using sql developer.

    Check
    http://www.oracle.com/technetwork/articles/sql/exploring-sql-developer-1637307.html

  • How to get the password of a password protected Excel Sheet using java/jxl

    Hi ,
    how to get the password of a password protected Excel Sheet using java / jxl program.
    plz any one help me .
    Ramesh P
    [email protected]

    If they've implemented the password system correctly there probably isn't a way of getting the password at all.

  • I need help re-installing itunes.  I get the error message: Install failed run preupgrade for Apple Mobile Device Support.  Any solutions?

    I've been trying to upgrade to/install Itunes 10.  When trying to do so, I get the error message: Install failed run preupgrade for Apple Mobile Device Support.
    Per what I saw as a response to someone else who had a similar issue, I thought a fix might be to uninstall my existing Itunes, then try to re-install the Itunes 10.  I tried that.  However, I still get the same error message.  Now, I have no Itunes.   
    I tried to email Apple, and they have not replied.
    Anyone offer any solutions? 

    me too did you get any help?

  • While browsing Firefox, display another htm*file by double-clicking it in Windows Explorer and not getting the erro message "Firefox is already running (etc) "

    While browsing the Web with Firefox, I often want to view an htm (or html etc) file that is recorded on my computer, by double-clicking it in my Windows Explorer, hoping it will open automatically a new tab.
    When I try this now, I get the error message "Firefox is already running (etc)" .
    In my current setup, Firefox is associated with the htm and html file name extensions.
    If, instead of double-clicking the filename in the Explorer, I choose the Firefox menu item "Open a file", this works OK.
    In old versions of Firefox, double-clicking a filename in the Windows Explorer or File Manager caused Firefox to open a new window every time which was ok.
    I have the same problem with Thunderbird, which I have associated with the "eml" file name extension. How can I view a series of recorded ".eml" files with Thunderbird when Thunderbird is already running ? Thank you.

    The target field of the desktop shortcut is "D:\C_Mozilla Firefox\firefox.exe" (no switch)
    The system/environment variable MOZ_nO_REMOTE is now 0, changed from 1, but I can see no difference. Maybe I need to restart the system to get a change ?
    Thank you.

  • How to get the return message after running BD20 tranaction ?

    Hi Gurus,
    My requirement is to Post vendor invoice through ALE/IDOC ( Inbound IDOC ).
    - For that I had generated the IDOC using  Function module 'IDOC_INBOUND_WRITE_TO_DB '
    - Then I had processed that generated IDOC by calling the standard program rbdapp01(BD20-Tranaction ) using the below statment
    SUBMIT rbdapp01 WITH SELECTION-TABLE lt_seltab .
    Could any one suggest me how to get the report output of standard program (rbdapp01) to an internal table so that I dispaly as an seperated report like Posted Document number with messages or Error message
    Suggest me any Function module or any other standard program to process the IDOC so that I can fulfill my requirement.
    Regards
    Paul

    Use can read the IDOC status after processing...
    Eg.
      SELECT * FROM edidc INTO TABLE t_idoc_control_tmp
          FOR ALL ENTRIES IN t_update WHERE docnum = t_update-docnum.
    and then add your own logic IF SY_SUBRC EQ 0.
    I hope this will help you.
    Regards,
    Amey

  • How to get the WSDL services up and running

    Hi,
    I have created a real-time process. I am going to 'Web Services Tester' and getting my project. I am able to see the screen. When I enter data and click on 'Send' I get the message 'The services are not up and running.'
    According to the Student activity guide I need to do the following:
    "If the Web services Tester does not appear on the Launch Pad, click 'Server Configuration' , input your Username and pwd, and then click 'Applications. Select  the checkbox to the left of the Web Services Tester. Click Save and then click Home."
    I do not see the icon 'Server Configuration' on my launch Pad. Let me know how it can be enabled so that it appears on the Launchpad.
    Let me know how to get the web services running.
    Thanks
    Prabha

    Once you have a process which reads from and writes to the web service, just run the process, either directly or in a job.
    Richard

Maybe you are looking for

  • Accessibility of iTunes and iPod for Blind users

    In any of the updates to Itunes or Ipod has the ability to use the product by the Blind been considered? Being a Low-Vision/Blind user I think accessibilty has gotten worse instead of better. This is not just an Itunes on Windows Issue. Itunes on the

  • Error 150 30 - After Effects

    Hi, I just reinstalled Lion onto my old MacBook and restored the back-up from my new MacBook (which I'm sending back and swapping for an iMac). Although now when I try and open After Effects CS4 I get the following error: 150 30. Naturally I googled

  • File content conversion in receiver

    Hi, My receiver Message type structure is Heading1   subheading 1     FieldValue1     FieldValue 2     Fieldvalue3 I want to create file content conversion in receiver side. plz help me to create what could be my recordset structure, name, value. my

  • Using Built-in Functions

    How do you reference a built in package from within a stored procedure? I get errors that the package/procedure references are not defined when compiling the stored procedure. How do I get these built-ins into my database? null

  • Does it cost extra to use wifi outside the states?

    I am in germany and I'm using my families wlan to connect to the internet with my cell phone (send emails, check facebook etc). Now i was wondering if that is going to cost me any extra. My Plan is NATIONWIDE TALK & TEXT FS 700 Since it's wifi I figu