Created attachment 216688 [details] Set java version to 8 If you have "DEFAULT_VERSIONS+= java=11" in make.conf, then java/icedtea-web fails to build: ===> License GPLv2 accepted by the user ===> icedtea-web-1.8.4 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by icedtea-web-1.8.4 for building ===> Extracting for icedtea-web-1.8.4 => SHA256 Checksum OK for icedtea-web-1.8.4.tar.gz. => SHA256 Checksum OK for libxul-npapi-headers-45.9.0.tar.gz. ===> Patching for icedtea-web-1.8.4 ===> Applying FreeBSD patches for icedtea-web-1.8.4 from /usr/ports/java/icedtea-web/files /usr/bin/sed -i.bak -e 's|^sed\([[:space:]]\)|gsed\1|' -e 's|\([[:space:]]\)sed\([[:space:]]\)|\1gsed\2|g' /tmp/work/usr/ports/java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4/Makefile.am /tmp/work/usr/ports/java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4/html-gen.sh /usr/bin/sed -i.bak -e 's|^Icon=javaws|Icon=itweb-javaws|' /tmp/work/usr/ports/java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4/*.desktop.in ===> icedtea-web-1.8.4 depends on executable: zip - found ===> icedtea-web-1.8.4 depends on executable: bash - found ===> icedtea-web-1.8.4 depends on executable: gsed - found ===> icedtea-web-1.8.4 depends on file: /usr/local/share/java/classes/hamcrest.jar - found ===> icedtea-web-1.8.4 depends on file: /usr/local/share/java/classes/junit.jar - found ===> icedtea-web-1.8.4 depends on file: /usr/local/share/java/classes/tagsoup.jar - found ===> icedtea-web-1.8.4 depends on file: /usr/local/openjdk11/bin/java - found ===> icedtea-web-1.8.4 depends on executable: update-desktop-database - found ===> icedtea-web-1.8.4 depends on package: gmake>=4.3 - found ===> icedtea-web-1.8.4 depends on package: pkgconf>=1.3.0_1 - found ===> icedtea-web-1.8.4 depends on package: autoconf>=2.69 - found ===> icedtea-web-1.8.4 depends on package: automake>=1.16.1 - found ===> icedtea-web-1.8.4 depends on package: perl5>=5.30.r1<5.31 - found ===> icedtea-web-1.8.4 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found ===> icedtea-web-1.8.4 depends on shared library: libglib-2.0.so - found (/usr/local/lib/libglib-2.0.so) ===> icedtea-web-1.8.4 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so) ===> Configuring for icedtea-web-1.8.4 configure.ac:130: installing './compile' configure.ac:15: installing './config.guess' configure.ac:15: installing './config.sub' configure.ac:2: installing './install-sh' configure.ac:2: installing './missing' configure: loading site script /usr/ports/Templates/config.site checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... (cached) /bin/mkdir -p checking for gawk... (cached) /usr/bin/awk checking whether gmake sets $(MAKE)... yes checking whether gmake supports nested variables... yes checking how to create a pax tar archive... gnutar checking whether to enable maintainer-specific portions of Makefiles... yes checking build system type... amd64-portbld-freebsd12.1 checking host system type... amd64-portbld-freebsd12.1 checking if cp supports --reflink... no checking if we can hard link rather than copy from /tmp/work/usr/ports/java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4... yes checking whether to build documentation... no checking whether to filter by whitelisting on directory name when processing, compiling and running reproducers... no checking for bash... /usr/local/bin/bash checking where to place file with modular switches... ${exec_prefix}/bin checking whether build legacy shell launchers... yes checking for rustc... /usr/local/bin/rustc checking for cargo... /usr/local/bin/cargo checking whether to include also bat lunchers during linux build... no checking whether enable rust code coverage... no checking how to search for libraries in native launchers... BUNDLED checking whether to compile ecj natively... no checking for zip... /usr/local/bin/zip checking for a JDK home directory... /usr/local/openjdk11 (link to /usr/local/openjdk11) checking for javac... /usr/local/openjdk11/bin/javac checking if we are using ecj as javac... no checking for jar... /usr/local/openjdk11/bin/jar checking whether jar supports @<file> argument... yes checking whether jar supports stdin file arguments... no checking whether jar supports -J options at the end... yes checking for an ecj JAR file... no checking for a JRE home directory... configure: error: "A JRE home directory could not be found. /usr/local/openjdk11/jre" ===> Script "configure" failed unexpectedly. Please report the problem to java@FreeBSD.org [maintainer] and attach the "/tmp/work/usr/ports/java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1 Stop. make[1]: stopped in /usr/ports/java/icedtea-web *** Error code 1 Stop. make: stopped in /usr/ports/java/icedtea-web Replace "yes" with "8" fixed issue: -USE_JAVA= yes +USE_JAVA= 8
Created attachment 216694 [details] patch for Java9+ Here is a patch that should fix the problem.
(In reply to Lars Herschke from comment #1) checking if sun.net.www.protocol.jar.URLJarFile is available from some.pkg (module "java.base")... yes checking if sun.net.www.protocol.jar.URLJarFileCallBack is available from some.pkg (module "java.base")... yes checking if sun.awt.X11.XEmbeddedFrame is available from some.pkg (module "java.desktop")... yes checking if com.sun.jndi.toolkit.url.UrlUtil is available from some.pkg (module "java.naming")... yes checking if sun.net.www.protocol.http.Handler is available from some.pkg (module "java.base")... yes checking if sun.applet.AppletImageRef is available from sun.applet (module "java.desktop")... no configure: error: sun.applet.AppletImageRef not found. ===> Script "configure" failed unexpectedly. Please report the problem to java@FreeBSD.org [maintainer] and attach the "/tmp/work/usr/ports/java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1
config.log: configure:7761: checking if sun.applet.AppletImageRef is available from sun.applet (module "java.desktop") sun/applet/Test.java:4: error: cannot find symbol import sun.applet.AppletImageRef; ^ symbol: class AppletImageRef location: package sun.applet 1 error configure:7807: result: no configure:7814: error: sun.applet.AppletImageRef not found.
Created attachment 216712 [details] patch for jdk 11 Try the patch. So you can build with java 11 without plugin or java 8 is used with plugin.
The new patch is still not enough. I think JAVA_VERSION 8 has to be set in the Makefile for now. Comprehensive patches in icedtea-web java code are required for Java 11.
Build log: ------------------------------------------------------------------------- checking if selected classes, fields and methods from sun.applet are accessible via reflection... no configure: error: Some of the checked items is not avaiable. Check logs. ===> Script "configure" failed unexpectedly. Please report the problem to java@FreeBSD.org [maintainer] and attach the "/tmp/work/usr/ports/java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4/config.log" ========================================================================= java/icedtea-web/work/IcedTea-Web-icedtea-web-1.8.4/config.log: ------------------------------------------------------------------------- configure:9057: checking if selected classes, fields and methods from sun.applet are accessible via reflection Exception in thread "main" java.lang.ClassNotFoundException: sun.applet.AppletPanel at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:315) at TestAppletViewer.main(TestAppletViewer.java:8) configure:9097: result: no
You get over the configure error with another patch. Then you get compile errors in the java classes. Icedtea-web uses internal Java api's, which are simply no longer available in Java 11. But if you build with Java 8, you can at least run Webstart (not the native plugin and not the jarplugin) with Java 11. The missing functions are not called up under Java 11 at runtime.
(In reply to Lars Herschke from comment #7) Can it compiled with JDK other than OpenJDK 8? If no - then we have to commit my patch. If yes - how?
see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244976 and https://www.freshports.org/commit.php?category=java&port=icedtea-web&files=yes&message_id=202007242353.06ONrVQV034664@repo.freebsd.org
(In reply to VVD from comment #8) You can also build it with Java 7, 9 and 10. OpenJDK 9 and 10 have never been included in the ports tree.
(In reply to Lars Herschke from comment #10) > see > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244976 Just found it hour ago. :-D > OpenJDK 9 and 10 have never been included in the ports tree. Ye, I know. Thanks!
Building with Java 7 is neither not possible.