File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run my application in background

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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`
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://faq.javaranch.com/java/EaseUp
Please do not post your questions as URGENT
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 806
Java MySQL Database Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 806
Java MySQL Database Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Maneesh. Thanks a lot.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic