Mechanism for monitor java application or JVM

Ladies & Gentleman,
I develop Java application under Windows 2000 datacenter. For gurantee to capture all of abnormal situation of java application and also JVM, I need to know how to capture the situation. Do any other tools to do these things? I am very appreciated if you could tell me.

You don't exactly need any specific tools to just capture exceptions, that can easily be done by wrapping the program you want to monitor with your own main() method and adding some shutdown hooks...
But it would be nice to know what you want to do once it happens....
Regardless of which, here's an example of that wrap...
import java.lang.reflect.*;
public class Watch extends Thread
     public void run()
          System.out.println("VM is closing down");
     public static void main(String[] args) throws Exception
          if (args.length == 0)
               System.out.println("You must supply the name of the class to start with.");
               System.exit(1);
          Runtime.getRuntime().addShutdownHook(new Watch());
          try
               Class theClass = Class.forName(args[0]);
               Method theMethod = theClass.getDeclaredMethod("main", new Class[]{String[].class});
               String[] theNewArray = new String[args.length - 1];
               System.arraycopy(args, 1, theNewArray, 0, theNewArray.length);
               System.out.println("Starting program with class "+args[0]+"...");
               theMethod.invoke(null, new Object[]{theNewArray});
               System.out.println("Program is done running.");
          catch (ClassNotFoundException cnfe)
               System.out.println("No such class: '"+args[0]+"'");               
          catch (NoSuchMethodException nsme)
               System.out.println("The class "+args[0]+" has no main method.");
          catch (SecurityException se)
               System.out.println("Can't start: "+se.getMessage());
          catch (IllegalAccessException iae)
               System.out.println("Can't invoke main method in class "+args[0]+": "+iae.getMessage());
          catch (Exception ite)
               System.out.println("Exception occurred when running class "+args[0]+": "+ite.getMessage());
}You can easily just swap those System.out's for something else.
However, if you mean watching the process from outside the VM, then you need something else, I suppose.
/F

Similar Messages

  • Update JVM for Sun Java Application Server8

    Hi:
    I am wondering how do I update the JVM for an already installed Sun Java application Server 8. Does any one know how to do this? Thanks

    user4877326 wrote:
    Hi Experts,
    Need some good links and documentataion for "Sun Java Application Server". When I am making a serch for this I am getting links to Glassfish.
    So please help on the documentation for Sun Java Application Server .
    Regards.This is because Glassfish is the same product as Sun Java Application Server in that regard.
    The versioning goes as follows:
    Kiva Enterprise Server 1.x
    Kiva Application Server 2.x
    Netscape Application Server 4.x
    NetDynamics 5.x
    SunOne/iPlanet Application Server 6.x (merger of NAS4 and ND5)
    Sun Java Application Server 7.x = SunONE/iPlanet Application Server 7.x
    Sun Java Application Server 8.x = Java Enterprise Server Application Server 8.x
    Sun Java Application Server 9.x ~= Glassfish 2.x
    Glassfish 3.x
    Clear now? :)

  • How to create a .exe file for a java application

    Hi, I want to create a .exe file for a java application I am developing so that I can schedule it to run at a particular time using Windows Scheduler on WinNT. Is there any way to accomplish this? Or is there any other way in which a Java application can be scheduled to run at a particular time on Windows everyday?

    Create a .bat file and run that. Just have, in the .bat file:
    java YourClassName Alternatively, you can use javaw YourClassName (without *.bat, just put it into Windows Scheduler like suggested above).
    using javaw won't pop up any window...

  • Using oracle personal for developing java application?

    Can I use Oracle 9i Personal Edition for developing Java applications? Does it provide a JDBC Type 4 driver?
    Thanks a lot.
    [email protected]

    SIR I WANT TO UPLOAD MY DEVELOPER FORMS BY USING ORACLE 8I SERVER?
    CAN U TELL ME THE PROCEDURE IN DETAIL?
    I WILL BE THANKFUL TO U
    MY EMAIL ADDRESS IS [email protected]

  • SWC and Unit for PI 7.0 for a Java application

    i want to integrate my Java application with XI.
    In SLD what should i mention the SWC and Unit for PI 7.0 for a Java application to be integrated????

    If your Java application is not provided by SAP, you create a new product and software component for this in SLD.
    Regards
    Stefan

  • Installer for JAVA application and JVM

    Hi all,
    I want to install a java application(server side). I used free version of InstallAnywhere to do this before. But since my installer may need more complicated operations, like search the registery and detect if they have installed the JVM and Tomcat. if not, suggest them to install, etc. My company do not have the enterprise version of InstallAnywhere, but the InstallShields.
    I am not sure which tool I should use for such installer, InstallShield or InstallAnywhere/ or any other suggestions?
    jing

    I find this link as a good source to know what programs there are for a given tool:
    http://sys-con.com/java/readerschoice2002/
    Click on the "Best Java Installation Tool" link, and check if any of those programs can do what you need.
    InstallShield and InstallAnywhere seems to be the most used programs.

  • Mechanism for Monitoring Application and Feedback

    Hi All,
    Is there a way to report the errors happen on user sites?
    We built the applications, tested them then deployed them, but we have no mechanism to monitor/ watch how these websites being used on the customer/user side.
    I was wondering if this something can be implemented on page level or application level to send feedback on any error or unexpected issue raises when users using the websites?
    thanks,
    Fadi.

    Hi,
    This may help you at start
    http://www.yocoya.com/pls/apex/f?p=YOCOYA:PAGER:0:::::
    br, Jari

  • Specifying a process name for a java application

    Hi,
    we run multiple java applications on our Windows 2003 server. It is diffucult to monitor these processes as they all appear as "java.exe" in the Windows Task Manager > Processes.
    Is there a way to specify a name for such a process? My colleague has suggested creating a copy of java.exe for each process, and then renaming the executable to reflect the name of the application it is starting. I think this method is not very flexible.
    Thank you for your suggestions in advance.

    Is there a way to specify a name for such a process?
    My colleague has suggested creating a copy of
    java.exe for each process, and then renaming the
    executable to reflect the name of the application it
    is starting. I think this method is not very
    flexible.That is the easiest though.
    If you don't like it then I think (as a guess only) that the following is possible.
    1. Create your own java launcher. As long as you don't distribute it you can start with the java source code for this.
    2. Find the Windows API that allows you to change the application name on start up.
    3. Modify the launcher to do this via a command line option.
    Of course there might not be any such API.

  • Creating Packages and Namespace for Webdynpro Java applications in NWDS

    Hi Experts,
    I am working on a stand alone application and using NWDS for the same. This application consist of some Webdynpro Java apps, Dictionary perspective DC's and BPM applications.
    I need to create a package and name space for all the applications. I have read some documents on creating SC in SLD and using it in NWDI. But since I am working on NWDS i am not able to see the SC.
    May be I am not following a correct procedure. Can some one provide a basic document or can tell me steps in short that i need to follow, for Name space and package creation and how to use them in NWDS.
    I am working on CE7.1 ehp1.
    Regards
    Pranav

    HI,
    This blog expalins how to Setup and configure NWDI System land scape:
    /people/bhavana.gupta/blog/2007/01/23/installation-and-configuration-of-netweaver-development-infrastructure-was-64
    NWDI Post installation:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/419b479b-0801-0010-f8a1-c26208b4b209
    http://help.sap.com/saphelp_nw70/helpdata/en/44/60dc1943c2311ce10000000a155369/frameset.htm
    Complete NWDI Resources:
    NWDI Resources [original link is broken]
    Thanks
    SrinivaS

  • Appying theme for Webdynpro java application.

    Hi Friends,
    I have change the font size and the content area of my WebDynpro java application which is a Standard Business package.
    I have already applied the theme in the visual admin,but when I make the changes to the theme it does not reflect on the application part.
    Please also let me know which specific theme values are to be changed.
    Request for all your inputs and solutions.
    Thanks,
    Shyam

    iViews used for application integration have a property called (technical name: LAF_Switch) like Send portal theme. This parameter defines if the portal will send to portal's style sheet definition. If so, the WDJ application will decide on some rules if or not to use the portal theme.
    [The SAP Note 1000889|https://service.sap.com/sap/support/notes/1000889] explains how a WD application decides whether to apply the portal theme or not. The note also gives you some hints to find out why the portal theme isn't getting applied.
    br,
    Tobias

  • Iview Template missing for Webdynpro-Java application

    Hi All,
                I wanted to create an iview out of my webdynpro component . I followed
    the steps given in  the following document ---
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9
       But unfortunately i couldn't find any template to create iview from webdynpro-java
    application . Can any one help me out ? Is there any customization for the same or
    this feature is not available for CE7.1--Sneak Preview version ? Any suggestion will
    be of great help to me.
    Thanks and Regards
    Ashis

    Hi Ashis,
    please refer to thread
    Has anybody created Iview from "Webdynpro Java" component in CE7.1 ?
    and by the way...there is a portal included under ../irj
    greetings jens

  • Template missing for webdynpro-java application  in Iview Creation

    Hi All,
    I wanted to create an iview out of my webdynpro component . I followed
    the steps given in the following document ---
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9
    But unfortunately i couldn't find any template to create iview from webdynpro-java
    application . Can any one help me out ? Is there any customization for the same or
    this feature is not available for CE7.1--Sneak Preview version ? Any suggestion will
    be of great help to me.
    Thanks and Regards
    Ashis

    Hi,
    Did u deployed ur webdynpro application into portal. If not, u cant to create iview based on ur component..
    Regards,
    Senthil K.

  • Ideas for deploying Java Applications to the Web?

    I am developing a java application which will be distributed via cd and the Web. My first idea was to create the application for cd, then modify it with applets to be deployed on the web. Does anyone else have any better suggestions?

    link to Java Web Start:
    http://java.sun.com/products/javawebstart/index.html
    tobias

  • How to create a set up program for my Java application

    Can some one please tell how to create a Setup for my Java Application

    Thanks for your reply.
    But still if you could have answered my query it would have been of a little more help for me, as I am quite new to any of these kinds of forum.
    Still thanks a lot for the reply.

  • For standalone java applications Applet is better or Frame is better?

    Hi Every body,
    Iam new to java standalone application developement.As per my knowledge both Applet aswell as Frame concept can be used to develop java
    standalone applications, if Iam right. My application need menus, drop down menus and it also need to connect to backend database.So which is better?
    So please some body guide me.
    Thanks in Advance
    Basavaraj M

    A JFrame not a frame will be most apropriate because that just what it supposed to be used for but u can consider a JApplet if u want to incorporate it into a web application.
    Sq2000

Maybe you are looking for