Java and Batch File Issue - need urgent help

I have a java program which calls a batch file. This batch file calls another java program. I want an option so that I can close this java program from main program.
If i try process.destroy then it will call batch file and not java program.
I can't go away with batch file.
I will appreciate if someone can help me.

khannap wrote:
Hi, Thanks for the help but this doesn't seem solving my problem completely. I will appreciate if you can help more.
I will explain you the scenario -
1. There is java program provided as an external program to me.Only changes things slightly.
2. This java program is called using batch file. When batch file is started this java program starts and listens on a socket for incoming data.I would want to wrap the launch of this java program in another JVM so we can use process.destroy().
3. I am writing a program to check performance of the above java program. I want to call this java program from my program in a loop having some varying config data. When I run the loop first time I create a batch file at run time which executes the batch file provided by vendor. This batch file starts the socket. Once my message list is over then my loop goes to executing the batch file again with different config parameters. But this time I run into issue because my previous java program is not killed after message sending was over.Would it be acceptable to mung the 3rd party batch file to insert a wrapper JVM?
Even if i use threads I don't think I can get rid of batch file.I did not suggest getting rid of batch files.
So, I need to find a way so that when any iteration of loop is over then this socket program is killed. These 3rd party java programs - do they not have a "terminate" command you can put at the end of your message list?
Even if i closed the socket from my client program that doesn't help because server is still listening and waiting for new client.
I need to kill server which was started by batch file.On Linux it would be fairly simple to modify your batch file to determine what the process id is and send the process a signal to terminate it.
Not sure what you can do on Windows.

Similar Messages

  • Java and batch files

    i want to launch my application by a batch file, whit this script:
    @echo off
    "C:\j2sdk1.4.2_08\bin\java.exe" -cp "C:\Documents and Settings\Intrepido\Desktop\my tesina" BSServer 2103
    pause
    my application as first operation, read from a txt file some row just to configure himself.
    if i launch my application from DOS, writing the path manually, my application does function correctly, instead, launching it from batch file, the first row read return a null value; (i use the RandomAccessFile class and the readLine() method to access file...)
    moreover, since my application is a JFrame class, i've associate some icon to the buttons of the window. starting the application manually from DOS the icons are benn loaded, instead, launching the application from the batch file, the icons are not loaded...
    Help me please...
    and sorry for my bad english...

    i want to launch my application by a batch file, whit
    this script:
    @echo off
    "C:\j2sdk1.4.2_08\bin\java.exe" -cp "C:\Documents and
    Settings\Intrepido\Desktop\my tesina" BSServer 2103
    pause
    my application as first operation, read from a txt
    file some row just to configure himself.
    if i launch my application from DOS, writing the path
    manually, my application does function correctly,
    instead, launching it from batch file, the first row
    read return a null value; (i use the RandomAccessFile
    class and the readLine() method to access file...)
    moreover, since my application is a JFrame class,
    i've associate some icon to the buttons of the
    window. starting the application manually from DOS
    the icons are benn loaded, instead, launching the
    application from the batch file, the icons are not
    loaded...
    Help me please...
    and sorry for my bad english...Since it is a java forum, I suppose that your app is a java app, isn�t it?
    First, define the MANIFEST.MF of your application, that must call the class that contains the famous public static void main(String[] args) method. If you haven�t made this method yet, make it. This method must initialize your app. If you don�t know how to create or how to configure the MANIFEST.MF file, read the articles below:
    http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
    http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
    Don�t forget to configure the reference of some jar files required by your app in the MANIFEST.MF if it is necessary.
    Second, create the batch file. The content of this file is simple. It has has to be like below:
    java -jar MyJarFile.jar
    Where MyJarFile.jar is your jar file. Then, put this batch file in the same directory of the jar file and double click it. Finish! Your app will be executed as you want.
    Of course, first of all, you have to configure the java environment variables in order to this app works well (JAVA_HOME, PATH, CLASSPATH, etc).
    It is just one manner to do what you want. There are other ways to do it, of course.

  • WSRM Configuration Issues-Need Urgent Help

    Dear Experts,
    we are configuring WSRM between TM 9.0 and ERP 606 systems. we have followed the document from the SAP note 1043195. we have completed the technical configuration. we are facing issues in application configurations.
    1.       When we have tried to create central business scenario configuration connection, the input help pop-up window is showing correct values in the fields (Consumer System is ERP , Provider System is TM) but when we click on create both consumer and provider systems become ERP  system)
    2.For the service group TM_ERP_ORDINT, both consumer and provider system showing ERP systems and provider interface is mismatching with guide provided interfaces.
    As per the guide, consumer proxy should be mapped to below respective service interfaces but system showing wrong service interfaces.(We saved the above selected entries)
    how to resolve the issues?
    Please help us..
    Thanks and regards,
    Pradeep

    Bdrom probably dead. Can buy a replacement one off eBay easy enough. Replacement normally only one or two screws.
    Personally I would go for seagate drive but western digital will be fine so long as you have the recovery media.
    Disassembly of laptops can be tricky if you are new to it. Too long to explain here but Google for a service manual for your unit or a YouTube video. With patience and a good screwdriver it's not too much trouble.
    Depending on what's wrong with the fan (man be just clogged with dust) you may need a replacement. Look for spares on ebay or spares supplier.
    Ram should be easy to find out, Google the part number or check the bios. You can check the manual for compatible ram or try Kingston/crucial ram checker database (not guaranteed but rarely wrong)

  • HP Envy 17 3D 1201tx issues, need urgent help

    I had purchased HP Envy 17 3D 1201tx notebook back in March 2011, but could hardly use it due to some personal problems at my end. However, after 8 months of the purchase, when i used it, I found the BDROM drive was not working, and later on the internal cooling fan also stopped working. As, I said, due to personal problems I could not contact HP, and the laptop was not again in use for many months.
    I had just about six months back started gettings SMART failure of HDD, and the hard drive gave way as well (sic).
    I've contacted HP just few months back to get a paid service, but rather giving service, they misbehaved. I'm now seeking help on HP support forum, please help me getting past the issues with this expensive laptop.
    issues:
    1. BDROM drive would not recognize/read any writable or re-writable CD/DVD and it only recognizes read-only CDs. 
    My query is "is the optical drive dead or service able?"
    2. Internal cooling fan is not working. Is it service able, can you guide me "how to open the laptop", so I can service or replace the cooling fan with a new one myself?
    3. Internal 640 GB Toshiba HDD that came with the laptop is dead now. I have selected the following two, can you advise, which is the best between the two:
    a. WD 1 TB LaptopInternal Hard Drive(WD10JPVT/WD10JPVX)
    b. Seagate Solid State Hybrid Drive 9.5 mm thickness 1 TB Laptop Internal Hard Drive (ST1000LM014)
    4. I also want to upgrade the RAM from factory installed 4 GB to 8 GB. Can you please advise me the dual channel RAM modules (i.e. 4x4 GB)  compatible with Envy 17 3D 1201tx.
    May, I request the experts here, to please suggest me the best of the compatible RAM for my laptop, so I get the maximum performance from my laptop. And, also the technical details of the factory installed RAM.
    I'm live in Delhi, India.
    Thanks in advance.

    Bdrom probably dead. Can buy a replacement one off eBay easy enough. Replacement normally only one or two screws.
    Personally I would go for seagate drive but western digital will be fine so long as you have the recovery media.
    Disassembly of laptops can be tricky if you are new to it. Too long to explain here but Google for a service manual for your unit or a YouTube video. With patience and a good screwdriver it's not too much trouble.
    Depending on what's wrong with the fan (man be just clogged with dust) you may need a replacement. Look for spares on ebay or spares supplier.
    Ram should be easy to find out, Google the part number or check the bios. You can check the manual for compatible ram or try Kingston/crucial ram checker database (not guaranteed but rarely wrong)

  • Weird distortion in Premiere and After effects CS6 - need urgent help!

    Hello,
    I've got a serious problem!!! While I was editing a sportsevent I noticed that a lot of shots have some weird distortion. I allready had this problem with other projects. At first I thought it was a problem with my camera (sony EX3).
    But today I started digging more into it.
    I recorded some test footage and didn't import it into Premiere. Instead I tryed to play it straight from the camera with VLC media player. To my suprise the shot was perfect. Then I opend it with premiere and after effects.
    I didn't change anything on the shot and the distortion came back! Then I exported it using media encoder.
    I uploaded two clips: 1 rendered with Premiere, and 1 just straight out of the camera.
    Even when rendered the distortion is in the shot!
    Here is the shot straight out of the camera: http://www.youtube.com/watch?v=9TNfsltos_s
    And here is the shot rendered in Premiere: http://www.youtube.com/watch?v=mbctDm2VhWM
    I would be very happy if someone can help me out with this! I can't deliver a project to a client with this distortion!

    Ask in the Premiere forum and provide at least some system info. Looks like decoding issues to me, which would boil down to hardware acceleration issues...
    Mylenium

  • Production Issue Need urgent help

    We just added new disk on our db box. its sun 890 box after that the DB is running very slow and the cpu is showing 100% is there any way we can find out the cause of the issue.
    Any assistance will be highly appreciated.

    Check with the OS monitoring tools. You should provide the OS and DB versions in your thread so a more proper direction on the recommended tools can be provided.
    If you are on 10g you could use the performance monitor from the EM DB Console and you could see if Oracle is responsible for this high CPU consumption.
    By the way. I kindly suggest you to use a more descriptive thread title, 'Urgent' and 'Production Issue' doesn't let any body figure out what you are talking about. On the other hand, labeling urgent won't make all posters go running to solve this issue, all threads are treated equally on a first come first served basis and it depends on posters availability.
    ~ Madrid

  • SSAS Cube Processing Issue,Need Urgent Help...

    Hi Friends,
    Good Afternoon.
    I am processing the SSAs cube as it is failing with below error message.
    I have tried processing the cube by using XMLA script,Direct processing.
    <return xmlns="urn:schemas-microsoft-com:xml-analysis">
      <results xmlns="http://schemas.microsoft.com/analysisservices/2003/xmla-multipleresults">
        <root xmlns="urn:schemas-microsoft-com:xml-analysis:empty">
          <Exception xmlns="urn:schemas-microsoft-com:xml-analysis:exception" />
          <Messages xmlns="urn:schemas-microsoft-com:xml-analysis:exception">
            <Error ErrorCode="3238395904" Description="OLE DB error: OLE DB or ODBC error: Cannot execute the query &quot;SELECT     &#xA;
    CASE &#xA; WHEN charindex('.', [Name]) &gt; 0 THEN upper(substring([Name], 0, charindex('.', [Name]))) &#xA;
    ELSE Name &#xA; END COLLATE DATABASE_DEFAULT AS  PackageDownloadSourceName&#xA;
    , 'Notification Server' COLLATE DATABASE_DEFAULT AS PackageDownloadSourceType&#xA;
    FROM &#xA; vNotificationServerSource as vNotificationServerSource WITH (NOLOCK)&#xA;&#xA;
    UNION&#xA;&#xA; SELECT &#xA;
    DISTINCT &#xA; vc.Name COLLATE DATABASE_DEFAULT AS  PackageDownloadSourceName&#xA;
    , 'Package Server' COLLATE DATABASE_DEFAULT AS  PackageDownloadSourceType&#xA;
    FROM&#xA; vComputer AS vc WITH (NOLOCK)&#xA;
    INNER JOIN SWDPackageServer WITH (NOLOCK) ON vc.Guid = SWDPackageServer.PkgSvrId&#xA;&#xA;
    UNION&#xA;&#xA; SELECT     &#xA;
    PackageDownloadSourceName COLLATE DATABASE_DEFAULT AS PackageDownloadSourceName&#xA;
    , 'Non-Altiris Server' COLLATE DATABASE_DEFAULT AS PackageDownloadSourceType&#xA;
    FROM         &#xA;
    (SELECT &#xA; DISTINCT &#xA;
    CASE &#xA;
    WHEN charindex('//', [URL]) &gt; 0 THEN upper(substring(substring([URL], charindex('//', [URL]) + 2, len([URL]) - charindex('//', [URL]) - 1), 0, charindex('/', replace(substring([URL], charindex('//', [URL]) + 2, len([URL]) - charindex('//',
    [URL]) - 1), '.', '/')))) &#xA; WHEN charindex('\\', [URL]) &gt; 0 THEN upper(substring(substring([URL], charindex('\\', [URL]) + 2, len([URL]) - charindex('\\', [URL]) - 1), 0, charindex('\', replace(substring([URL],
    charindex('\\', [URL]) + 2, len([URL]) - charindex('\\', [URL]) - 1), '.', '\')))) &#xA;
    WHEN charindex('Multicast download complete. Master: ', [URL]) &gt; 0 THEN upper(substring([URL], charindex('Multicast download complete. Master: ', [URL]) + 37, len([URL]) - charindex('Multicast download complete. Master: ', [URL]) - 36)) &#xA;
    ELSE NULL &#xA; END COLLATE DATABASE_DEFAULT AS PackageDownloadSourceName&#xA;
    , 'Non-Altiris Server' COLLATE DATABASE_DEFAULT AS PackageDownloadSource...; 42000; The OLE DB provider &quot;SQLNCLI11&quot; for linked server &quot;ITANALYTICS_CMDB_SYMANTEC_CMDB_725_CZCHOWV319\SQL02_SYMANTEC_CMDB_3741&quot; reported
    an error. Execution terminated by the provider because a resource limit was reached.; 42000; OLE DB provider &quot;SQLNCLI11&quot; for linked server &quot;ITANALYTICS_CMDB_SYMANTEC_CMDB_725_CZCHOWV319\SQL02_SYMANTEC_CMDB_3741&quot; returned
    message &quot;Query timeout expired&quot;.; 01000." Source="Microsoft SQL Server 2012 Analysis Services" HelpFile="" />
            <Error ErrorCode="3240034316" Description="Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Package Download Source', Name of 'Package Download Source' was being processed."
    Source="Microsoft SQL Server 2012 Analysis Services" HelpFile="" />
            <Error ErrorCode="3240034317" Description="Errors in the OLAP storage engine: An error occurred while the 'Package Download Source Type' attribute of the 'Package Download Source' dimension from the 'IT Analytics'
    database was being processed." Source="Microsoft SQL Server 2012 Analysis Services" HelpFile="" />
            <Error ErrorCode="3238002695" Description="Internal error: The operation terminated unsuccessfully." Source="Microsoft SQL Server 2012 Analysis Services" HelpFile="" />
            <Error ErrorCode="3239837702" Description="Server: The current operation was cancelled because another operation in the transaction failed." Source="Microsoft SQL Server 2012 Analysis Services" HelpFile=""
    />
          </Messages>
        </root>
      </results>
    </return>
    Thank you very much for your Help.
    Regards,
    Reddeppa G

    Hi ReddeppaG2580,
    According to your description, you get the above error when processing a cube. Right?
    Based on the error message, the issue occurs on the dimension 'Package Download Source'. So check the involved tables and the query for this dimension. Check the attribute 'Package Download Source' in the dimension. If you still can't find some issue, try
    to recreate that dimension. Please refer to link below:
    Create a Dimension by Using an Existing Table
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Transparent Partition issue-Need urgent Help

    Hi All,
    We have a application called( Eg: ABC) which is having a transparent partition
    There are 4 transparent partitioned cubes out of which 2 ASO & 2 BSO
    the daily load process for this is
    if we have a cubes called XYZ and XYZ_B
    First it will drops the XYZ_B cube and then creates a copy of XYZ cube called XYZ_C(which copies the partition file also) after that the data is got loaded to the copy cube (XYZ_C cube) once data load is done it will renames the original cube (XYZ) to XYZ_B & XYZ_C to XYZ cube.
    At the End we have only XYZ & XYZ_B
    In this process it is creating an orphan partitions in this it is showing the source as (XYZ_C cube).
    Please help me how can we resolve this .
    Regards,
    Ravi

    First it will drops the XYZ_B cube and then creates a copy of XYZ cube called XYZ_C(which copies the partition file also) after that the data is got loaded to the >>copy cube (XYZ_C cube) once data load is done it will renames the original cube (XYZ) to XYZ_B & XYZ_C to XYZ cube.I assume you are doing the above operations with partition in tact.
    First drop the transperent partition.
    Do the operations on the cube.
    Create transperent partitrion after.

  • Major Ipod Issue - Need Urgent Help

    A buddy of mine was playing his iPod in his Bose dock during a lightning storm (not the best idea....) and apparently his Ipod got busted. When he first described it I thoguht it had gotten fried, but after taking a look at it, I think it may still work. When attempting to plug it in via USB, it shows either a funky battery icon or the Apple icon. Seeiing this, I figured there may still be a way to save it. Attempting to use it with iTunes or iPod setup comes up with it not being recognized. So might anyone have some suggestions on how I may be able to fix this? Or perhaps my buddy can send his iPod into Apple in hopes that they may be able to salvage it? Thanks for any help.

    Does it play on the charger? Currently I have a 3rd Gen iPod thats been suffering battery problems but works fine if it its being charged. I have a sound dock as well and may have played it through a lightning storm without thinking about it. I decided to purchase a do-it-yourself battery replacement kit for $10 and am still waiting for it to arrive. If it's a battery problem, the $10 kit is a much cheaper solution than the $70 Apple repair, if he doesnt have apple care.

  • Process Chain issue-Needs urgent Help

    R/3 Master Data Main Chain
    Problem Description:
    When we trigger the process chain from SM64, the process chain fails at the step as shown below.
    There are no logs for the local chain i.e. the local chain fails without linking.
    If we manually schedule the local chain it runs successfully.
    The error message changed as and when we tried fixing the defects. Each of them with the solutions tried for them is explained below.
    ERROR 1:
    The error message which we got was as ‘Cannot Activate Job BI_PROCESS_LOADING (return code 8).
    Solution tried:
    1.     Replicating Data Sources and activating the transfer and communication structures by running the programs RS_COMSTRU_ACTIVATE_ALL and RS_TRANSTRU_ACTIVATE_ALL.
    ERROR 2:
    Later we found that the released job was missing for failed local chain.
    Solution tried:
    1.     We created a new job by copying a previous job.
    ERROR 3:
    When we re-scheduled the process chain, we got the error message as shown below.
    Solution tried:
    1.     Deleted all the logs which were in running status.
    ERROR 4:
    After re scheduling the process chain we are getting the error message as shown below. This is the error message we are getting now.
    Solutions Tried:
    1.    Saving the variant and reactivating the process chains.
    2.     Replicating Data Sources and activating the transfer and communication structures by running the programs RS_COMSTRU_ACTIVATE_ALL and RS_TRANSTRU_ACTIVATE_ALL.
    3.     Changing the scheduling options of the failed local chain to ‘Start using Meta Chain or API’ from ‘Direct Scheduling’.
    4.     We searched for locked entries in SM12. There are no locked entries.
    5.     We ran attribute change run with variant for info object ‘Profit Center’ from the following path
        RSA1-> Tools-> Apply Hierarchy/ Attribute Change Run. We created a new variant for the info object.
    We still could not find a solution. do let us know if you have any inputs.
    Thanks,
    Mayuri

    Hi All,
    Please reply ASAP. Its critical.
    We created a new process chain and when we do a check on it,we are getting a warning message.
    We just upgraded our Dev box from 3.5 to 7.0. Our master data process chains, which reflect samples delivered by SAP, are giving warnings saying "too many parallel processes" for chosen server. It refers us to note 621400.
    I am curious to know if others have run into this, and if they have changed their MD process chains to run in a serial fashion.
    Prior to the upgrade, we had no deadlocks with process chains.
    Thanks.

  • Please help how to run System commands and batch files thru java program

    Sir,
    I want execute OS commands like dir,cls..etc and batch files,.exe filesthru java program.
    I have tried it sofar thru Runtime.getRuntime().exec("execute.bat");
    but it is not working.anybody knows about how to run the system commands thru java please give me the code.
    thank you,
    regards,
    j.mouli

    I've seen other posts with this questions, and answers. Unfortunately I didn't pay much attention. But the basic idea is to exec command.com and pass the specifc batch or command as an argument.

  • Need Urgent help, I have made partition hard drive in my mac book and using OS mac

    Need Urgent help, I have made partition hard drive in my mac book and using OS mac & Window8 seperately... for couple of days it works great for both window & OS mac But nowadays, my pc gets restart automatically while using window & even I cant access to my Mac OS...........  I got some error in window (error80070003) ...>>>>> Now how can I format whole drive & recover my Mac book OS.without boot disk.

    I can't find that model. If you open System Profiler in the Utilities folder look for the Model Identifier over in the right hand display. What do you find for the model ID? If your computer supports Internet Recovery here's what to do:
    Install Mavericks, Lion/Mountain Lion Using Internet Recovery
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    Boot to the Internet Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND-OPTION- R keys until a globe appears on the screen. Wait patiently - 15-20 minutes - until the Recovery main menu appears.
    Partition and Format the hard drive:
    Select Disk Utility from the main menu and click on the Continue button.
    After DU loads select your newly installed hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed. Quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion. Mavericks: Select Reinstall Lion/Mountain Lion, Mavericks and click on the Install button. Be sure to select the correct drive to use if you have more than one.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    This should restore the version of OS X originally pre-installed on the computer. If Mavericks is not installed, then you can reinstall it by re-downloading the Mavericks installer.
    You will need to use Boot Camp Assistant in order to create a new Windows partition, then reinstall Windows.

  • I have a video in excellent quality (1280x720 23,976 fps) I burn the dvd in encore cs6 with hd menu and I get pixelated.   I've done transcoding but It downgrade to 480   I need urgent help.

    I have a video in excellent quality (1280x720 23,976 fps) I burn the dvd in encore cs6 with hd menu and I get pixelated.   I've done transcoding but It downgrade to 480   I need urgent help.

    Hi,
    first, sorry if my english sucks jajaa i speach spanish, havent practice my english for a while.
    first i edited my video in premier cc
    sequence 1280X720, 59,94 fps
    48000hz - stereo
    the i linked it with dynamik link to after, make some color correction, etc etc etc
    i renderd in quicktime animation
    my video looks fine in my computer, but when i send my .mov video to encore (cs6) in a HD MENU and standard menú, the image sucks.
    i have done the transcoding in encore, but i doesnt work either. i dont know what else to do.

  • Need urgent help!!!! (combine prompt and formula)

    Hi,
    I am using Oracle Business Intelligence 10.1.3.3.2, and creating some reports from answers. I desperately need to combine
    prompt and formula on some column.
    I need to use prompt in my formula on some column.
    Need urgent help !

    You can use the presentation variables to pass the value of the prompt into the report or any column formula.
    In the dashboard prompt you see an option called "Set Variable" where and you need to give a name to the variable.(Say Var_value)
    Now the value of the variable can be simply referenced using the syntax @{var_name}{10}. Here '10' being the defualt value which is optional you can simply reference using @{var_name} and you have the value of the prompts passed.
    Hope it works
    Thanks
    Prash

  • Need to do a remote wipe of my iphone - stolen 24 hrs ago and . Need urgent help on this. Thanks - Pinaki

    Need to do a remote wipe of my iphone - stolen 24 hrs ago  Need urgent help on this. Thanks - Pinaki
    < Personal Information Edited By Host >

    Follow the steps in this article:
    iCloud: Erase your device
    Sign in to icloud.com/#find with your Apple ID (the one you use with iCloud), then click Find My iPhone.If you’re using another iCloud app, click the app’s name at the top of the iCloud.com window, then click Find My iPhone.If you don’t see Find My iPhone on iCloud.com, your account just has access to iCloud web-only features. To gain access to other iCloud features, set up iCloud on your iOS device or Mac.
    Click All Devices, then select the device you want to erase.If you have Family Sharing set up, your family members’ devices appear below their names.
    In the device’s Info window, click Erase [device].
    To erase:
    An iOS device: Enter your Apple ID password. If the device you’re erasing has iOS 7 or later, enter a phone number and message. The number and message will be displayed on the screen after the device is erased.

Maybe you are looking for