Autorun Java programms at specific time on windows [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm interested, is there any good method for running java programms (for example tests) at any specific time on Windows?
Just can't find anything good as of now.

You can either:
Schedule java programs externally
For example via Windows Task Scheduler, windows version of crontab, etc. The scheduler invokes a script which runs your java program.
Schedule java programs inside the jvm
For example quartz scheduler. Your java program is running all the time, and it "wakes up" to perform specific actions.
Integrate into a specific tool
Since you mention running tests you could configure them to run in Jenkins.

Related

Java not running on Windows server 2019 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm on this for a really long time. I need to have JRE 6 running on a new nonactivated Windows server 2019 essentials to be able to use a very old remote controller for some servers (old IBM & DELL racks).
No matter what version of java I install, it's just not running. I don't see it in the bottom right corner or in the running services. I know it seems very basic but I couldn't find a solution online.
Am I missing something? All I could find online is suggestions to add java to the environment variables but that is for a different issue. I tried it desperately but of course it didn't solve the problem.
Java, or more precisely the Java Virtual Machine (JVM), is not something that runs in the background. JVM is used to start specific applications. How the java.exe or similar executable will be resolved and invoked will depend on the specific application.
What you usually see in the Windows task tray area is a the Java update checker (Jucheck.exe). Whether or not this service is present will depend on selected installation options. It also might be that a very old Java 6 simply does not ship it.

Is there a way to run C++ and Java files with limited privileges? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have to run other people's compiled code on my Ubuntu server and I am worried that the source code is potentially harmful (System privileges, deletes files, that sort of thing). Is it possible to limit the things they are allowed to do from the terminal?
You can run Java programs under a SecurityManager which can allow or block different kinds of operations, regardless of which user the program is being run by.
What you need is sandboxing, your question a slightly broad, anyway:
You can use chroot to limit the view of the system to a restricted portion of the filesystem. This is light sandboxing. chroot command is available on many Unixes.
On OSX you have a sandbox-exec command that can be used to defines more precisely the privileges of the process.
On Linux you have a equivalent called AppArmor which also use privileges specification for your processes.
Limit their privileges; if you run a Java program as root, than it will have root privileges. If you run a program and have no privileges, the program will have no privileges.

How to allow Eclipse to use more CPU resources [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am working on Traveling Salesman Problem algorithm. When I execute the program it takes 3-4 hours to finish (not a big surprise for TSP). However, my Task manager tells that CPU is used only by 5% and ram by 27%. Is it possible to add more CPU resource for program execution, without modifying the code (I am not allowed to modify it)?
When you run the java program out of eclipse, it runs as an application on its own and not inside eclipse. There is no way to limit or allow more resources inside java. The only way to do it is:
From a Virtual Machine
When your code can utilise only a limited number of cores and you run it on a multi core machine, in this case modifying the code would be able to utilise more resources.
Since for you none of the above apply - no it's not possible for you.

Block remote access by Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I can connect to the Linux server i have using Putty(i have got IP, username and password). I have got java program in there, started by bat file. I would like to break existing connection and block future connections by putty, after starting the java program. Any idea if thats even possible?
You could edit your script to run the Java program with nohup to make sure the process keeps running after you log out and then kill the ssh daemon after it's been started (man page for nohup).
I don't know of a way of doing this programatically in Java, at least not in a platform independent way.

Java from /etc/rc.local [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Is it possible to (safely) start a java program from /etc/rc.local? I'm using Ubuntu Nov. 2011 (Why should I learn what #s the months are?).
If it helps (and can improve specificity), I'm running Minecraft 1.2.5 Bukkit Server, and yes, I have a script preprepared that sets up every thing to start the server (RAM, nogui, set working dir, etc).
Yes you can, try to look at this answer for a generic Java process:
Best way to daemonize Java application on Linux
Then specifically for Minecraft you can read this tutorial, and in particular this chapter.
Yes, you can.
Another approach is to create your own upstart script in /etc/init.d/. Take a look at /etc/init.d/skeleton and if it does make sense, make a copy of it and modify to suit your needs.

Categories

Resources