Ergh... relative newbie...
Hi all! I've been tinkering around with Java for awhile now, more to get a sense of its overall way of doing things. I'm not doing anything graphical or anything -- just straight-up algorithms, data structures, and so forth.
So, I've been wondering about a few things. I'd like to be able to execute programs, but I'd like the execution to be terminated upon any of the following two occurrences:
1) The program doesn't terminate within thirty seconds
2) The program takes up a given limit of memory (say, 1MB)
Basically, I'm trying to make it so that if someone executes a program on my machine remotely, it won't bring down the machine.
Is there an easy way to do this? Is there some sort of wrapper functionality? The java command line arguments don't seem to give me what I want.
Any help appreciated!
So, I've been wondering about a few things. I'd like to be able to execute programs, but I'd like the execution to be terminated upon any of the following two occurrences:
1) The program doesn't terminate within thirty seconds
2) The program takes up a given limit of memory (say, 1MB)
Basically, I'm trying to make it so that if someone executes a program on my machine remotely, it won't bring down the machine.
Is there an easy way to do this? Is there some sort of wrapper functionality? The java command line arguments don't seem to give me what I want.
Any help appreciated!
