Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Application Updates

  1. #1
    Junior Member
    Join Date
    Jan 2018
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Application Updates

    Hello everyone.

    I am new to java, I have used java before to code hello worlds, calculators and some university projects.
    The thing is that, right now, i am coding my first real project and i have a few questions that may sound very noobish but I could not find information about it on the internet, maybe because i am not using the correct words to search for them.
    The thing is that, once my project is done, I want to earn my customers loyalty by updating the application as it evolves.

    Here comes my question, I really have never been in any deployment process, so, considering that i am using javaDB, if i replace an app on a customer computer with the new one, will I erase their data recorded on database during the process? If so, is there any practice or tool that can help me to solve this?

    I am using Java Swing by the way.

    Thanks!

  2. #2
    Member
    Join Date
    Dec 2013
    Location
    Honolulu
    Posts
    83
    Thanks
    1
    Thanked 4 Times in 2 Posts

    Default Re: Application Updates

    Same thought I had before. Java is a write once, run anywhere. Can be wriiten on any platform and one that supports JVM. It is cross platform and runs on any device. Robust programming language and very much a programmers delight if you're an expert on it.

  3. #3
    Junior Member
    Join Date
    Jan 2018
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Application Updates

    Hey PlanetHollywood, do you know how to solve my issue? thanks in advance

  4. #4
    Super Moderator pbrockway2's Avatar
    Join Date
    Jan 2012
    Posts
    987
    Thanks
    6
    Thanked 206 Times in 182 Posts

    Default Re: Application Updates

    Warning: software I write is for my own usage, but these are my thoughts...

    JavaDB stores data in a folder that is referenced as a url by your program. It is quite distinct from the .jar file that contains your application, so you can simply replace that .jar with your updated version and (provided sufficient testing!) everything is sweet. How you go about replacing the old .jar with the new one is a separate question.

    * put it on a web site and let users know it is available. Call me old fashioned, but I like this approach. Your users may be in corporate or other networked environments where deployment of new software just isn't something they are able or permitted to do. Or your users may (like me) want to maintain control of what software runs on their computer, and be assured of and in control of the integrity of their data.
    * use Java Webstart to deploy updates. (There's a link at the bottom for more developer oriented information, including Oracle's Tutorial example.)
    * use installation software (Wikipedia) to automate the business of finding and replacing the old .jar with the new one.

    Where things start to get interesting is if you deliberately want to change the content or format of the database itself. (Eg you want to add a new column in some table which you reference in the updated software. Or if the javadb version has changed.) In the latter case - where javadb has changed - I think there is an "upgrade" flag you can use as part of the data url. If the data format has changed I think you have to do this manually: eg on first use, create a new table with the additional column, copy the data from the old table to the new one supplying some default for the new column, delete the old table and rename the new one. [Edit: or use sql to alter the table. On reflection this makes more sense.]
    Last edited by pbrockway2; January 20th, 2018 at 04:18 PM. Reason: 2nd thoughts

  5. The Following User Says Thank You to pbrockway2 For This Useful Post:

    Unl1m1t3d (January 20th, 2018)

Similar Threads

  1. Limit Updates
    By Aigyptus in forum Java Theory & Questions
    Replies: 2
    Last Post: August 17th, 2014, 10:54 AM
  2. Replies: 1
    Last Post: July 12th, 2014, 04:19 AM
  3. what are the algorithms for java application silent updates?
    By appebel in forum Member Introductions
    Replies: 0
    Last Post: July 12th, 2014, 02:56 AM
  4. Variable updates after loop
    By tecno40 in forum Loops & Control Statements
    Replies: 1
    Last Post: November 9th, 2011, 05:34 AM
  5. [SOLVED] Trojans with last few updates of NetBeans
    By Melawe in forum Java IDEs
    Replies: 11
    Last Post: May 22nd, 2010, 08:33 AM