Presently the Java 11 build of Jalview treats all libraries as libraries on the classpath, and does not use them as modules. The Java 11 JRE prepped for future release is a standard AdoptOpenJDK release (possibly repackaged for getdown/install4j to use).
-At time of writing, the JRE cannot be updated over the air on macOS platform due to a limitation of getdown's unpackaging system only using jars and hence cannot work with symbolic links. There is a symbolic link that is essential (as a symbolic link) in the macOS distribution (Contents/MacOS/libjli.dylib -> ../Home/lib/jli/libjli.dylib). Without this, the install4j launcher will not work. Some work has started on incorporating tar capabilities in getdown using the apache-commons-compress library, though this is not complete.
-
Future releases might incorporate Java 11 modules into a bespoke Java 11 JRE that can be updated over the air via getdown.This could reduce the size of the distribution but will absolutely need the bespoke JRE. This would mean Jalview being restricted to platforms that we (can) support, or distributing the modules as libraries in a second distribution (the shadowJar distribution).
build.gradle is written to support compilation of either Java 1.8 or Java 11 compatible bytecode. Please note that the compilation (and therefore build) process REQUIRES a Java 11 (or above) JDK. This is because there is Java 11 specific code in some Jalview classes (devolved into separate classes which fail "gracefully" when read by a Java 1.8 JRE).
biojava-core-4.1.0.jar LGPLv2.1 - latest license at https://github.com/biojava/biojava/blob/master/LICENSE
biojava-ontology-4.1.0.jar LGPLv2.1 - latest license at https://github.com/biojava/biojava/blob/master/LICENSE
commons-codec-1.3.jar
-commons-compress-1.18.jar
commons-logging-1.1.1.jar
getdown-core.jar Getdown license - https://github.com/threerings/getdown/blob/master/LICENSE
groovy-all-2.4.12-indy.jar APL 2.0 License - downloaded and extracted from https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.6.zip
}
dependencies {
- compile 'org.apache.commons:commons-compress:1.18'
}
<parent>
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
- <version>1.8.3-1.2.2_FJVL</version>
+ <version>1.8.3-1.2.3_FJVL</version>
</parent>
<artifactId>getdown-ant</artifactId>
<parent>
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
- <version>1.8.3-1.2.2_FJVL</version>
+ <version>1.8.3-1.2.3_FJVL</version>
</parent>
<artifactId>getdown-core</artifactId>
import java.util.zip.GZIPInputStream;
import jalview.bin.MemorySetting;
-import com.install4j.api.launcher.Variables;
+//import com.install4j.api.launcher.Variables;
import com.threerings.getdown.util.*;
// avoid ambiguity with java.util.Base64 which we can't use as it's 1.8+
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import org.apache.commons.compress.archivers.ArchiveInputStream;
-import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
-import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
-
import com.threerings.getdown.util.FileUtil;
import com.threerings.getdown.util.ProgressObserver;
import com.threerings.getdown.util.StringUtil;
_marker = new File(lpath + "v");
_attrs = attrs;
- _isTgz = isTgz(lpath);
_isJar = isJar(lpath);
_isPacked200Jar = isPacked200Jar(lpath);
boolean unpack = attrs.contains(Attr.UNPACK);
if (unpack && _isJar) {
_unpacked = _local.getParentFile();
- } else if(unpack && _isTgz) {
- _unpacked = _local.getParentFile();
} else if(unpack && _isPacked200Jar) {
String dotJar = ".jar", lname = _local.getName();
String uname = lname.substring(0, lname.lastIndexOf(dotJar) + dotJar.length());
public void unpack () throws IOException
{
// sanity check
- if (!_isJar && !_isPacked200Jar && !_isTgz) {
- throw new IOException("Requested to unpack non-jar/tgz file '" + _local + "'.");
+ if (!_isJar && !_isPacked200Jar) {
+ throw new IOException("Requested to unpack non-jar file '" + _local + "'.");
}
if (_isJar) {
try (JarFile jar = new JarFile(_local)) {
FileUtil.unpackJar(jar, _unpacked, _attrs.contains(Attr.CLEAN));
}
- } else if (_isTgz) {
- try (InputStream fi = Files.newInputStream(_local.toPath());
- InputStream bi = new BufferedInputStream(fi);
- InputStream gzi = new GzipCompressorInputStream(bi);
- TarArchiveInputStream tgz = new TarArchiveInputStream(gzi)) {
- FileUtil.unpackTgz(tgz, _unpacked, _attrs.contains(Attr.CLEAN));
- }
} else {
FileUtil.unpackPacked200Jar(_local, _unpacked);
}
return path.endsWith(".jar") || path.endsWith(".jar_new");
}
- protected static boolean isTgz (String path)
- {
- return path.endsWith(".tgz") || path.endsWith(".tgz_new");
- }
-
protected static boolean isPacked200Jar (String path)
{
return path.endsWith(".jar.pack") || path.endsWith(".jar.pack_new") ||
protected URL _remote;
protected File _local, _localNew, _marker, _unpacked;
protected EnumSet<Attr> _attrs;
- protected boolean _isJar, _isPacked200Jar, _isTgz;
+ protected boolean _isJar, _isPacked200Jar;
/** Used to sort the entries in a jar file. */
protected static final Comparator<JarEntry> ENTRY_COMP = new Comparator<JarEntry>() {
import java.util.jar.*;
import java.util.zip.GZIPInputStream;
-import org.apache.commons.compress.archivers.ArchiveEntry;
-import org.apache.commons.compress.archivers.ArchiveInputStream;
-import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
-import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
-
import com.threerings.getdown.util.StreamUtil;
import com.threerings.getdown.Log;
import static com.threerings.getdown.Log.log;
}
/**
- * Unpacks the specified tgz file into the specified target directory.
- * @param cleanExistingDirs if true, all files in all directories contained in {@code tgz} will
- * be deleted prior to unpacking the tgz.
- */
- public static void unpackTgz (TarArchiveInputStream tgz, File target, boolean cleanExistingDirs)
- throws IOException
- {
- TarArchiveEntry entry;
- while ((entry = tgz.getNextTarEntry()) != null) {
- // sanitize the entry name
- String entryName = entry.getName();
- if (entryName.startsWith(File.separator))
- {
- entryName = entryName.substring(File.separator.length());
- }
- File efile = new File(target, entryName);
-
- // if we're unpacking a normal tgz file, it will have special path
- // entries that allow us to create our directories first
- if (entry.isDirectory()) {
-
- if (cleanExistingDirs) {
- if (efile.exists()) {
- for (File f : efile.listFiles()) {
- if (!f.isDirectory())
- f.delete();
- }
- }
- }
-
- if (!efile.exists() && !efile.mkdir()) {
- log.warning("Failed to create tgz entry path", "tgz", tgz, "entry", entry);
- }
- continue;
- }
-
- // but some do not, so we want to ensure that our directories exist
- // prior to getting down and funky
- File parent = new File(efile.getParent());
- if (!parent.exists() && !parent.mkdirs()) {
- log.warning("Failed to create tgz entry parent", "tgz", tgz, "parent", parent);
- continue;
- }
-
- if (entry.isLink())
- {
- System.out.println("Creating hard link "+efile.getName()+" -> "+entry.getLinkName());
- Files.createLink(efile.toPath(), Paths.get(entry.getLinkName()));
- continue;
- }
-
- if (entry.isSymbolicLink())
- {
- System.out.println("Creating symbolic link "+efile.getName()+" -> "+entry.getLinkName());
- Files.createSymbolicLink(efile.toPath(), Paths.get(entry.getLinkName()));
- continue;
- }
-
- try (BufferedOutputStream fout = new BufferedOutputStream(new FileOutputStream(efile));
- InputStream tin = tgz;) {
- StreamUtil.copy(tin, fout);
- } catch (Exception e) {
- throw new IOException(
- Log.format("Failure unpacking", "tgz", tgz, "entry", efile), e);
- }
- }
- }
-
- /**
* Unpacks a pack200 packed jar file from {@code packedJar} into {@code target}. If {@code
* packedJar} has a {@code .gz} extension, it will be gunzipped first.
*/
<parent>
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
- <version>1.8.3-1.2.2_FJVL</version>
+ <version>1.8.3-1.2.3_FJVL</version>
</parent>
<artifactId>getdown-launcher</artifactId>
if [ x$JVLVERSION != x ]; then
export VERSION=$JVLVERSION
else
- export VERSION=1.8.3-1.2.2_JVL
+ export VERSION=1.8.3-1.2.3_JVL
fi
if [ x${VERSION%_JVL} = x$VERSION ]; then
<groupId>com.threerings.getdown</groupId>
<artifactId>getdown</artifactId>
<packaging>pom</packaging>
- <version>1.8.3-1.2.2_FJVL</version>
+ <version>1.8.3-1.2.3_FJVL</version>
<name>getdown</name>
<description>An application installer and updater.</description>
<dependencies>
<dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-compress</artifactId>
- <version>1.18</version>
+ <groupId>com.install4j</groupId>
+ <artifactId>install4j-runtime</artifactId>
+ <version>7.0.11</version>
+ <scope>provided</scope>
</dependency>
- <dependency>
- <groupId>com.install4j</groupId>
- <artifactId>install4j-runtime</artifactId>
- <version>7.0.11</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
<build>