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

  • Home
  • SEARCH
  • 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 8820247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:33:44+00:00 2026-06-14T05:33:44+00:00

So, this is something that’s been on my mind for a while now. How

  • 0

So, this is something that’s been on my mind for a while now. How can you take a program, and make it ‘auto-update’. So let’s say an outer shell that checks Myserver.com/myProg/updates.xml (or some other resource) and checks to make sure version numbers are the same. Once I do that, how do I handle updating a program?

Let’s say that my program was a simple main only class and the only output is:

System.out.println(“Hello World”); On the update it turns into System.out.println(“Hello Java”);

How could I get this change into place at runtime?

Note: JNLP is not applicable for this, due to signing issues that I don’t care to expand upon.

  • 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-14T05:33:45+00:00Added an answer on June 14, 2026 at 5:33 am

    You need 2 "applications":

    1. A minimal bootstrap application that checks for updates and runs the main application;
    2. The main application.

    The user always launches the bootstrap application, never the main application (in fact the user doesn’t know about the bootstrap application). This is by far the most common pattern I’ve seen.

    If you want to do auto-updates at runtime, you’ll need to use OSGI as javabeats mentioned. But only take this path if you really need this. I’ve never used OSGI, but I can imagine that it’s non-trivial.

    Edit

    I don’t have a concrete example, but I can imagine that

    1. the bootstrap downloads some jar and configuration files
    2. One of the configuration files contains the files required in the classpath (this could be done automatically by your app, if it picks all the jar files that are inside a given folder).
    3. With the previous list, create a new classloader (see example here) to add the jar files to the classpath.
    4. Run the main class of the application in the new classloader.

    Sorry, I can’t give you a more detailed answer without writing the code myself, but I charge for that :).

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

Sidebar

Related Questions

This is something that's been bugging me with PHP for a while now and
This is something that's been bugging me for many years: why most online services
this is something that i don't want to program, but i was looking for
So this is something that I have not been able to find any documentation
Is this something that can be used for highly secure information or should it
Can someone explain why everything in WPF is blurry? Is this something that can
Is this something that can be done more efficiently than with a vertex array?
This is something that's I've wanted to know recently, mostly out of curiousity. I'm
This is something that I don't see much discussed. I'm developing a software that
This is something that I solved using reflection, but would like to see how

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.