aspose file tools*
The moose likes Java in General and the fly likes How to run my application in background Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to run my application in background" Watch "How to run my application in background" New topic
Author

How to run my application in background

chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Hi everybody, I am Chaitanya, I am working on a mouse control project. Let me explain you in detail.

I have a program which listens an event on the serial port. Using a device I will send some data to the serial port. When an event occurs the mouse moves in according to the received data. I have completed up to this: listening the data on serial port, moving the mouse according to the data. For this I used comm api and Robot class.

Now what my problem is, the entire program must run in background. There must not be any windows visible to kill this program. A process must be running in the RAM. This program will be running continuously, but it must run in background.

Can anybody please help me.
Thank you all in advance`


Love all, trust a few, do wrong to none.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

http://faq.javaranch.com/java/EaseUp
Please do not post your questions as URGENT


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Hi Maneesh, sorry for that, I thought somebody would shed light on it quickly. Do you know how to do this? Can you please help me?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Robot class and mouse moves without a UI? Are you sure you have the requirement straight?

The java command runs with a console window. The javaw command does not popup the console window. You can also google for running java application as a service.
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Maneesh Godbole wrote:Robot class and mouse moves without a UI? Are you sure you have the requirement straight?

The java command runs with a console window. The javaw command does not popup the console window. You can also google for running java application as a service.


Are you saying that I can run my program using javaw without a cmd prompt?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

I am not. Sun says so
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html

From the above link
The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.
chaitanya karthikk
Ranch Hand

Joined: Sep 15, 2009
Posts: 806

Thank you Maneesh. Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run my application in background