Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8985129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:15:51+00:00 2026-06-15T21:15:51+00:00

OPTIONS=java -Xms1024M -Xmx1024M -jar craftbukkit.jar PROCESS=server01 screen -dmS $PROCESS $OPTIONS nogui # Starting the

  • 0
OPTIONS="java -Xms1024M -Xmx1024M -jar craftbukkit.jar"
PROCESS=server01

screen -dmS $PROCESS $OPTIONS nogui             # Starting the application
screen -x $PROCESS -X stuff `printf "stop\r"`   # Closing the application
screen -x $PROCESS                              # Attaching to the terminal of the application

The application works fine at the start, however I get problems with stuff 'printf "stop/r"'
It seems not to work when I just start up, wait some time and then try to stop it with the command above. But the strange thing is, that if I did screen -x $PROCESS and detach (ctrl-A & ctrl-D) and then I use the Stop command it does work. So is there a way around to stuff printf without screen -x $PROCESS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:15:52+00:00Added an answer on June 15, 2026 at 9:15 pm

    Adding the argument -p 0 should fix it. Something like this:

    screen -x $PROCESS -p 0 -X stuff `printf "stop\r"`
    

    (From screen documentation: -p window Preselect the named window if it exists.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally, I'll start jetty (version 8) using this: java -jar -Xms1024m -Xmx1024m -server -XX:+UseConcMarkSweepGC
Please correct me if I am wrong. When running java [-options] -jar jarfile with
I set my java runtime options in Eclipse's Window > Prefs > Java >
I'm looking for Java rules engine options that will allow me to use the
I am learning Java and have been given these options: How can you implement
Is there any option to clear the console screen in Java as clrscr() in
In skydrive LiveConnect Api site they give options like javascript,java,c# and REST. It has
I'd like to add custom command-line options to my Java program. Here's an example:
Is it possible to build a Java web application which has a PHP front
I'm getting this warning while compling my code (with -Xlint options): receptor.java:286: warning: [unchecked]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.