• Post Reply Bookmark Topic Watch Topic
  • New Topic

Write Java app not visible in task manager?  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome everyone,
I am looking for some answers, and have hope you will help me.

I am a hobbyist non-programmer with some experience in Python 3, and i want to rewrite some apps into Java. But found some questions for which I can not find an answer. I don't want code only answers For now i'm working on Windows7 OS app. And now questions:

1) Is it possible to write Java app not visible in task manager. If yes what tools i should use.
2) Can my app work in background and when some requirements are met pops up some javafx object (label, entry and a button)
3) And last question is about tools. How easily find what i need in Java API? My app needs few things (check connection to internet, scrapp some data from internet, timer) and i am not sure what i should use


With best regards,
PM
 
Rancher
Posts: 2943
32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

  Can my app work in background and when some requirements are met pops up some


I think it can.  If it does not call setVisible for the components, it will run without a window.   I don't know what you mean by "in background".

java wrote:not visible in task manager


I don't know how a program can run without the task manager knowing about it.  Maybe someone with more knowledge can comment on that.
 
Sheriff
Posts: 23486
46
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Norm Radder wrote:

java wrote:not visible in task manager


I don't know how a program can run without the task manager knowing about it.  Maybe someone with more knowledge can comment on that.



I don't know how to do that either. I can't think of any reason to do it, unless you're trying to write some kind of malware. Discussions of how to write malware are likely to be deleted here, but if you had some legitimate reason for hiding processes from administrators then that could be interesting to discuss.
 
Peter Maze
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Clapham wrote:

Norm Radder wrote:

java wrote:not visible in task manager


I can't think of any reason to do it, unless you're trying to write some kind of malware. Discussions of how to write malware are likely to be deleted here, but if you had some legitimate reason for hiding processes from administrators then that could be interesting to discuss.



Well, i am trying to write app for my son PC. He is smart 12 yr and he knows how kill process in task manager so I am trying to find a way to hide my work

 
Sheriff
Posts: 4378
280
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiding it may not be the only solution here. Assuming your son does not have an administrator user account on the PC then you can start the process as a different user that your son does not have access to then the OS will prevent him from killing the process because it does not belong to him.
 
Peter Maze
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Cooke wrote:Hiding it may not be the only solution here. Assuming your son does not have an administrator user account on the PC



What if he have admin account? Is it still possible to use other user account?
 
Paul Clapham
Sheriff
Posts: 23486
46
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Peter Maze wrote:What if he have admin account? Is it still possible to use other user account?



No. But why does it matter whether anybody can run the app and then kill it via the task manager?
 
Rancher
Posts: 3441
39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Clapham wrote:

Peter Maze wrote:What if he have admin account? Is it still possible to use other user account?



No. But why does it matter whether anybody can run the app and then kill it via the task manager?



Well, I have pondered this to track usage for one of my kids who had taken the piss with his PC time a couple of years ago.
So I suppose there's that?

But with Win10 you can do that anyway, if you've set things up correctly.
 
Peter Maze
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My son plays too much computer games and im making app turning off computer when some requirements are met. I have wrote version 1.0 in python3 but young mind found a way how cheat my app. So now its my turn. And I decided to learn something new. Thats why im trying Java
 
Dave Tolls
Rancher
Posts: 3441
39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If he's got admin privileges then there's really nothing you can do that he can't reverse.

If he doesn't have admin privileges then you can put usage limits on it in Windows without having to write an app.
 
Saloon Keeper
Posts: 4413
108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A custom Java app is probably not a good approach, especially if he's already defeated another programmatic attempt of yours. If he has an admin account, I think most approaches are doomed, since they can be undone with admin rights.

A quick search found https://www.howtogeek.com/250224/how-to-set-time-limits-for-a-regular-account-in-windows-10/ and http://www.ilovefreesoftware.com/19/featured/5-free-software-to-limit-computer-time.html. If you search for "parental control windows" or some such phrase you're bound to find more information.
 
Peter Maze
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:If you search for "parental control windows" or some such phrase you're bound to find more information.



Thanks for tips, but i want do this by myself. In that way im learning new things ;) Few years ago i woke up with idea, that i can write some working code. And you know what? I really learned a bit and wrote app to learning ortography for my son. And i found 2 people willing to buy this app. It was great kick to learn more. I didnt earn much becouse i was suprised somebody might want my work and it wasnt my target. Its still isnt. Im close to 40 and it is great challenge for me. To know how write working apps. Many things i dont know but this wont stop me
 
Bartender
Posts: 19353
86
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's see if I can address these concerns in some sort of logical order.

Firstly, a Java app can definitely run completely invisible (no desktop windows, etc. as well as being able to interact with the OS GUI - including the tool tray. Most people who do Java GUI apps use either Swing (which is part of the core Java) or SWT (which isn't, but is used by popular apps such as the Eclipse IDE). You can launch a Java app from a desktop icon, as a Windows service, or via shell command line.

Secondly, there are a lot of compelling reasons why you wouldn't let kids run with administrative privileges. Most famously because you've go some sort of Internet censor intended to keep them off forbidden web sites and/or limit usage to certain times of day. So running an app under an ordinary user account (login id/password) is a good idea. You set up new accounts with the Windows Control Panel User Manager.

Thirdly, since trying to keep someone from killing a process (especially if they have admin rights) is never guaranteed to be 100% successful, you might want to consider activity logging. It won't keep the app from being killed, but it can track when it's doing things - and by implication when it's not. Use the Windows event recording facility. If your kid can figure out how to manipulate Windows event logs, forget about managing him/her and enroll them in the nearest software development sweatshop. Because, alas, we have lots of "professional developers" who'd find that difficult.

On the other end of the spectrum, since Java apps run under a JVM, a dumb kid would be challenged by the Task Manager, since the app name won't be the name of the program, it will be "java".

Finally, while Java has a comprehensive built-in function library, OS-specific stuff isn't part of it (since Java is supposed to be OS-neutral). However there are plenty of repositories that can provide useful OS interface functions for things like logging via Windows Event Manager. I can not, alas, recommend any of them since I only run Windows once a year to run Turbo-Tax (the one app that doesn't have a good Linux equivalent) and thus don't do much on a day-to-day basis with that platform anymore. So Google is your friend.
 
Marshal
Posts: 5621
387
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about building the trust with kid and motivating him accordingly whenever he follows the contract between you and him?

In some worse cases you could both agree on some penalty hours/days when computer usage isn't permitted by applying some physical factors by taking out power supply and taking with you in a car, just in case weak moment kicks in.

Or (preferable), how about if you both sit down and build such software and let it be son's and dad's ambitious boys project which you possibly could sell to other parents, so the son could even earn some coins.

After all, I guess kid is learning a lot already and is smart enough if he challenges you. Apparently this is where the world is shifting now --> IT. So these skills won't vanish.

Good luck on whatever goal you are seeking for.
 
Peter Maze
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:how about if you both sit down and build such software and let it be son's and dad's ambitious boys project



We started learning Python3 and i think he likes it. But i dont have much time for him and he choses games. I wish have more free time - for him and for me.
 
Peter Maze
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway, thank you very much. I will come back many times to this answer. I think i was looking for it. Thank you again
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!