How to schedule a java application via Windows Scheduler

I can't figure out how to schedule a java application using the Windows Scheduler. Do I schedule the java application with the .class file as a parameter? How do I pass arguments to it?
To execute FileCopy.class, my best guess was:
Start | Control Panel | Performance and Maintenance | Scheduled
Tasks | Add Scheduled Task | Browse | Program Files | Java |
jre1.5.0_06 | ... Advanced Properties
Under the Task tab:
Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe"
Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy
FileCopy"
This does not work. How do I schedule the FileCopy.class java application, and how can I pass arguments to it? Can this be done without specifying a password?
TIA,
John

Suppose that your class is FileCopy (has no package name) and is located under MyDocuments\Eclipse_Workspace\Java_File_Copy folder, then you should have:
Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe" FileCopy
Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy"
And yes you must provide a user password to execute the task.
Best way to do this is to create a special user (with password) for executing this task.
Regards

Similar Messages

  • How to start a java application as windows 2000 service?

    Hi all,
    I'm trying to start / stop a java application as a windows 2000 service. But nothing appens (I can see the screen that rapidly display the java help prompt and then disappear)
    I've a working directory i.e C:\MyDir and it contains instsrv.exe, srvany.exe and my application jar MyApp.jar
    I'm using instsrv.exe to register a java application as a service ( C:\MyDir\instsrv MyApp C:\MyDir\srvany.exe )
    I've added a key in registry by running regedit
    The key is under the tree HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyApp
    the key value is Parameters
    in the key I've added a string value "Application" with the value "C:\j2sdk1.4.2_01\bin\java.exe"
    and a string value "AppParameters" with the value "-classpath C:\MyDir\MyApp.jar main" where main is the name of the main class application.
    This seems to run correctly with Windows NT 4.0
    But doesn't work with Windows 2000.
    Can anyone help me?? pls.
    Thanks.
    Max

    I'm replying to myself .... ;-) ahah
    All we need for this purpose is JavaService, at link
    http://www.alexandriasc.com/software/JavaService/index.html

  • Running a Java Application in Windows

    Hi, Can anyone tell me how to run a Java Application in Windows? I've tried to run it using TextPad 4.5 but it gives me an exception saying it can't find a class defenition. I'm actually using IBM VisualAge for Java to develop the app and it runs fine INSIDE VisualAge and I've exported my compiled class files and so on, to run it stand-alone in Windows. I'm using some custom objects and inner classes, could these be the problem?

    YES! SUCCESS! I exported my class files from VAJ and along with the manifest file that it adds automatically. I opened up the jar with Winrar, extracted the manifest file and added the Main-class: header pointing to my executable and then put it back in the jar with winrar. And PRESTO! I can now run it with javaw! Thanks for your help peeps...

  • Developing Java application for windows CE based Handheld device

    Hi everybody,
    I am planning to develop the java application for windows CE
    based handheld device.I came to know that Oracle 9iLite supports
    the Developement of Java Application for windows CE devices.Can
    i use the JDeveloper IDE to develop the application on windows
    NT.If so how to deploy the application on windows CE device(Is
    there any options in Jdeveloper to deploy the application).Any
    body please give the solution.
    Regards,
    Siva mani kumar.D

    I agree. In my opinion Sun has done a horrible job documenting all this madness for the average developer just starting out with this stuff. There is the CLDC, J2ME, Personal Java, J2ME-WTK, MIDP, MIDP-FCS ... maddness. Anyway after sorting through it all for a few days, I think the answer to your question you will need to use Personal Java for WinCE and the Sharp Zaurus, and MIDP for PalmOS for the palm. Jeode seems to be the most common and best Personal Java implementation and it is basically the JDK1.2.2 (or is it 1.1.8) that is designed to run on WinCE and Embeddix (such as Lineo on the Zaurus). You program it just like you would a 1.1.8 application and then you can test it by running pjava.exe which is included in the personal java 3.1 download from Sun. There is also a program called JavaCheck that will ensure that your app will run properly in PersonalJava. As for the Palm, MIDP for PalmOS is a 574K program that installs on your palm device. You then use the J2ME-WTK (wireless toolkit) to build a JAR/JAD file and you use the MIDP API to write the code.

  • Developing Java Applications for Windows CE

    Hello,
    I hope this sub forum is right. So I must develop a Java Application for Windows CE. I read something about J2ME, but I think this is only for Mobilephone and Windows CE supports AWT. So I tried just some simple forms with J2ME.
    Can anybody tell me how I develop java Applications for Windows CE? Can I use Eclipse or must I use another IDE?
    Realy I developed Swing 5-6 Month but I have no idea how I develop Java Applications for Windows CE.
    Thanks a lot for helping...

    The MIDP for Palm OS 1.0 requires Palm OS v3.5 or higher to run. According to your error message, the emulator is not running v3.5 or higher. Try to get hold of a ROM image with a later version. I've run it with v4.0 of the OS and it works.

  • How can i run java application at system startup just liks as services

    How we can run java application at the time of system
    starts up just like as services.

    Hi,
    At first you have to create an exe of the class file.
    for that go to the site www.duckware.com/java2exe.html
    Click on the j2exe23c.exe(75k) download it and install in ur system. convert the class file to windows exe.
    The put the exe in the startup folder in windows.
    If ur not able to find that folder search for it and put that exe in that folder.

  • How to make a Java application that will change the client box's IP address

    HI how to make a Java application( that application would be run on the client ) that will change the client box's IP address ( IP address of itself )

    If you can do that through the command line, then use Runtime.getRuntime().exec(...) to execute your command.

  • Starting and stopping applications via a Java-application on Windows/Unix

    Hello,
    I want to start java and other applications via a java application.
    This java application should start several different applications on windows and
    on unix systems and take care of their current state (e.g. running/not running).
    For all applications to be started there are .sh-scripts for unix and .bat-scripts
    for windows. In the scripts there could be a java call, e.g. "java someApplication",
    or some executables could be called. These scripts set the applications' environment etc.
    and start the application finally.
    My java application calls these scripts via the ProcessBuilder API, which is working fine.
    But there is the following problem: on windows, when executing a script that starts
    some other application, the ProcessBuilder gives me process-handle to the started
    process. If calling destroy() on this handle, only the cmd.exe gets killed which
    started the application. The application itself is running on. This is undesired behaviour
    since I want to be able to control the started applications, at least start and stop it which
    is impossible that way.
    On unix, it is working when using
    "exec java someApplication"
    instead of just
    "java someApplication"
    in the .sh-scripts. The exec command substitutes the shell process with the underlying
    process started in the script, so everything is working as expected on unix.
    But how could I get this working on windows systems? Is there any equivalent to the exec
    command on unix? Any suggestions appreciated.
    If something's unclear in my description, please let me know.

    Yes - after looking at this option - I think that's the direction I am going to go. It probably makes sense to give my JMS topics and my BPEL server their own OC4J instances anyway - for a number of reasons.
    Lon

  • How to Run a Hello World Java application on WIndows Mobile

    Hi!
    We have a sample Plug-in environment Java application downloaded from http://www-128.ibm.com/developerworks/library/os-ecl-ercp/index.html - IBM library.
    We have downloaded the source files org.eclipse.testworkbenchapp_1.0.0.jar and tried running the application on desktop PC, this worked fine.
    We are using Eclipse 3.2 to run this Java application on Desktop.
    Now, we are trying to run the same application on Intermec Windows Mobile 5.0 device.
    1. The device has IBM J9 ? WebSphere MicroEnvironment MIDP 2.0 for Windows Mobile2003 installed in it.
    2. On installing this on Windows Mobile, in Start ? Programs ? we find MIDlet HQ - on launching this, opens a window with Install button.
    3. On Click on Install button, another window opens which asks for URL to install.
    4. In the URL Edit box, I give file:////Org.Eclipse.testWorkbenchapp.feature_1.0.0.jar which is present in \MyDocuments\Update site folder copied from desktop workspace via Active sync ? As mentioned in the above IBM library site.
    5. I have also tried file:////MyDocuments\Updatesite\Org.Eclipse.testWorkbenchapp.feature_1.0.0.jar as input to URL.
    6. On click OK, I get an error titled AMS Error with description The application descriptor was missing the required MIDlet Name field.
    I am held up here and not able to move further.
    As mentioned in the above IBM library site I tried downloading the update site folder via Eclipse ? Software Updates ? Find and Install in Help menu.
    I selected Search for new features to install and browsed the Update site folder location present in my Eclipse workspace. This also does not work.
    Any help in this regard in greatly appreciated. Thanks in advance!

    I would ask such questions in the J2ME forums, or even better in a websphere forum, like here:
    http://www-128.ibm.com/developerworks/forums/wsdd_forums.jsp

  • How to start a java application by double clicking just like windows gui?

    Hi,
    I want to open the user-defined file in my java application. The way is like the notepad in windows:1.double click the file name 2.the file is opened in the java application 3.if this file has opened at the same time ,then the last opened will be read-only.
    Could you tell me how to carry it out ? Thank you
    from Maria

    !!! Please give me a help! i am thirsty for itSo, to get this straight, you have a Java application in a jar. For some reason, you do not execute this directly. Are you aware that you can execute a jar directly without the need to write a C++ exe to do it?
    Anyway, for some reason, instead you have a C++ application which launches the JVM with your jar main class.
    Well, you want to do two things. First of all, on Windows level, you need to associate the file type of your user file with your application. Note that they have to have a specific file extension that you choose. To associate the file type with an executable, you open a windows explorer, go to View, Folder Options, File Types and add an entry for your file type and specify it to open with your application. If you do not know how to do this, google for "windows associate file type with program executable" or something alike.
    Now, if you double-click one of your user files, the associated exe will open, and it will receive the file name as a command line argument. In your C++ application, you will need to pass this argument, a file name, to the Java application where you launch it.

  • How to launch a Java application by clicking an icon for the windows system

    Hi Deal All,
    I am new in this forum, I am used to be at Cryptography. Currently I have completed a Java project and I am intending to launch it from Windows.
    I will design an icon but how I can launch the java application by clicking the icon in Windows system.
    Great thanks for your guidence!
    Best,
    Your friend.

    Hi Deal All,
    I am new in this forum, I am used to be at
    Cryptography. Currently I have completed a Java
    project and I am intending to launch it from Windows.
    I will design an icon but how I can launch the java
    application by clicking the icon in Windows system.
    Great thanks for your guidence!
    Best,
    Your friend.Make the icon a shortcut with a target of something like "javaw.exe YouClass.class"

  • How to create a java application & call it from a PDA via TELNET

    Dear All,
    My objective is to create a java application that's hosted on a server and called remotely from a PDA using TELNET.
    I've created a java application using Eclipse & the jCurses library. Unfortunately, the jCurses API events and listener aren't enough and i wasn't able to achieve my target application functionality.
    Can anyone advise a library other than jCurses that can help create a java application that can be called from a PDA via TELNET?
    Is AWT an option ?
    Thanks in advance for your support,
    Best regards,
    Lana

    user10827661 wrote:
    My objective is to create a java application that's hosted on a server and called remotely from a PDA using TELNET.
    I've created a java application using Eclipse & the jCurses library. Unfortunately, the jCurses API events and listener aren't enough and i wasn't able to achieve my target application functionality.
    Can anyone advise a library other than jCurses that can help create a java application that can be called from a PDA via TELNET?
    Is AWT an option ?Your server side Java application can use a Java library that
    creates a java.net.ServerSocket to listen for TCP connections from TELNET clients.
    You do not need any graphics (jCurses or AWT) on the server side, telnet is a simple ascii protocol.

  • How to call java application in Windows NT environment?

    I have a JDBC application running against oracle database on NT server. There is another non-java application need to call my java application. The programs that non-java program can call are .exe, .dll, and .bat files. I wrote a Dos script and save it as .bat file. Every time this .bat file was called, the dos screen will be shown. Anything I can do to let Dos screen not shown, or anything I can do to wrap my java classes into an .exe file? Thanks in advance.

    If your tool can run a .exe and supply arguments, why not simply invoke "javaw <jvm-args> <class> <class-args>"?

  • How to launch my java application in a web browser?

    Hi. I try to launch my java application, e.g. "HellowWorld.java", using web browser.
    1. How can I change my java application program to java applet in general way?
    I read "Java: An Introduction to Computer Science and Programming, Third Edition"
    by Walter Savitch and found page 803 - "Converting a Swing application to an applet".
    My question is how I can know which class should be removed or not such as using JApplet instead of JFrame. Are there general rules about this?
    2. I found "AWT only" tutorial had some example lauching application using "AppletButton".
    How can I use this method to launch "HelloWorld.class"?
    http://java.sun.com/docs/books/tutorial/information/download.html#OLDui
    (after extracting zip file) -> ../OLDui/layout/card.html
    3. (continued 2) Can I use above method to embed applet into web browser?
    For example, java Swing application -> applet using "AppletButton" -> web browser using "<applet></applet>" tag.
    I'd appreciate any partial anwers of these questions or other suggestions.
    Thanks.

    Thanks! Here is what I got from your help.
    * HelloWorldSwing.java is a 1.4 example that
    * requires no other files.
    import javax.swing.*;  
    import java.awt.*;                //for Container class    
    //  public class HelloWorldSwing {
       public class HelloWorldSwingToApplet extends JApplet {
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
    //    private static void createAndShowGUI() {
          private void createAndShowGUI() {
            //Make sure we have nice window decorations.
    //        JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
    //        JFrame frame = new JFrame("HelloWorldSwing");
    //        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Container frameApplet = getContentPane();
            //Add the ubiquitous "Hello World" label.
            JLabel label = new JLabel("Hello World");
    //        frame.getContentPane().add(label);
         frameApplet.add(label);
            //Display the window.
    //        frame.pack();
    //        frame.setVisible(true);
          public void init() {
           createAndShowGUI();
    /*    public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

  • Running shell command from Java, but from Windows Schedule Task?

    I have a simple java program that will start a dos based program. The java program works great when I run it, but when I run it from the Windows Task Scheduler, the dox box that should pop up, does not. It is running because I can see it in the task manager but I can not see the command window.
    Any ideas how to show the command window from a java application that is ran from Windows Task Scheduler?
    Example program below. Runs fine by itself, should get a dos popup that issues the directory command, run it from the scheduler and it does not show the dos box. You can however see it in the Processes as CMD.exe.
    import java.io.IOException;
    public class Test {
          * @param args
         public static void main(String[] args) {
              try {
                   Runtime.getRuntime().exec("cmd /k start dir");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Now the my real program is quite a bit more complicated. It actually goes out and checks the status of an Oracle Database, if all the tablespaces are online, then the middle tier application is allowed to start. The middle tier application is started by my java application, and is comes up with a dos console which shows status and users connected to the database.

    Jag,
    Actually, the question of whether it works for me seems to depend on the version of the OS (or Oracle). On RedHat Linux (Oracle 8.1.6) it didn't work at all, but on Solaris (Oracle 9.0.2) it did. Here's the output from that run:
    SQL> /
    output of the command run:
    init.ora
    initDBPart9i.DBPSun01.ora
    initdw.ora
    lkDBPART9I
    orapw
    orapwDBPart9i
    spfileDBPart9i.ora
    Done
    PL/SQL procedure successfully completed.
    But, I did need to change a line of your code to this:
    Process p = Runtime.getRuntime().exec("/usr/bin/ls");
    your original was:
    Process p = Runtime.getRuntime().exec("ls");
    You might consider, if possible, use of some of the Java File classes instead of ls, as this might make things more predictable for you. There were some examples in oramag.com a few months ago, but they were pretty simple (you might not need them).
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

Maybe you are looking for

  • New folder for music on Curve

    I'm trying to figure out a way to put some children's songs on the Curve but not in the same folder of MUSIC on my 2 gig media card. I'd rather not have Madagascar play when listening to my favorite tunes! I currently hid them in my RINGTONE folder b

  • Quicktime Player opens all past viewed videos

    As I opened my first video in Quicktime it played fine, then I closed Quicktime Player and opened another video. At that point the new and old videos opened. The more videos I viewed the more that opened. I cannot close individual windows I must clos

  • HT4623 I tried to install the Facebook app on my iphone. It says I need ios 4.3 or better. My phone has 4.0.2 (8A400) What do I do?

    I tried to install the Facebook app on my iphone.  It says I need ios 4.3 or higher.  My phone has 4.0.2   How do I up grade to 4.3 or better?

  • Stuck on Variables

    Hi, I am making a database viewer using Dreamweaver, I can search for the jobs in the database and have created a detail page so I can view results from clickong on a link on the results page. My problem comes now, I have a materials table, which sho

  • Error Message when downloading ap

    Hi! I am trying to download the "preware" ap on my Palm Pre 3 and each time I go to enter my credit card details I get the following error message: Data Entry A required field does not exist or is empty I am from Australia and am completing all the f