updating a programs code prior to running

Discussion in 'Java' started by steve, May 29, 2004.

  1. steve

    steve Guest

    Hi,

    I have a program that started life as a simple application, I then added the
    ability for version checking.

    on OSX it was simple:
    1. version check
    2. download code updates with an extension ".new
    3. rename the old program files ".old"
    4. rename ".new" to current program.


    the interesting thing was that on OSX i could actually re-name the java .jar
    files i was running from inside the java file.

    but on windows It broke with " file in use"

    (quite why & how OSX allows files in use to be renamed is another matter)

    so i ended up writing a small loader class that did the downloading prior to
    launching the "dynamic" app

    the question is how do other people update the loader app, if it needs
    modification, or do all java apps suffer from this problem.

    I.E eclipse for example.

    thanks.

    steve
    steve, May 29, 2004
    #1
    1. Advertising

  2. On Sat, 29 May 2004 17:23:23 +0800, steve wrote:

    > I have a program that started life as a simple application, I then added the
    > ability for version checking.
    >
    > on OSX it was simple:
    > 1. version check
    > 2. download code updates with an extension ".new
    > 3. rename the old program files ".old"
    > 4. rename ".new" to current program.


    On every OS with since Java 1.3.1 it is simpler..
    <http://www.physci.org/codes/javafaq.jsp#jws>

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
    Andrew Thompson, May 29, 2004
    #2
    1. Advertising

  3. steve

    steve Guest

    On Sat, 29 May 2004 18:00:43 +0800, Andrew Thompson wrote
    (in article <>):

    > On Sat, 29 May 2004 17:23:23 +0800, steve wrote:
    >
    >> I have a program that started life as a simple application, I then added
    >> the
    >> ability for version checking.
    >>
    >> on OSX it was simple:
    >> 1. version check
    >> 2. download code updates with an extension ".new
    >> 3. rename the old program files ".old"
    >> 4. rename ".new" to current program.

    >
    > On every OS with since Java 1.3.1 it is simpler..
    > <http://www.physci.org/codes/javafaq.jsp#jws>
    >
    >


    webstart is not an option, otherwise i would have used it.
    steve, May 30, 2004
    #3
  4. steve wrote:
    > (quite why & how OSX allows files in use to be renamed is another matter)


    Unix filesystems use the concept of an "inode", which contains all information
    about a file (including the information necessary to access it) *except* its
    name and path. Directories contain (for each file) the name and a pointer to
    the inode. This allows a file to be renamed (only the directory entry is changed,
    not the file itself) while applications that are using it are not disturbed
    since they access it through the inode. It also allows the same physical file
    to appear at two or more places in the filesystem tree in different directories
    and/or under different names.
    Michael Borgwardt, May 30, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pavils Jurjans
    Replies:
    0
    Views:
    367
    Pavils Jurjans
    Apr 1, 2004
  2. Replies:
    12
    Views:
    1,620
    Dave Thompson
    Jan 10, 2005
  3. news.rcn.com
    Replies:
    2
    Views:
    1,108
    Roedy Green
    Dec 10, 2007
  4. Joe Wölfel
    Replies:
    12
    Views:
    201
    Joe Wölfel
    Sep 29, 2008
  5. Richard A. DeVenezia

    Update a DIV prior to long running section

    Richard A. DeVenezia, Feb 25, 2004, in forum: Javascript
    Replies:
    1
    Views:
    74
    Randy Webb
    Feb 25, 2004
Loading...

Share This Page