Hello every1...

I am developing a project in JAVA..


Can I get any help..??

Even if I get an idea as to how I start off, will be QUITE helpful..

The applications that I am planning to monitor include :
2.Tomcat server

Please do help..!!!

If you don't even have any idea how to start, you don't really have a project. You have a name of a project.

If you don't have any idea what you want to accomplish, how do you expect anyone to help you accomplish it?

It sounds like you need to flesh out exactly what you want to do and then come back with some concrete questions that someone might actually be able to answer.

(And "every1" isn't a word - please read the forum faq and rules regarding proper English)

I am really sorry for the mistake...(every1)
Wont happen again..

I do know what is to be done but I am working with JAVA for the first time so finding it difficult to start off.

Got to implement Multithreading so as to include the monitoring of the Applications.

A main Thread of UI
3 threads for the 3 applications..

The 3 thread including 2 functions each:
1.First : to monitor the application and update the UI.
2.Second : to decide for the polling interval so that the thread executes again after a particular interval of time..

This is all what I have to do and I am facing problems in the same since I havent worked in JAVA before..

Hope I could get some help..

If you've never worked with Java before you should learn the language first and start with small, simple, things rather than immediately diving into the deep end of the pool like this.

Start with the basic tutorials from Sun, get yourself a good book like Head First Java, work through that, learn the technologies you want to "monitor" inside and out, and only after you've done all that (should take you a few years) you start thinking again about that monitoring program.

I have done all this before..

Implemented a host of programs..

But still facing problems..

I have tried implementing a part of wat my requirement is...

Can you just go through it and let me know if it is right??
plzzzz do help...


import java.io.*

public class Trial {
    static Thread threadJVM, threadTomcat, threadSite, threadMain;

    public static void main(String args[]) throws Exception {
        threadMain = new thread(new MyMain(),"Main Thread");

class MyMain implements Runnable {
    static long startTime = 0;

    public void run() {
        startTime = System.currentTimeMillis();

        Trial.threadJVM = new Thread(new RunnableA, "ThreadJVM");

        Trial.threadTomcat = new Thread(new RunnableB, "ThreadTomcat");

        Trial.threadSite = new Thread(new RunnableC, "ThreadSite");

    public static String time() {
        long time = (System.currentTimeMillis() - startTime)/1000 + 1000;
        return(time + "\t");

class RunnableA implements Runnable {

    public void run() {
        //Code for JVM monitoring

class RunnableB implements Runnable {
    public void run() {
        //Code for Tomcat monitoring

class RunnableC implements Runnable {
    public void run() {
        //Code for Site monitoring

Edited 3 Years Ago by mike_2000_17: Fixed formatting

I don't see any reason why you would need "threadMain". The monitoring threads can run just as well in a single main application/controller context. You certainly don't want those threads to be statics. They should be private members of whatever class is acting as the controller context of the application.

This question has already been answered. Start a new discussion instead.