These are chat archives for fiji/fiji

23rd
Mar 2016
Jean-Yves Tinevez
@tinevez
Mar 23 2016 06:29
Thanks!
Stefan Helfrich
@stelfrich
Mar 23 2016 08:37
I remember a discussion about discovering available Java version on a system in the context of switching to Java 8. Does that code work reliably? If so, where does it live?
Curtis Rueden
@ctrueden
Mar 23 2016 13:35
@stelfrich github.com/imagej/imagej-launcher but we will likely be retiring it.
Stefan Helfrich
@stelfrich
Mar 23 2016 18:44
@ctrueden I was asking because I blew a Fiji installation with enabling the Java 8 update site (as mentioned before) without having a Java 8 installation on the machine (not having properly read the news post on the topic). I was wondering if we could have a check for an exisiting Java 8 installation before enabling the Java 8 update-site.
(although I guess you have thought about that and it is not quite as easy as I imagine..)
Curtis Rueden
@ctrueden
Mar 23 2016 18:45
@stelfrich We could hardcode something, I guess.
Stefan Helfrich
@stelfrich
Mar 23 2016 18:46
idk. it might be useful for the next months?
Curtis Rueden
@ctrueden
Mar 23 2016 18:46
I want this all to be over with before the "next months" have passed.
By which I mean: soon, we should eliminate the Java-8 update site and reintegrate everything into the ImageJ and Fiji sites.
There is only one thing I want to do before we do that, really.
Create a launcher project in Java that requires the minimum possible version of Java, and performs any checks at startup to ensure the JVM is suitable. And if not, tell the user to upgrade, and then quit.
That way, we can have all JARs on the core update site built with Java 8, except for this one launcher project.
Stefan Helfrich
@stelfrich
Mar 23 2016 18:48
That sounds great!
I guess it’s not too much of a problem, since people are used to re-installing software..
if you don’t know it better, that really seems to be go-to solution ;)
(and will indeed fix the problem if you download Fiji with a bundle JVM..)
Curtis Rueden
@ctrueden
Mar 23 2016 18:50
I feel bad for the people who have customized their installations.
So I am thinking about ways to upgrade their Java for them... but only if it isn't mountains of dev time to develop.
Stefan Helfrich
@stelfrich
Mar 23 2016 18:54
Hmm.
In the end, the launcher you have talked about would ideally do exactly that, right?
Or at least, it could be an option for inexperienced users.
Curtis Rueden
@ctrueden
Mar 23 2016 19:05
I might be able to make a scijava-launcher component which is smart enough to do that... maybe. It would need to make assumptions about where the Java installation is expected to live, though.
One major problem is that you cannot, from Java, overwrite the Java installation you are currently using, especially on Windows which locks the files.
Stefan Helfrich
@stelfrich
Mar 23 2016 19:06
I was rather thinking about replacing the java folder with the newer version..
Curtis Rueden
@ctrueden
Mar 23 2016 19:06
Right, but if that very same java folder was used to spin up the scijava-launcher...
This is a major reason we have the native imagej-launcher application: it moves updated JAR files into place before launching Java.
Stefan Helfrich
@stelfrich
Mar 23 2016 19:07
sure.. that would have to be a native component..
Curtis Rueden
@ctrueden
Mar 23 2016 19:07
Yeah, NO.
We could teach the imagej-launcher native component to upgrade Java. But it is more work. And it would have to be in C. shudder
Cross-platform C no less. So horrible.
Stefan Helfrich
@stelfrich
Mar 23 2016 19:08
Plus we are trying to move away from native components?!
Curtis Rueden
@ctrueden
Mar 23 2016 19:08
Yes, we are.
My end goal is to stop shipping imagej-launcher. Send it to the attic, permanently.
Use the JavaFX native launcher instead.
Stefan Helfrich
@stelfrich
Mar 23 2016 19:09
yep. i am completely on your side
just thinking out loud..
Curtis Rueden
@ctrueden
Mar 23 2016 19:09
Sure.
I still do not know if we will be able to actually do it.
So far, the JavaFX launcher seems good, but with some limitations.
Stefan Helfrich
@stelfrich
Mar 23 2016 19:09
I know. I have got it working for a much easier use-case..
Another issue is that the JavaFX deployment tool by default puts all the JARs in a lib/ folder, whereas we need them in jars/ and/or plugins/.
Stefan Helfrich
@stelfrich
Mar 23 2016 19:14
I don’t see that changing any time soon (or anything related to JavaFX for that matter)..
Curtis Rueden
@ctrueden
Mar 23 2016 19:14
Anyway, we can do the scijava-launcher stub thingie without switching to JavaFX yet.
We already have it in imagej-launcher Java side, actually: it's called ClassLauncher.
Stefan Helfrich
@stelfrich
Mar 23 2016 19:23
I’d be glad to help (testing?)