Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > updating a programs code prior to running

Reply
Thread Tools

updating a programs code prior to running

 
 
steve
Guest
Posts: n/a
 
      05-29-2004
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

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      05-29-2004
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
 
Reply With Quote
 
 
 
 
steve
Guest
Posts: n/a
 
      05-30-2004
On Sat, 29 May 2004 18:00:43 +0800, Andrew Thompson wrote
(in article <(E-Mail Removed)>):

> 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.

 
Reply With Quote
 
Michael Borgwardt
Guest
Posts: n/a
 
      05-30-2004
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rake dependencies unknown prior to running tasks Joe Wölfel Ruby 12 09-29-2008 04:19 PM
Updating JTable Atomically - block data changes while updating. news.rcn.com Java 2 12-10-2007 11:49 AM
Can I have a glance on the page code prior it is compiled to DLL? Pavils Jurjans ASP .Net 0 04-01-2004 11:07 AM
Update a DIV prior to long running section Richard A. DeVenezia Javascript 1 02-25-2004 10:22 PM
How to Verify Programs Running with Installed Programs? Edge Computer Information 9 01-19-2004 11:35 PM



Advertisments