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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:08:36+00:00 2026-05-18T05:08:36+00:00

I have a jar that executes endlessly because i create a thread and the

  • 0

I have a jar that executes endlessly because i create a thread and the i join() the edt with this thread.
If i run this jar with double click on lets say windows a javaw process is created that runs forever and i can continue working which is what i want.
Now if i try to run the jar from cmd with java -jar myJar.jar the execution halts right there.
What i want is to continue cmd execution after running the jar.

*Note:*I currently trying to do this in linux console which i access with putty.So please consider this in your answer

Thank you

  • 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-18T05:08:36+00:00Added an answer on May 18, 2026 at 5:08 am

    java -jar myJar.jar &

    The & puts the command into the background and allows you to do other things from the shell prompt.

    This is very basic UNIX/Linux shell stuff. I suggest that you find / read an online tutorial or a book on the shell you are using (e.g. bash). It will make your life a lot easier. Or if you are a masochist, read man bash.

    I currently trying to do this in linux console which i access with putty.

    Use of putty is actually not relevant.

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

Sidebar

Related Questions

If I have a jar that I need to run using java -jar FOO.jar
I have a jar file that runs this code: public class InputOutput { /**
I have a third party jar that connects to a server and executes command
I have a working exec in php that executes a Jar file and returns
I have a jar file that is required to be run on the jsp
I have a jar file that I would like to execute using PHP, but
I have a jar file that I want to put in the shared lib
I have an executable jar Client.jar that requires jndi.properties file. Since the jndi properties
I have a 3rd party JAR that I have converted to an OSGI bundle
I have a java JAR file that is triggered by a SQL server job.

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.