Comments (6)
But how can we update the update4j, myapp-boot.jar, myapp.ini and myapp.exe in the installation folder (that are currently in use)?
update4j
The update4j file itself (currently) cannot be updated using this framework's features. The way to go would be to start the framework with a script or a set the classpath in a configuration file (as the case with javapackager
, in MyApp.cfg
that contains the classpath info) and when a new version is available download it with a newer version of these scripts/configuration pointing to the new file.
myapp-boot.jar
If you are using delegate mode, the philosophy is that you won't replace the existing files, instead you release a new delegate and increment the Delegate::version
. Ideally, you could append a version number to the boot jar to match the delegate version (myapp-boot-v1.jar
). If you're using modules, you must have a different module name from the old (since it doesn't really get replaced), so my.app.v1
should be ok.
myapp.ini
I would assume your ini file is texual, read by myapp.exe at app launch. In this case it doesn't get locked in any way.
myapp.exe
If you are on Windows (unclear, as the paths you gave point to Linux style, but exe isn't really Linux), there isn't any way you can update it. On Linux, files never get locked. Never!
On Linux it is safe to overwrite running executables, as the executable will still see the old version as long as it runs. But jar files aren't really executables but just zipped files read by the JVM, so overwriting them in a running instance is dangerous.
How can we work with relative instead of absolute paths in such a case?
Can you please elaborate your problem?
Do you mean that individual files in the config file are absolute and won't resolve against the base path?
from update4j.
Thanks, will look at using delegate instead of our custom bootstrap class.
Also good to know where the limitations are. Hopefully updating the update4j library is not something that is needed very often.
Regarding paths. My understanding is that I have to provide absolute paths to where update libraries should be installed. But what if I want them to be updated in the relative path to "current directory", which is where "myapp.exe" is located.
Currently updates will be installed to "basePath" of not declared as absolute in the config.
Can I perhaps rewrite the "basePath" in my delegate?
We plan to have one installer for windows and a generic for others.
from update4j.
from update4j.
Added a delegate with works nicely with booting from update4js default Bootstrap. Also found user.dir very useful. I assume there are more of these "built-in" properties?
Appreciate all your help!
from update4j.
from update4j.
Ah good to know that's how they get resolved. Didn't know user.dir was as widespread as user.home
from update4j.
Related Issues (20)
- Permission Issue: Default Bootstrap Archive Location HOT 9
- Updating app's JDK with update4j HOT 5
- Make update.zip path confgurable HOT 1
- Deletion of files not present in config HOT 8
- getOldFiles takes a long time (too long?) HOT 22
- Basic issue of understanding HOT 25
- Working in offline mode with --local and --syncLocal HOT 3
- Communication between bootstrap and business application HOT 4
- config.update does not download anything and just stop the programs HOT 2
- Headless Setup with NGINX Basic Auth HOT 13
- proposal HOT 1
- NoSuchFileException reserved/config when there is nothing to update HOT 3
- Demo App doesn't run on Windows 11 and Java 19 HOT 4
- Connect/read timeouts too short on URLConnection HOT 1
- Propagating business applications' exit code through Bootstrap HOT 5
- Error running an SWT application HOT 8
- Support multiple architectures HOT 19
- Exception when download files. HOT 2
- Relative path in basePath? HOT 3
- Size of file does not match size in configuration HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from update4j.