Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / July 2004

Tip: Looking for answers? Try searching our database.

How to write a java program which will work in background

Thread view: 
uv - 29 Jul 2004 08:55 GMT
Hi pals,
      How can I write a program which will run in background without
the knowledge of the user. I mean the program should not display
anything, even a DOS prompt or a GUI. For example the program should
keep track of whether user opens any .exe file. Then the program
should be running, but no sign of it. And it should save which file
was accessed.
       please help me in this.
Thomas Weidenfeller - 29 Jul 2004 09:36 GMT
> Hi pals,
>        How can I write a program which will run in background without
> the knowledge of the user.

Ui, you want to write a virus, spyware? ;-)

Fortunately Java is not well suited for this kind of system
"programming". Consider using another programming language. Or even
better, consider spending your time for better things than snooping data
and invading user's privacy.

/Thomas
KC Wong - 29 Jul 2004 10:10 GMT
>        How can I write a program which will run in background without
> the knowledge of the user. I mean the program should not display
> anything, even a DOS prompt or a GUI. For example the program should
> keep track of whether user opens any .exe file. Then the program
> should be running, but no sign of it. And it should save which file
> was accessed.

A Java application will keep runing as long as it still has some threads
alive, or the main method is not completed.

To avoid being seen, don't create any frames, and archive the classes into a
JAR, and specify the Main-Class attribute inside the manifest. By installing
the Java plug-in, it will create the file association of JAR files to javaw,
which executes the main class inside the JAR without a console. Google
"Executable Jar" for how to create that... for example,
http://www.captain.at/programming/java/executable-java-application.php is
one of the search results.

Of course user can change their file association and ruin the executable jar
method, but really how often does that happen? Many users don't even tidy up
their start menu and destop... and to work around that, you can always
create a shortcut to javaw with proper parameters for them.

Keeping track of user opening any .exe file, is the big problem. I don't
have any good (and clean) idea about it right now.
Antti S. Brax - 29 Jul 2004 12:55 GMT
uvdhanya@rediffmail.com wrote in comp.lang.java.gui:
> Hi pals,
>        How can I write a program which will run in background without
> the knowledge of the user. I mean the program should not display
> anything, even a DOS prompt or a GUI. For example the program should
> keep track of whether user opens any .exe file.

    You can't do this with Java. It is simply impossible. Use some
    other language instead.

Signature

Antti S. Brax                  Rullalautailu pitää lapset poissa ladulta
http://www.iki.fi/asb/         http://www.cs.helsinki.fi/u/abrax/hlb/
       "Disconnect this cable to shorten, re-connect to lengthen."
         -- Instructions on Logitech's USB mouse extension cord.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.