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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:10:34+00:00 2026-05-31T05:10:34+00:00

Situation : I have jar file on server PC (PC act as server), a.jar

  • 0

Situation :

I have jar file on server PC (PC act as server), a.jar, which will be running infinite loop to listen for TCPIP connection from client PC. When connection has been made, client PC can send a zip file to server PC, a.jar will unzip it and execute a script with that zip, which will start another full screen display java file, b.jar.

a.jar will also trying to run b.jar during bootup, if b.jar already exist.


Approach 1:

I wrote a script in /etc/init.d/ to start a.jar, as it’s infinite loop, the system hang forever during bootup (in terminal screen, can’t even get into GUI). I have to boot into single user mode to remove that script in order to boot up normally.


Approach 2:

When I changed the script to run a.jar as a daemon, it runs normally, listen for connection, I can connect to the server pc and send zip file.

Problem:

  1. b.jar is not executed even when execution permission and files are all correctly set.
  2. After I sent a zip file, b.jar is executed (because it is connected to a device and that device is activated). But the full screen display is not shown like it did when executed via terminal.

Reasons of doing so

It may seems a bit complicated, but because b.jar will be constantly updated and it has to be auto start when after update, thus I use a.jar to unzip and execute new version fo b.jar.

And b.jar is required to run as root as it needs to access serial port.

(Server pc is required to be automated, thus it is required to start b.jar during startup and remotely controlled)


Question

May I know is there any better way of doing this? Or what did I do wrong? Can someone show me a better script to start it during startup?

  • 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-31T05:10:35+00:00Added an answer on May 31, 2026 at 5:10 am

    Approach 1 should work but you must run the java process in the background by adding & to the command.

    But there are better solutions to run java apps as a deamon. The above can be considered as a quick fix.

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

Sidebar

Related Questions

I have situation in which I read a record from a database. And if
I have the following situation: I have a certain function that runs a loop
I have situation, where running a query that filters by an indexed column in
I have a property file which is inside a default package and the class
I have the following situation: taglib.jar : A custom JSP taglib packaged as a
I have a game application that I will be running in a web browser
[Situation] I have a custom item control which I add to a stack panel
Situation:- I have created a installation setup(local) that returns a URL eg:- ved.test.com which
Situation: I have website which calls WCF Service and i'm trying to understand it..
Situation: Have a UITextField instance which is a subview of a UIScrollView. Need: Screen

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.