How can i execute vb scripts in java program

hi
how can i execute any batch files or any other exe files (vb scripts) from java programs
thanks

Hi,
You use Runtime.exec to execute commands / exe-files. See the documentation (and remember that it will only work on windows):
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
/Kaj

Similar Messages

  • Is it possible to execute SAPGUI scripts from java program?

    Hi everyone..
         I need to develop an java applications that executes the SAPGUI script or any technique that execute set of transaction as client.
         Is it possible to execute SAPGUI scripts from java program? if so, how it can be achieved? is there any other technique to achieve above mention scenario?.
         it will be more helpful, if docs related to that are shared..
         Thanks in advance

    Oh, bummer. Would be much more convenient if I could just use iTunes for everything. Can't stand WMP. I wonder if WinAmp might be a good compromise?
    Thanks for this answer . . .
    Sharon

  • How can i execute Spaces API in java main class?

    Hi
    I am able to execute Spaces API through portal application. However if i try to execute it in java main class, its throwing an exception
    "SEVERE: java.io.FileNotFoundException: .\config\jps-config.xml (The system cannot find the path specified)"
    oracle.wsm.common.sdk.WSMException: WSM-00145 : Keystore location or path can not be null or empty; it must be configured through JPS configuration or policy configuration override.
    How can i set this path, so that i can execute Spaces API from java main class.
    Need this main class to configure in cron job, to schedule a task.
    Regards
    Raj

    Hi Daniel
    Currently i have implemented create functionality in my portal application using Spaces API, which is working fine. Now the requirement is, i need to implement a "Cron Job" to schedule a task, which will execute to create space(for example once in a week). Cron job will execute only the main method. So I have created java main class, in which I have used Spaces API to perform create space operation. Then it was giving exception.
    Later I understood the reason, as I am executing the Space API with a simple JSE client, its failing since a simple java program has no idea of default-keystore.jks, jps-config.xml, Security Policy. Hence i have included those details in main class. Now I am getting new error,
    SEVERE: WSM-06303 The method "registerListener" was not called with required permission "oracle.wsm.policyaccess"
    For your reference i have attached the code below, please help. How can i use Spaces API in java main method(i mean public static void main(String[] args) by giving all required information.
        public static void main(String[] args) throws InstantiationException,
                                                      GroupSpaceWSException,
                                                      SpacesException {
            Class2 class2 = new Class2();
            GroupSpaceWSContext context = new GroupSpaceWSContext();
            FactoryFinder.init(null);
            context.setEndPoint("http://10.161.226.30/webcenter/SpacesWebService");
            context.setSamlIssuerName("www.oracle.com");
            context.setRecipientKeyAlias("orakey");
            Properties systemProps = System.getProperties();
            systemProps.put("java.security.policy","oracle/wss11_saml_or_username_token_with_message_protection_client_policy");
            systemProps.put("javax.net.ssl.trustStore","C:\\Oracle\\Middleware11.1.7\\wlserver_10.3\\server\\lib\\cacerts.jks");
    systemProps.put("oracle.security.jps.config","C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\jps-config.xml");
            systemProps.put("javax.net.ssl.keyStore",C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\consumer.jks");
            systemProps.put("javax.net.ssl.keyStorePassword", "Test12");
            System.setProperties(systemProps);
            GroupSpaceWSClient groupSpaceWSClient;
            try {
                groupSpaceWSClient = new GroupSpaceWSClient(context);
                System.out.println("URL: " +
                                   groupSpaceWSClient.getWebCenterSpacesURL());
                //delete the Space
                List<String> groupSpaces = groupSpaceWSClient.getGroupSpaces(null);
                System.out.println("GroupSpaces:: " + groupSpaces.size());
            } catch (Exception e) {
    Regards
    Raj

  • How can i execute codedui scripts by using dll

    how Can I Execute Coded UI scripts by using the DLL from anywhere after creating the build 

    Hi yellesh,
    If you mean that you want to run your test with bat file, as far as I know, we could call the MSTEST command line.
    set mstestPath="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
    %mstestpath%\mstest /testcontainer:AutomatedUITest.dll  /resultsfile:TestOutput.trx
    Reference:
    https://social.msdn.microsoft.com/Forums/en-US/29af65b3-598b-4205-80e6-35b942113f3b/how-to-run-coded-ui-scripts-trhu-bat-file?forum=vsautotest
    https://social.msdn.microsoft.com/Forums/en-US/42a5d8f2-fe58-4133-b09d-28fa0553ab1a/run-coded-ui-test-in-certain-moment-in-future?forum=vsautotest
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I execute a script before connection?.

    Hi ,
    I want to execute a script before retrieving the data.How can I do this?.
    Thanks...

    When you say create a command line, what exactly are you referring to? I assume you have a logical schema mapped to the ebs instance you want to run the fnd_global function in (the same one you will have reverse engineered the models from etc), just set that as the schema on the step parameters and ODI will connect through for you as a SQL session.
    Technology set to Oracle ?
    What does the error actually say in the operator log?
    ETA : might be worth checking a few of these links as the refer to EBS with ODI : Oracle EBS and ODI
    Some of the pre-shipped KM's must do something similar to what you are trying to achieve for the apps security.

  • How to execute unix script in java program that is on unix .

    hi ,
    I want to call "sendfax" script that is for sending fax to Hylafax server.
    This sendfax script is called in client java program.

    I want to call "sendfax" script that is for sending
    fax to Hylafax server.
    This sendfax script is called in client java program.And what is your problem?

  • Please help How can i run Os commands thru Java programs

    Hey,
    I want to stop and restart the linux server thru java program.Is it possible to run the os commands thru java program.
    I had it thru Runtime.getRuntime().exec("*.exe");
    it only runs the exe files.How can run files other than exe files like .bat,com ans shell commands..Any body knows please help with the code..or mail to this address
    [email protected]
    thankyou,
    regards,
    j.mouli

    What about "start command.com /C execute.bat", or using the overload that takes a String[] as argument?
    What if you use the the full path of execute.bat?
    What error code do you get?
    And what comes th linux, I'm not sure... you'll need a shell interpreter there too, me thinks. (never had to run anything with runtime.exec on linux). Check the man pages if csh, bash, ksh, or what ever shell you like.

  • How Can we stop the execution of java program which contain infinite loop

    Dear All,
    I create one .bat file which which execute the simple java program
    I write one java program which execute above .bat file using instance of Runtime Class of java
    It's work fine if java program which is executed by .bat file is simple(Which has normal termination)
    But if that program contain inifinte loop then that file will goes on executing untill I close it manually
    So i want a solution in java which close that bat file (command window ) which is in running condtion
    If there any solution please replay me
    I try to close that .bat file using destroy() ,stop() method of Process and Runtime , Thread Class
    but it did not give me correct output
    .bat file still running !!!!!!!!!
    Thanks in advance

    Why not use javaw.exe to make the app run so you don't need the dos window (which is presumably what you are actually talking about when you say bat file).

  • How can I use MS Word within java programming

    Hi everyone!
    I am developing a Java program that will take data
    from an Access 2000 database, and manipulate it,
    display the results graphically and in tables. The
    challenge for me is that I want the program insert the
    graphics and tables into the MS Word template and then
    prompt me to save it as a word * .doc. Do you know
    of any articles or sources of sample code on how to do
    this. The Java environment is Java2, JDK 1.3,
    JBuilder4. The OS environment is XP.
    Regards,
    Farad

    Hi, I also need that package. my e-mail is [email protected] Plese send me that. Thanks in advance
    I have a package that will do this for you. I just
    need to get your email to send an attachment and
    examples.

  • How can I execute on a terminal a program choosing the virtual Desktop

    Hello, this is the situation:
    I have gnome, with 4 virtual desktops, and I am located for now on Virtual Desktop 1 with an opened Terminal. And I want to execute GIMP on the 4th Virtual Desktop. Is there any command to make executing directly GIMP to the Virtual Desktop 4 without having to go explicitly to Desktop 4?
    Greetings

    Look for an application called devilspie. If you can't figure out how to write the configuration for starting gimp on 4th desktop, say so.

  • How execute Unix script from java?

    Can I execute Unix script from java?

    Yes. Using ProcessBuilder. And read [When Runtime.exec() wont|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html]. It's old, but pretty much all of it is still true.

  • How to call business rules scripts via Java API

    Hi
    I have a problem. I have some scripts (business rules in essbase) that can be seen thru Administration Services Console under Business Rules folder. How can I execute these script using Provider Services (via Java API to EssBase interface)?

    hi
    i look too java api sample for "HBR Lounch"
    you can try found example in EAS folder
    C:\Hyperion\AdminServices\AppServer\InstalledApps\Tomcat\5.0.28\eas\webapps\hbrlauncher\MC_LaunchWindow.jsp
    please back, if you will have resolution :)

  • How can I execute a batch file from my java program

    Hi,
    Can someone help me or direct me to a link,
    How can I execute a DOS batch file from my java program?
    Thanks

    You will need to grab a handle to the process's
    outputstream so u can see its output.The OP didn't mention any output from any batch file;
    nor any input for that
    matter,so lets not complicate matters here for now
    ok?Actually I think this is essential to see whether it works or not. It's either that or do some manual check to see whether it ran, which is not exactly elegant, and in some cases this may not be easier than simply writing the output stream code, or in fact it may be impossible to check manually.
    I'm sure it wasn't intentional that your post appeared to be bristling with attitude.

  • How can I execute a bash script by double clicking in finder

    Hello!
    How can I execute a bash script using finder? Or better: How can I create an alias, which executes my bash script?
    Thanks Johann

    Add the suffix command in your script name. E.g. Script.command.

  • How can i execute excelsheet without giving path in java

    Hi,
    How can i execute excelsheet without giving path in java, through this code, you can open the notepad but
    I want whereever the excel is installed in your machine , fine and open excelsheet without given absolute path.
    class ExecuteCommand{
    public static void main(String d[]){
         Runtime r = Runtime.getRuntime();
         Process p= null;
         try{
         p = r.exec("notepad");
              catch(Exception e){
                   System.out.println("error");
    If you know please send me your idea and code samples.
    regards
    Mohan kumar

    just execute the exelfile with the Windows "start" command:
    Runtime.exec("cmd /c start "+excelFileName);But this requires that Excel is the default application for the Excel file type (*.xls). You can test this by simply typing "start myTestExcel.xls" in a dos box.

Maybe you are looking for

  • How can you tell if NO text is entered????

    Hi, Here is what I'm trying to do. I have a JTextField that a user is supposed to enter their name at. After they enter their name, the hit a button and go on. What I want to do is check if they entered anything at all. If they didn't, I want a messa

  • Error while generating ABAP proxy client

    Hi, I want to consume a webservice. webservice URL is http://www.w3schools.com/webservices/tempconvert.asmx?WSDL I can import WSDL in soapUI and get the response. But while generating proxy in SAP, ( SE80 -> Enterprise Service ->service consumer -> U

  • Combining 1-D arrays to save in excel format

    I have different 1-D arrays which I want to store in excel. All arrays in a single MS excel file. How do I do that?

  • ZCM asset management in zen 7 environment

    can i install the zcm asset management and still run the zenworks 7 agent for applications..? cheers

  • Contribute Editing file

    my problem is that I am using a template website and when I bring it into edit it gets all scrambled and images, text, etc. are all over the place. My web page is uneditable. Does anyone know how to fix that ???