Possible to manage Windows processes using Java

Hi,
I'm looking to develop a standalone application that will be able to kill certain Windows processes...is such a thing possible using Java? If not, could someone point me in the direction of a technology that can achieve this?
Thanks

[LEARN HOW TO RESEARCH YOURSELF!!! THEN ASK QUESTIONS LATER|http://tinyurl.com/yllkh3v]
Mel

Similar Messages

  • New "Windows Programming Using Java" Website

    Our newly created "Windows Programming Using Java" website (http://fivedots.coe.psu.ac.th/~ad/winJava/) is for programmers who want to extend Java's capabilities on Windows XP and/or Vista, but aren't sure where to start. One of the drawbacks of Java's portability is that many Java programmers have a rather sketchy knowledge of Windows-specific programming.
    We plan to explain how Java applications can utilize Windows application software, OS features, and hardware beyond the reach of Java's standard libraries. A variety of Java/Windows programming techniques will be explained, including:
    * Java's employment of the Win32 API via C, JNI, and J/Invoke.
    * Java's utilization of Window's Command Line Interface (CLI) and batch files, accessed through Java's Runtime, ProcessBuilder, and Process classes.
    * Java and Windows object-based scripting, centered around the use of VBScript, Windows Script Host (WSH), and Windows Management Instrumentation (WMI).
    * Java interoperability with COM, including hosting of ActiveX controls in Swing containers using jacoZoom.
    This website is a work in progress, with four chapters available for download at the moment. We'll be adding more regularly, and would love feedback on what we're doing.
    Thanks,
    Gayathri Singh and Andrew Davison
    [email protected] and [email protected]
    Edited by: AndrewDavison on Jun 20, 2008 1:36 AM

    Hi, I am looking the similar kind of requirement that you had done.. Do you have any more details on the code that is working for you . All i need is if the user logs in successfully in windows, the the app should be accessible. Please let me know if you have the code with you on this problem.
    Thanks in advance
    "what i meant is the we b applications running in my system, when i access the application iam able to to login automatically with windows authentication and now in case of other users following process happened:"

  • Need to track windows processes through java code.

    Need to track windows processes through java code.
    Eg: I want to find out whether an exe file (wrun.exe) is running or stopped.
    Can I do it through java. If so can any one please tell me how to do it. That will be a great help.
    Thanks,
    Ramesh

    There are 2 options for things like this:
    1) Use Runtime.exec() to execute some command or application and parse the input from it.
    2) Write some native code and use JNI to call it.

  • Changing Windows Registry using Java

    hi...all,
    Any1 knows how to change windows registry using java. wheather is it possible ?? or there is any other alternative for same....

    Write a Java class which will create a temporary REG file... use regedit /s from Runtime.exec() and pass that file as argument.
    ***Annie***
    (Where the hell do these ideas come in my head!)

  • How to stop a windows process in java program?

    Thanks!

    Write a JNI function that uses the APIs OpenProcess and TerminateProcess.
    Beware - not all processes can be terminated by the TerminateProcess API. To prove my assertion, try killing some processes using the Task Manager. Even running your program as an administrator, you can't kill processes like Windows services.

  • How to execute external  spawned process using  java

    Hi,
    I am executing PGP from command line using java.
    For adding the public key I use Runtime object like this
    Runtime rt = Runtime.getRuntime();
    Process process = rt.exec("pgp -ka "+"d:/Mangesh/pubkey/sandy.asc "+"C:/PROGRA~1/NETWOR~1/PGPNT/keyrings/pubring.pkr");PGP is executing this but inbetween it asked for confirmation "Do you want to add public key (y/n)"
    I am providing data to process this way:
    PrintWriter pw = new PrintWriter(new OutputStreamWriter( process.getOutputStream()));
    pw.write('y');
    pw.flush();But after this their is no execution from PGP and console remains until I closed it.
    PGP is waiting for ENTER KEY
    How can I provide ENTER KEY from java
    This is right method ??? or any other options are available??
    I am awaiting for your valuable suggestions .
    Regards
    Man479

    On Windows the "enter key" consists of two characters: carriage return and a line feed (\r\n). You may have to send both. If that doesn't work, pgp is not reading the reply through stdin, only through the console, and there's no way to pass the 'y' to it through Java.

  • Window programming using java

    hi,
    can anybody suggest me how to go with widow API using java?
    say like if i want to shutdown my computer after pressing the button.
    thanks in advance,
    sachin

    Given the platform-independant nature of Java, I'm not sure there's a way to program Windows directly using it. Certainly there's no Java methods for this.
    However, it is possible to wrap windows dlls and access them from java, and this is probably the route you'll have to take. It's not particularly easy, but it's effective.
    I remember there being an article on gamelan.com about this, sorry don't have the link anymore - you'll have to search.

  • Terminate a BPEL Process using Java Code

    Hi,
    How can I achieve the forcible termination of a BPEL process via Java code??
    Thanks
    Pramod

    I guess I'll not be able to use event handlers because if I set an OnMessage, the process wont get kicked off till I receive a message, isnt it?
    My requirement is that I want the BPEL to keep executing as normal but as soon as I send a request to Stop, then it should terminate.
    Actually, is it possible to achieve the following? That is, I want to keep running a bpel process but at the same time keep monitoring for an input message(sent from another partnerlink maybe). As soon as I receive my input message, a different scope is executed and in this scope I can then put a terminate.
    Thanks
    Pramod

  • To delete all instances of a particular bpel process using java APIs

    Hi,
    Which classes and methods are used for bulk instances deletion of BPEL process using APIs.

    Iam using this code for deleting instances in bulk,
    WhereCondition wc = WhereConditionHelper.whereInstancesClosed();
    IBPELDomainHandle domainHandle = locator.lookupDomain();
    BPELProcessId processId1 = new BPELProcessId("default","DBTest","1.0");
    domainHandle.deleteInstancesByProcessId(processId1);
    but iam getting Eceptions like
    Exception in thread "main" java.lang.Exception: Error deserializing return-value: java.io.InvalidClassException: com.oracle.bpel.client.BPELDomainHandle; local class incompatible: stream classdesc serialVersionUID = -6384534326625967840, local class serialVersionUID = -8310067783665200608
    Iam able to delete instances one by one using this code,
    ------------------- basic code-----------
    IInstanceHandle instance_handle[];
    instance_handle= locator.listInstances(wc);
    for(int x = 0; x< instance_handle.length; x++){
    System.out.println("Deleting instance "+instance_handle[x]);
    instance_handle[x].delete();
    But i want to delete instances in bulk,not one by one.Can you help me out in this.

  • How to get the input payload passed to the BPEL Process using java.

    Hi all,
    I am working on an application in which, if some fault occurs in the flow I need to insert the input payload that is being sent to the BPEL process into a Queue using Java. I have gone through the FaultHandling framework and failed to find the method by which we can get the input payload. Can someone kindly help me in getting the input payload. using the java.
    Regards

    Hi,
    Use method getVariableData with your input variable.
    Object getVariableData(String name, String part, String query)
    For example: getVariableData("input", "payload", "/");
    http://docs.oracle.com/cd/E17904_01/integration.1111/e10224/bp_java.htm
    Cheers,
    Vlad

  • How to resubmit failed activity in a BPEL process using Java in 11g

    Hi All,
    In 11g, is there any API using which we can resubmit failed activity in BPEL using Java.
    Thanks,
    Vidya

    Hello
    To assign a header
    1. Create a variable of the correct type
    2. Click on the invoke/pick/reply or the receive
    3. Click on the header tab
    4. Select the header
    Validate the header after the receive
    5. Select the header the varaible and use a validate action.
    Best Regards Tristan Hayman

  • Open, Open Containing Folder in Windows Explorer Using java

    How to open a file using the default application using java code?
    Ex: - Open a JPG file using its default image viewer (Ex: Piscasa 3)..... (Not Inside the Java Application)
    Then how to open a file containing folder with that file selected?
    Couldn't find any sources in the internet, Not sure whether my search terms are correct....
    Please Help
    Thanks!!!

    Madushan.UoM wrote:
    Thanks Andrew...
    I've did opening the file using
    try {
    Desktop desktop = null;
    if (Desktop.isDesktopSupported()) {
    desktop = Desktop.getDesktop();
    desktop.open(new File(path));
    } catch (IOException ioe) {
    ioe.printStackTrace();
    }Also able to open the directory by setting the "path" variable into the directory path
    But how to highlight the needed file after the Explorer is opened???Also, to be completely safe, you'd want to call Desktop#open() only if isDesktopSupported() returns true, otherwise you'll get a NullPointerException.
    if (Desktop.isSupported()) {
       try {
          Desktop.getDesktop().open(new File(path));
       } catch (IOException ioe) {
          ioe.printStackTrace();
    }

  • Isn't possible to get MAC address using java

    I am trying to get the MAC address of my pc using java code. It seems that i am only able to get the ip address. Can anyone help?

    Use JNI or Runtime.exec(). For the latter you would need to find an OS command line tool and then parse the output.

  • Is it possible in firefox to close a browser window/tab using java script without modifying the configuration settings? If YES, please let me know.

    Requirement: On click of button, I want the browser window to be closed.
    Solution: I am calling below java script on "onClick()" event of button.
    function close_window()
    window.close()
    This works in internet explorer but not in Mozilla Firefox. What is the reason behind it. Is there any way out to close the browser window in Mozilla Firefox?

    Can you post a link to a page that opens a pop-up window where a close button doesn't work?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Knowing System Processes using Java

    I am trying to write a program which will list all the processing running in the operating system. With native RunTime class it is not possible. What is the API to be used? I also want to know the number of JVMS running on the Operating System. Can anyone let me know how can I acheive this?

    I don't presume to know about every Java class on the planet, but I know the JVM/JRE doesn't provide the information needed to implement this functionality in pure Java.
    You will have to find a way to interact with the system at a lower level than Java provides, either through JNI or by executing a (platform-specific) command that provides this information.

Maybe you are looking for