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 6644373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:09:36+00:00 2026-05-26T00:09:36+00:00

I have a java program acting as a Network server. Thanks the the utility

  • 0

I have a java program acting as a Network server. Thanks the the utility update-rc.d I have installed a service on a Debian / Unix server in order to have it running all the time without being connected during a SSH session.

Because my program is in java bytecode, and not a native unix executable, I have used the following tutorial to make it work as a daemon: java as a daemon service

The problem is that I don’t see the output of the program any more. I need to see the output of the program, as it shows a stack trace when an exception happens. How to redirect standard and error output streams to a log file ?

Alternative question: How to run the java program and have it continusly running even when I log out from SSH ?

  • 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-05-26T00:09:36+00:00Added an answer on May 26, 2026 at 12:09 am

    You can wrap the app launch command into a shell script and redirect output there:

    /usr/bin/java -jar app.jar >> /var/log/app/app.log 2>&1
    

    But I’d recommend to use some logging framework to gain more control over log files. Something like slf4j with logback or any other backend.

    Alternative question: How to run the java program and have it continusly running even when I log out from SSH ?

    You can do this with screen:

    screen java -jar app.jar ...
    

    Then after SSH login run

    screen -r
    

    to resume screen session.

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

Sidebar

Related Questions

I have a java program running on a linux server. I need to send
We have a Java program run as root on Unix, that therefore can read
I have a stateless session bean and a standalone-java-program acting as a client. The
I have a Java program that opens a socket connection to a server that
I have a java program which has a server-socket listening infinitely. In case of
I have a Java program/thread that I want to deploy into an Application Server
I have a Java program (running in JDK 1.5 for now) which is getting
I have a java program in a UNIX environment which requires line buffered data
I have a Java program and I need to create a Windows Service from
I have a Java program that I start like this on Windows Server 2008.

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.