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.
Related
Closed. This question is not about programming or software development. 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 5 days ago.
Improve this question
I don't code often but I wanted to make a Minecraft plugin that will run the /save-all command every 5 minutes. I have the rest set up I was just wondering how can i execute this command? thanks.
As I said in the description, I don't code often and i don't know what to use.
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
My question is how can I forward a port automatically in a server.
If anyone knows the game "Minecraft" the user have an option to create a server so anyone can join.
Now what I didn't get is how the server automatically forward the port.
Currently i do not have any code to show.
Thanks In advance.
What minecraft does is creates a local port that is listening for connections. I think what you are asking though is how does the other user get through your router to your server. The answer to that is it uses UPnP to tell your router what ports to forward from the wider Internet.
If you want to implement something similar, look for UPnP libraries for Java or whatever language you are writing in.
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 have registered to the free AWS plan, and I wish to run a pure java server code I have written on this machine, so I will be able to take this server's IP and use it to connect with my client.
After some searching in AWS I have found many products and features, but I still don't understand how to perform this simple task.
Create a new EC2 Instance SSH into it, install java and prerequisites.
Ensure -
Your Security Group is opened for port 22 for external internet - 0.0.0.0/0 ( or at least your IP )
Use t2.micro instance size - only that is covered under the free tier
Remember to save / store your keypair safely
Check the below links
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance_linux.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-connect-to-instance-linux.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-add-volume-to-instance.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-clean-up-your-instance.html
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.
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.