How to add simple path in exec command??

Hello friends...want some help on "How to add simple path in exec command?"Because on linux each time username changes I will have to change username in exec command.Please help me.
My code for java on linux is
Runtime r4=Runtime.getRuntime();
                                   Process p4=null;
     //     "oofromtemplate" is command name for openoffice on linux                    //my username on linux is "sandy"     
                                   try
                                   p4=r4.exec("oofromtemplate /home/sandy/complete/Output.html");
                                   catch(Exception ae)
                                   System.out.println("error");
                                   }

System properties yield among other things:
user.name       User's account name
user.home      User's home directory
user.dir      User's current working directory

Similar Messages

  • How to add the IP address helper command to the switch

    Hi
    I am trouble shooting a SF 200-48P and I am a bit lost without a CLI not used to the GUI. What I need to know is how to add the IP address helper command to the switch?
    I have a number of IP phones which are not getting an IP address from DHCP (PCs which are diasy chained off the phones are all working correctly). On the higher end switches I would have added the IP address helper command to the VLAN and that would have sorted it. However I can't seem to figure out how to do this on the small business switch.
    Thanks
    Lorne

    Thanks Rizwan. I was banging my head wishing they weren't small business switches as I felt lost without the command line!
    Lorne Gallagher | McCann FitzGerald Solicitors | Riverside One, Sir John Rogerson's Quay, Dublin 2, Ireland | DDI +353 1 607 1726 | Fax +353 1 829 0010 | www.mccannfitzgerald.ie
    Ireland Law Firm of the Year 2011 | Chambers Europe
    Ireland Law Firm of the Year 2011 | International Financial Law Review

  • How to Add another path to UTL_FILE_DIR in 9i

    Hi,
    How can we add another path to an existing UTL_FILE_DIR value in Oracle 9i?
    Can we do this Dynamically so that it doesn't require a DB bounce
    Thanks in Adv
    Srikanth Tirandas

    Hi 397779
    you can repeat that parameter in the parameter file several times.
    UTL_FILE_DIR
    Parameter type
    String
    Syntax
    UTL_FILE_DIR = pathname
    Default value
    There is no default value.
    Parameter class
    Static
    Range of values
    Any valid directory path
    UTL_FILE_DIR lets you specify one or more directories that Oracle should use for PL/SQL file I/O. If you are specifying multiple directories, you must repeat the UTL_FILE_DIR parameter for each directory on separate lines of the initialization parameter file.
    All users can read or write to all files specified by this parameter. Therefore all PL/SQL users must be trusted with the information in the directories specified by this parameter.
    Note:
    If you list multiple values, all entries of this parameter must be on contiguous lines of the parameter file. If you separate them with other parameters, Oracle will read only the last (contiguous) lines
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1221.htm#REFRN10230
    Joel Pèrez
    http//otn.oracle.com/experts

  • How to add simple static content?

    Hi
    Can anybody tell me if there is an easy way to add static HTML content to the portal?
    Cheers,
    Jacob Vennervald

    Does anybody know if it is possible to add simple text (not HTML) in the portal (EP 6.0 SP2P3) using the above mentioned solution?
    Kind regards,
    Christian Staalby

  • How to create simple path map??

    Hello,
    I have robot and I can control by labview, name of robot is Drjaguar and I want to move robot form one point to another point which are fixed.
    Initially thinking is there are no any obstacles in the path.
    Could any one Please guide me that how can I do so that my robot move form one point to another point when I run my vi.
    I am working in laboratory so I want to run my robot in that area.
    I have looked at the path planning vi (https://decibel.ni.com/content/docs/DOC-8983     and    http://zone.ni.com/reference/en-XX/help/372983C-01​/lvrobovi/path_planning_pal/) , but I  didn't get it means I understand logic of  that vi but how can I generate map for my laboratory and how can I mentions this is starting point and this is ending point.
    Please guide me.
    Thank you very much in advance for your time.

    Hi,
    as described in the documents (An introduction to A* Path Planning (using LabVIEW)) you can build a map of your room using an 2D array of non-zero values. How to do that is also shown in the attached VI of the document. Did you try that already? Or do you want a fancier view of the room?
    The VI also shows you how to define a starting and ending point. 
    I think the document provides all the information you are looking for.
    Regards, 
    Michael

  • How to add simple page navigation to my DS

    As usual the adobe.com help page on this was ZERO help - followed diractions and got page errors
    Does anyone know this... Im sure its not rocket science - i know how to do this in MYSQL php- but there is NO simple way
    to do this in Dreamweaver - Thanks

    My apologies for my ignorance, but could you explain DS?
    Gramps

  • ADT command line packaging - how to add an ANE?

    Hi,
    I need to compile an iOS app from the command line.
    How to add an ANE to a command line packaging?
    This is what I have so far:
    ./adt -package -target ipa-app-store -storetype pkcs12 -keystore iOS7.p12 -provisioning-profile Foo_DragDrop_iPad.mobileprovision Foo_iPad.ipa Foo_iPad-app.xml Foo_iPad.swf FooIcon29.png FooIcon40.png FooIcon48.png FooIcon50.png FooIcon57.png FooIcon58.png FooIcon72.png FooIcon76.png FooIcon80.png FooIcon100.png FooIcon114.png FooIcon120.png FooIcon128.png FooIcon144.png FooIcon152.png FooIcon512.png FooIcon1024.png Default-Landscape.png
    I hope somebody can help me!

    Thanks mate!

  • How to add actions to keyboard?

    Hello I´ve been looking around the net, and found a lot
    of confusing information.
    I would like to know how to add simple actions like
    gotoAndPlay("next"); to a key.
    e.g. the right arrow.
    How could I do this? any simple way?
    thanks in advance, marcelo.

    In AS3 you can just use:
    if(event.keyCode == Keyboard.A)
    help doc:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/ui/Keyboard.html
    In AS2 you can use:
    if(String.fromCharCode(Key.getCode()) == "a")
    help doc:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/00001143.html#300959
    That way you don't have to look up the key codes.

  • How to add a gradient or 50% transparent fill to an .ai imported path?

    Hello All;
    I need some help. My task sounds simple enough but not sure how to accomplish it.
    I created the following path in Illustrator (See attached illustration - the top one). This is actually for a lower-third graphic.
    I have been successful at importating that into .ai. Though should I be using a solid or a shape layer or doesn't it matter ?
    I can add a stroke which affects the color and thickness of the outlines OK.
    However, I can't figure out how to add either a gradient fill or one that is 50% transparent ? Can anyone help ?
    Oh ... I'll mention I'm using After Effects CS3.
    Thanks.
    Tim

    Rick;
    I've used Illustrator for quite a while both at home and at work but I really havn't had to do anything that complex yet. Same goes for Photoshop. I bought DVD tutorials for most of the productivity software I use and when you gave your first explanation, I watched the DVD tutorial on Importing into AE so I know what you're referring to when you say to import as composition. So far, I've only tried to import into AE by copying and pasting. I think that's why I just got the path and not the background. I'll try importing a composition shortly and see if I get the fill too. I actually found a tutorial on making the type of shape I need to in Photoshop so maybe I'll try that instead of Illustrator and then import that into AE.
    Btw - It may not actually be a gradient fill I need to use but instead a solid fill with the top half lighter and buttom half darker.
    In case you're interested, here's actually what I'm trying to create for a video project. I could actually buy the animation for $8 but I figured that this can't be that difficult and I need to learn this stuff anyway ... http://videohive.net/item/lower-third-15-different-colour-schemes/145337?WT.ac=category_th umb&WT.seg_1=category_thumb&WT.z_author=berol
    Tim

  • How to add path to "java.library.path" property?

    I use this command to set the "java.library.path" property:
    java -Djava.library.path=./libs    HelloWorldBut it will overwrite the default value. How can I add the path "./libs" to the default value of "java.library.path"?

    Have you tried
    -Djava.library.path=%PATH%;./libs The command search path is the only default I know. By the way, are you certain that the present working directory will always be the parent of "libs"?

  • OpenScript/How to add .jar file to Java Code in relative path

    Hi all,
    I want to add a .jar file which can be executed separately (like "java -jar A.jar") to my recorded Java Code.I've read this wiki http://everest2.us.oracle.com/wiki/Generic_JAR_Project about how to add a .jar file to "Assets", however, I cannot figure out how to use the .jarr file in Java code,I mean , how to get this .jar file like the method the databank added in "Assets"?
    Things I did are as followed:
    1.Execute my .jar file in OpenScript Java code with absolute path like this:
    String cmd = "C:\Users\A.jar";
    Runtime.getRuntime().exec(cmd);
    This does work, but must set a absolute path in Java code like "C:\User\A.jar" ,which is not the workaround I want (I need my scripts can be run on other machines).
    2.Try to get its current path with following codes:
    File directory = new File(".");
    String currentPath=directory.getCanonicalPath();
    However,though this can get its absolute path (which is the the project path) in Eclipse like "C:\Users\Workspace\testProject", this only gets "C:\OracleATS\openScript" in OpenScript.
    I thought to copy my .jar file to the project path , got its current path in java code first,then can know the path of .jar file, but this workaround failed because of the above reason.
    I notice that in the "Assets" there are "Databanks","Object Libraries","JAR Files","Scripts". Since the databanks and scripts that added to "Databanks" and "Scripts" can be got or run in Java Code like:
    *getDatabank("DatabankName").getNextDatabankRecord(); String data = eval("{{db.DatabankName.data}}");*
    *or getScript("ScriptName").run();*
    *Is there a method to get and run the jar file added to "Assets\JAR Files" like the above?*
    Thank you very much!
    Regards,
    Angyoung

    Hi DM,
    Thanks for your reply!
    I've found a workaround,which is calling OpenScript's APIs ,such as this.getScriptPackage().getRepository() and this.getScriptPackage().getWorkspace(),etc to locate the .jar file.
    And this workaround can still work even though the script is run on other machine.
    Sorry to reply you so late!
    Regards,
    Angyoung

  • How to display Runtime.exec() command line output via swing

    Hi all, I'm new to java but have a pretty good understanding of it. I'm just not familiar with all the different classes. I'm having trouble capturing the output from a command I'm running from my program. I'm using Runtime.exec(cmdarray) and I'm trying to display the output/results to a JFrame. Once I get the output to display in a JFrame, I'd like it to be almost like a java command prompt where I can type into it incase the command requires user interaction.
    The command executes fine, but I just don't know how to get the results of the command when executed. The command is executed when I click a JButton, which I'd like to then open a JFrame, Popup window or something to display the command results while allowing user interaction.
    Any examples would be appreciated.
    Thank you for your help in advance and I apologize if I'm not clear.

    You can get the standard output of the program with Process.getInputStream. (It's output from the process, but input to your program.)
    This assumes of course that the program you're running is a console program that reads/writes to standard input/output.
    In fact, you really should read from standard output and standard error from the process you start, even if you're not planning to use them. Read this:
    When Runtime Exec Won't

  • How to add an Icon to a parent menu item in Command Center?

    Hi guys,
    does anybody know how to add an icon to a parent maenu item in Command Center? BTW, I'm using SBO 6.5
    Cheers,
    Oki

    The SDK doesn't provide any features for adding icons to the command center in SBO6.5.
    Version 2004 has a new image property for menu items that can be used.
    John.

  • How can I run Runtime.exec command in Java To invoke several other javas?

    Dear Friends:
    I met a problem when I want to use a Java program to run other java processes by Runtime.exec command,
    How can I run Runtime.exec command in Java To invoke several other java processes??
    see code below,
    I want to use HelloHappyCall to call both HappyHoliday.java and HellowWorld.java,
    [1]. main program,
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloHappyCall
         public static void main(String[] args){
              try
                   Runtime.getRuntime().exec("java  -version");
                   Runtime.getRuntime().exec("cmd /c java  HelloWorld "); // here start will create a new process..
                   System.out.println("Never mind abt the bach file execution...");
              catch(Exception ex)
                   System.out.println("Exception occured: " + ex);
    } [2]. sub 1 program
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloWorld
         public static void main(String[] args){
         System.out.println("Hellow World");
    } [3]. Sub 2 program:
    package abc;
    import java.util.*;
    import java.io.*;
    class HappyHoliday
         public static void main(String[] args){
         System.out.println("Happy Holiday!!");
    } When I run, I got following:
    Never mind abt the bach file execution...
    I cannot see both Java version and Hellow World print, what is wrong??
    I use eclipse3.2
    Thanks a lot..

    sunnymanman wrote:
    Thanks,
    But How can I see both programs printout
    "Happy Holiday"
    and
    "Hello World"
    ??First of all, you're not even calling the Happy Holiday one. If you want it to do something, you have to invoke it.
    And by the way, in your comments, you mention that in one case, a new process is created. Actually, new processes are created each time you call Runtime.exec.
    Anyway, if you want the output from the processes, you read it using getInputStream from the Process class. In fact, you really should read that stream anyway (read that URL I sent you to find out why).
    If you want to print that output to the screen, then do so as you'd print anything to the screen.
    in notepad HelloWorld.java, I can see it is opened,
    but in Java, not.I have no idea what you're saying here. It's not relevant whether a source code file is opened in Notepad, when running a program.

  • How to add external library in class path folder for use in Java call-out?

    Hi,
    I am working with Java callout component in OSB 12c using Jdeveloper.
    Thing is Jar what i am using to perform conversion of json to xml that using external libraries.
    When i have give reference of my project jar to java callout it doen't found external libraries.
    Could you please tell me how to add external libraries in class path folder or How to use to add it through web-logic server ?
    Thanks,
    Pavan

    Hi,
    Thanks, I have solved issue.
    We can add on following path in windows pc:
    C:\Users\your_usename\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\DefaultDomain\lib
    One you add your external lib here then do restart weblogic server instance.
    Now, you have that external lib or jar in use.
    Cool!

Maybe you are looking for