Directing a program where to run from

Hey,
I have a question concerning how to direct a program where to run from...
If I have for instance two dirs, In one map a file how is needed to run the program and in the other dir the program. So you cannot run the program without the file.
Does there exist some code... so that you can tell the program to run from the dir where the file is located?
Runtime.getRuntime().exec(command); .... is not the right one, because this runs from the dir that your program is in.
can anyone help me?

I have a question concerning how to direct a program
where to run from...The process is started by the OS, so the best way would be to start the JVM process from somewhere else. No idea whether setting the "user.home" property really helps.
Does there exist some code... so that you can tell
the program to run from the dir where the file is
located?new File(whateverPathHere)? JFileChooser? Or are you looking for a command-line argument? Or maybe an environmental variable? Where is that location information supposed to come from?

Similar Messages

  • Extract Process Chain ID/Name that an embedded ABAP program is run from?

    Hi all,
    I have created some Process Chains in SAP BW where I have incorporated some ABAP program Process Types that uses the same ABAP program.
    In these embedded ABAP program Process Types I need to extract the name of the Process Chain it runs from (ID, Technical Name, Descirption).
    Is there any way this is possible to do?
    One solutions that is not possible to implement (due to parallell runs of process chains that uses the same ABAP program) is the following:
    search in table RSPCVARIANT for your program as follows
    - field TYPE = "ABAP"
    - field FNAM = "PROGRAM"
    - field LOW = <program name>
    take the value of field VARIANTE and use this in table RSPCPROCESSLOG (enter a date selection for BATCHDATE as well)
    take the most recent entry (should be the one you're actually running at that moment)
    via field LOG_ID, retrieve CHAIN_ID (technical name of your process chain) in table RSPCLOGCHAIN
    So my question here is:
    -Is there any way to extract the Process Chain ID/Name that an embedded ABAP program Process Type is run from?
    Thanks beforhand for your feedback!
    regards
    Oddmar

    Hi Erik,
    I am stuck up with a similar requirement, wherein I have an ABAP program in my process chain and I need the technical name of the process chain in the ABAP program at run-time.
    Did you get a solution or work-around for this scenario?
    Thanks in advance.
    Regards,
    Chetana.

  • Program Running from Long Time

    Hi Friends,
    There is a program running from long time. Can anybody let me know how can i analyse this program other than SM50, SM51, SM66. Its a CRM Program.....there are no logs.......
    Points will be rewarded....
    Thanks,
    Nagesh.

    Hi,
    I will suggest you to check a few places where you can see the status
    1) SM37 job log. If its active make sure that the job log is getting updated at frequent intervals.
    2) Get the job details (server name PID etc from SM37) and see in SM66 if the job is running or not. See if its accessing/updating some tables or is not doing anything at all.
    If its running and if you are able to see it active in SM66 you can wait for some time to let it finish.
    3) You can also try SM50 / SM51 to see what is happening in the system level like reading/inserting tables etc.
    If you feel its active and running you can verify by checking if the number of records getting updated/ inserted /deleted in table level.
    You can take the help of Basis/DB2 to find out what is actually happening in the background.
    This is the best way to identify of something is happening in the database level.
    Thanks,
    JituK

  • Not able to run a program to extract news from news channel websites.

    Let me start with stating the fact that I am a super greenhorn, so please be ultra elaborate with the answers .
    This is my code, I copied it from Mr. Alvin Alexander (http://alvinalexander.com/java/edu/pj/pj010011?). I am trying to use it to extract news from news channel websites.
    I used the following URLs:
    1.http://in.reuters.com/
    2.http://timesofindia.indiatimes.com/
    3.http://www.hindustantimes.com/
    // JavaGetUrl.java: //
    // A Java program that demonstrates a procedure that can be //
    // used to download the contents of a specified URL. //
    // Code created by Developer's Daily //
    //  http://www.DevDaily.com  //
    import java.io.*;
    import java.net.*;
    public class JavaGetUrl {
      public static void main (String[] args) {
      // Step 1: Start creating a few objects we'll need.
      URL u;
      InputStream is = null;
      DataInputStream dis;
      String s;
      try {
      // Step 2: Create the URL. //
      // Note: Put your real URL here, or better yet, read it as a //
      // command-line arg, or read it from a file. //
      u = new URL("http://200.210.220.1:8080/index.html");
      // Step 3: Open an input stream from the url. //
      is = u.openStream(); // throws an IOException
      // Step 4: //
      // Convert the InputStream to a buffered DataInputStream. //
      // Buffering the stream makes the reading faster; the //
      // readLine() method of the DataInputStream makes the reading //
      // easier. //
      dis = new DataInputStream(new BufferedInputStream(is));
      // Step 5: //
      // Now just read each record of the input stream, and print //
      // it out. Note that it's assumed that this problem is run //
      // from a command-line, not from an application or applet. //
      while ((s = dis.readLine()) != null) {
      System.out.println(s);
      } catch (MalformedURLException mue) {
      System.out.println("Ouch - a MalformedURLException happened.");
      mue.printStackTrace();
      System.exit(1);
      } catch (IOException ioe) {
      System.out.println("Oops- an IOException happened.");
      ioe.printStackTrace();
      System.exit(1);
      } finally {
      // Step 6: Close the InputStream //
      try {
      is.close();
      } catch (IOException ioe) {
      // just going to ignore this one
      } // end of 'finally' clause
      } // end of main
    } // end of class definition
    This is the error i am getting, every time I run it on Eclipse:
    Oops- an IOException happened.
    java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at sun.net.NetworkClient.doConnect(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.<init>(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at java.net.URL.openStream(Unknown Source)
      at JavaGetUrl.main(JavaGetUrl.java:33)
    Also, when I try a local server URL, the output screen goes blank, which I guess is due to lack of Text on the local URL. So, the little research that I did, made me believe that the code not running on external server was due to firewall on the server side. Please help me run it. Also : I work on a proxy network.( if that has something to do with this).
    P.S : Advanced gratitude for any assistance.

    any decently secured server would reject such a blatant attempt to steal its content.

  • Do they have a program where you can go on your home computer from work or any place else.  if the do what is the name of it

    do they have a program where you can go on your home computer from work or any place else.  if the do what is the name of it

    Try LogMeIn, even the free version...
    https://secure.logmein.com/

  • ABAP Program Names to Run V3 Jobs from SM36

    Hi,
    I would like to Schedule the V3 Jobs for SD, MM, PM and other Modules Throug SM36 , Can you please let me know the ABAP Program Names for all of them or can i have any PDF documents that contains this list?
    I could abel to find only for SD I am using (RMBWV311) i need for others please.
    regards
    Krishna Mohan.

    Hi Krishna:
    The information below was extracted from the article by P Renjith Kumar (page 8).
    "LO Extraction u2013 Part 4 Update Methods"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/5039632a-c398-2d10-0aaf-97167a3de753?QuickLink=index&overridelayout=true
    Useful reports in Queued delta
    The deltas for logistics extractor are moved depending on the setup of Job Control in LBWE.To manually move the deltas we can run the R/3 programs depending on Application Components.Use the following programs to move the deltas manually.Go to transaction SE38 in R/3 and run the relevant program to move data from LBWQ to RSA7 .
    u2013 02 Purchasing             RMBWV302
    u2013 03 Inventory Controlling  RMBWV303
    u2013 04 Shop Floor Control     RMBWV304
    u2013 08 Shipment               RMBWV308
    u2013 11 SD Sales BW            RMBWV311
    u2013 12 LE Shipping BW         RMBWV312
    u2013 13 SD Billing BW          RMBWV313
    Regards,
    Francisco Milán.

  • After restarting my computer firefox is deleted for Windows, when i try to open firefox a message pops up saying the program has been moved from its original location and is unable to run How do I get Firefox on my computer permanently?

    After restarting my computer firefox is deleted for Windows, when i try to open firefox a message pops up saying the program has been moved from its original location and is unable to run How do I get Firefox on my computer permanently?

    I have tried everything I could to fix this, but some things require actually being on Firefox, and since I cannot get on, I cannot click on the tabs to do it. I have even totally uninstalled firefox, and that has not fixed this. I still get the same message that firefox is running and I need to close it or restart (which I have also tried dozens of times). I have removed things like Java, and that has not helped either. If I cannot even get on line in firefox, how can I fix this. I am not crazy about using internet explorer, but right now, it is my only option. I even tried to start in safe mode, and the same message box pops up!

  • Office 365 Error: We're sorry, but (program name) has run into an error that is preventing it from working correctly. (Program name) will need to be closed as a result.

    Today we had this error code on starting Office programs out of the blue. We've had this error in the past and we know what caused it, but that action wasn't taken. I've already read other posts, but no "Answer" provides a real solution to a clear
    problem with Office 365.
    The error: "We're sorry, but (program name) has run into an error that is preventing it from working correctly. (Program name) will need to be closed as a result."
    It offers "Repair Now", then the two following options: "Online" or "Offline". Neither are effective.
    In the past we used the Office 365 Fix It tool, but uninstalling and reinstalling Office on a regular basis is unacceptable. Resorting to web apps is also not going to happen.
    Running Win 7 Pro 64 bit, fully updated.
    We're starting to get fed up with this broken software. Paying monthly for programs that don't work is ridiculous. Any real answers would be greatly appreciated!

    Locate your Office application and check the setting of Compatibility.
    For example,
    Right click on Excel (.exe) > Properties > Compatibility > uncheck all the boxes, click Ok and check if it helps.
    To access Excel (.exe), open the following location:
    C:\Program Files\Microsoft Office\Office15\Excel.exe
    Or
    C:\Program Files\Microsoft Office 15\Root\Office15\Excel.exe
    Try to open Excel and check if it opens.
    http://social.technet.microsoft.com/Forums/en-US/590617de-629f-413b-8c11-f3cc79e27e7a/excel-2013-error-on-open-were-sorry-but-excel-has-run-into-an-error-that-is-preventing-it-from?forum=officeitpro
    Thanks.
    Tony Chen
    TechNet Community Support

  • Can programs run from java that is on web browser

    i have written a program and used autorun to run when a cd is put on but not every body will have java on their computer a firend told me that most people will have java on the web browser that will be able to run the cd is this true or will i have to give download instructions to download jav first. this is obviously not ideal as i want people to be able to run the program by putting the cd in and nothing else.

    1. You can create a Java applet, which is a Java program that runs
    from a web page. It will need to be a signed applet. Your autorun will start the browser with the web page carrying the Java applet.
    I don't think this is optimal.
    2. Search for "embed JRE", which describes how you can supply your
    private JRE with your program. It does not install the JRE, nor does it
    care if one is already installed. I did this many times, there is no problem
    at all, but here I have no idea whatsoever what happens if your JRE originates from write protected media. I guess it should work. Experiment or wait for others to see what they think.

  • Hi i have a LG 3D SMART TV that i was runing nero home media 4 from my old windows laptop, this software wont now run from my macbook pro, does anyone know if a program is available i can use preferably for free

    HI i recently purchased a macbook pro to replace my old laptop running windows.
    the problem i have is i have a LG SMART 3D TV which i was running nero media home 4 on from my old laptop, i have tried to install this program on my macbook but is it not compatible.
    does anyone know which program is available to run from my apple product to smart tv in a similar way..... preferable free
    regards
    steven

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • I want to upgrade to snow leopard from 10.5.8. Im hesitant to proceed because I'm running iPhoto 7 and word 2004. I want to be sure these programs will still run and I won't lose my photos or the events I have ordered them by. Should i makea clone o

    I want to upgrade to snow leopard from 10.5.8. Im hesitant to proceed because I'm running iPhoto 7 and word 2004. I want to be sure these programs will still run and I won't lose my photos or the events I have ordered them by. Should i make a partition on my new Iomega external and clone it just in case? I'm running time machine and backing up all the time onto an old LaCie, and right now I have a copy of my iPhoto library on new Iomega, which I recopy every couple of weeks. I got the computer new several years ago and it came with iLife and 10.4 OS I think.

    Word 2004 is almost 10 years old, you will not be able to upgrade beyond Snow Leopard with it. IMHO you have gotten your money's worth out of the application and need to upgrade to Office for Mac 2011, this will work just fine and read your old files just fine too. What will not run beyond SL are all PowerPC (PPC) apps such as Word 2004. You will need to update, upgrade or replace any PPC based apps you want to use. I would recommend taking a little time and check for updates to each of your apps. Then open System Profiler (Applications - Utilities - System Profiler) click the Applications link on the left and then look for any PPC based apps, those are the ones that will not run. You can upgrade to SL just fine with the apps you currently have however if you want to go beyond SL (it's already 2 generations behind) you will need to update or upgrade your apps. You can take your time doing it but eventually you're going to have to begin

  • [svn:osmf:] 9861: Fixing bug where sizing pixel from the previous run of updateIntrinsicDimensions would prevent the dimensions from being decreased .

    Revision: 9861
    Author:   [email protected]
    Date:     2009-08-31 23:08:03 -0700 (Mon, 31 Aug 2009)
    Log Message:
    Fixing bug where sizing pixel from the previous run of updateIntrinsicDimensions would prevent the dimensions from being decreased.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/layout/LayoutContextSprite.as

  • TS1717 This article is vague and unhelpful. My iTunes needs help from a pro. I have over 120,000 songs -- NO movies, TV, radio, or books... I have other programs which efficiently run things which are not audio-based. So why can I not get iTunes working w

    This article is vague and unhelpful. My iTunes needs help from a pro.
    I have over 120,000 songs -- NO movies, TV, radio, or books...
    I have other programs which efficiently run things which are not audio-based.
    So why can I not get iTunes working well?? It now takes at least 10 secs for any operation to be completed!
    That is just plain evil. But I am sure I could do something to help.
    All the music is on an 2T external drive.

    TS1717 as noted in the thread title...
    Brigancook, is the library database on the external or just the media? iTunes reevaluates smart playlists and rewrites its database after every action on the library. I've found this can make a library half that size, with a lot of smart playlists, quite sluggish. That said I'm aware part of my problem is aging hardware. Having the database on the internal drive may improve performance if it is currently on the external.
    I'd expect to see an exponential relationship between size and response time which may explain what you see. Cutting down on the number of smart playlists might help. If we're really lucky the long awaited iTunes 11 might have streamlined some of the background processes as well as cleaning up the front end.
    tt2

  • How to sent text from my C# WinForm program to another program - where the cursore is

    hi
    how to sent text from my C# WinForm program to another program - where the cursore is
    for example: i have in my program label that contain "ABC" , when i press 'Z'
    the ABC will Appears where the cursore is standing.
    how to do it ?
    what to look for ?
    thanks

    Hi E_Gold,
    You'll need to:
    1) Bring the app to the front
    2) SendKeys to the app
    This code will send "ABC" to MS Word:
    using System.Runtime.InteropServices;
    private void Form1_Load(object sender, EventArgs e)
    // Send the keys 'ABC' to MS Word:
    SendKeysToApp("word", "ABC");
    private void SendKeysToApp(string appName, string keys)
    if (BringAppToFront(appName))
    SendKeys.Send(keys);
    [DllImport("User32.dll")]
    private static extern void SwitchToThisWindow(IntPtr hWnd, bool fAltTab);
    private bool BringAppToFront(string processName)
    IntPtr hWnd = HWnd(processName);
    if (hWnd != new IntPtr(0))
    SwitchToThisWindow(hWnd, true);
    return true;
    else
    return false;
    private IntPtr HWnd(string processName)
    IntPtr hwnd = new IntPtr(0);
    using (Process process = ProcessGet(processName))
    if (process != null)
    try
    IntPtr h = process.MainWindowHandle;
    hwnd = h;
    catch
    if (hwnd != new IntPtr(0))
    return hwnd;
    return hwnd;
    public Process ProcessGet(string processNameToGet)
    if (processNameToGet == "")
    return null;
    Process[] processes = Process.GetProcesses();
    foreach (Process process in processes)
    if (process.ProcessName.IndexOf(processNameToGet, StringComparison.CurrentCultureIgnoreCase) != -1)
    return process;
    return null;
    For info on sending special keys such as "Enter", so this page on MS website:
    SendKeys Class
    Hope this helps.
    Thanks, Andy

  • Forcing program to close, I am deleting a lot of files from my trash but it stopped working about 1/2 way through (1650 files left) so I tried to reboot but it won't let me because a the program is still running which I can't close.

    Forcing program to close, I am deleting a lot of files from my trash but it stopped working about 1/2 way through (1650 files left) so I tried to reboot but it won't let me because a the program is still running which I can't close (stuck at 1650 files to go). So it allowed me to click cancel now it says "stopping" for 3hrs now. Is there anyway to force the MacBook Air (new model) to close as you can't remove the battery?

    Press and hold the power button until the Mac turns itself off. This force-shutdown should be done only after you've exhausted other options (you seem to have done so).
    Wait at least 60 seconds.
    Then press the power button to start up the Mac. It will take a little longer to start up because it will perform additional self-tests on the first boot after a forced shutdown.
    Once the bootup is complete, you should be able to delete the trash. Hold down the option key while choosing to empty the trash, which will automatically delete "locked" items.

Maybe you are looking for