-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Java version #77
Comments
This plan was stymied a bit by the existing ImageJ native launcher's ability to recognize newer versions of Java. With Jaunch we now have a viable alternative native launcher and can/must proceed with updating the Java version in Fiji. There are several stages to this plan: Teach the updater to update Java
Note of other related files: Update site changesOn the existing ImageJ/Fiji Java 8 sites:
On the new Java 21 update site:
imagej-updater changes
Recovering from installation problemsDownload the latest Fiji and unpack it on top of the existing installation, to just add new files. Expand
|
With 71117ab, the Updater now recognizes the folder |
I started looking at what it will take to make the new Jaunch executables supported by the Updater. It's pretty messy. Here is the first patch I started: diff --git a/src/main/java/net/imagej/updater/util/UpdaterUtil.java b/src/main/java/net/imagej/updater/util/UpdaterUtil.java
index 5d34d82..baa616f 100644
--- a/src/main/java/net/imagej/updater/util/UpdaterUtil.java
+++ b/src/main/java/net/imagej/updater/util/UpdaterUtil.java
@@ -109,11 +109,23 @@ public class UpdaterUtil {
final int macIndex = 2;
Arrays.sort(platforms);
- launchers = platforms.clone();
- for (int i = 0; i < launchers.length; i++)
- launchers[i] =
- (i == macIndex || i == macIndex + 1 ? macPrefix : "") + "ImageJ-" +
- platforms[i] + (platforms[i].startsWith("win") ? ".exe" : "");
+ launchers = new String[] {
+ // Jaunch: https://github.com/apposed/jaunch
+ "fiji-linux-arm64",
+ "fiji-linux-x64",
+ "Contents/Home/fiji-macos-arm64",
+ "Contents/Home/fiji-macos-universal",
+ "Contents/Home/fiji-macos-x64",
+ "fiji-windows-x64.exe",
+ "fiji.py",
+ // ImageJ Launcher: https://github.com/imagej/imagej-launcher
+ "ImageJ-linux32",
+ "ImageJ-linux64",
+ "Contents/MacOS/ImageJ-macosx",
+ "Contents/MacOS/ImageJ-tiger",
+ "ImageJ-win32.exe",
+ "ImageJ-win64.exe"
+ };
Arrays.sort(launchers);
updateablePlatforms = new HashSet<>(); But there is more that will need to be done. We should update the platforms beyond the current list ( |
@hinerm Regarding where to download the new OpenJDK version from: upon reflection, I think using cdn.azul.com is a good idea. They have a great infrastructure already and e.g. GitHub Actions uses them to bootstrap OpenJDK in the setup-java action. It will be better for folks worldwide than leaning on downloads.imagej.net which is not behind a CDN right now. |
It would be nice to update the Java version via the updater. We have discussed this in the past and said that this is not a priority right now, but having an issue will help keep track of it. Please tell me if this discussion already takes place in a different issue.
Here are some reasons:
Updates are provided by update sites and Java is not on an update site.
Shipping Java is highly platform dependent.
Updates from the update sites first get downloaded to
Fiji.app/update/
before they are moved into the right spot during the next Fiji launch because one cannot hot swap the components while they are loaded, at least not on all systems. Not sure if the launcher can do this with Java as well.The text was updated successfully, but these errors were encountered: