Skip to content

Fix support for java 24

With a javac version of 24.0.2 the compilation fails:

Program ant found: YES (/Users/videolanci/sandbox/bin/ant)
Java compiler for the host machine: javac (unknown 24.0.2)
Build targets in project: 16
libbluray 1.4.0
    Build BD-J JAR               : true
        javac version            : 24.0.2
        Java binary version      : 1.8
    Font support (freetype2)     : true
    Use system fonts (fontconfig): false
    Metadata support (libxml2)   : true
    External libudfread          : false
  Subprojects
    libudfread                   : YES
  User defined options
    backend                      : ninja
    buildtype                    : debugoptimized
    c_args                       : -Werror=partial-availability -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64 -fno-stack-check -I/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/include -g -O2
    c_link_args                  :  -L/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64
    cmake_prefix_path            : /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19
    cpp_args                     : -Werror=partial-availability -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64 -fno-stack-check -I/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/include -stdlib=libc++ -g -O2
    cpp_link_args                :  -L/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64
    default_library              : static
    fontconfig                   : disabled
    freetype                     : enabled
    libdir                       : lib
    libxml2                      : enabled
    objc_args                    : -Werror=partial-availability -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64 -fno-stack-check -I/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/include -g -O2
    objc_link_args               :  -L/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64
    objcpp_args                  : -Werror=partial-availability -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64 -fno-stack-check -I/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/include -stdlib=libc++ -g -O2
    objcpp_link_args             :  -L/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.11 -DMACOSX_DEPLOYMENT_TARGET=10.11 -arch arm64
    prefix                       : /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/aarch64-apple-darwin19
Found ninja-1.11.1.git.kitware.jobserver-1 at /Users/videolanci/sandbox/bin/ninja
meson compile -C bluray/vlc_build  && meson install -C bluray/vlc_build
ninja: Entering directory `/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/vlc_build'
[1/7] Compiling C object src/examples/bd_splice.p/bdsplice.c.o
[2/7] Compiling C object src/examples/bd_list_titles.p/list_titles.c.o
[3/7] Compiling C object src/examples/bd_info.p/bd_info.c.o
[4/7] Linking target src/examples/bd_info
[5/7] Linking target src/examples/bd_splice
[6/7] Linking target src/examples/bd_list_titles
[7/7] Generating src/libbluray/bdj/bdj-jar with a custom command
FAILED: src/libbluray/bdj/libbluray-j2se-1.4.0.jar src/libbluray/bdj/libbluray-awt-j2se-1.4.0.jar 
/Users/videolanci/sandbox/bin/ant -f ../src/libbluray/bdj/build.xml -Dbuild=/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/vlc_build/src/libbluray/bdj/libbluray-j2se-1.4.0.jar.p -Ddist=/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/vlc_build/src/libbluray/bdj -Dbootclasspath= -Dsrc_awt=:java-j2se:java-build-support -Dversion=j2se-1.4.0 -Djava_version_asm=1.8 -Djava_version_bdj=1.8
Buildfile: /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/build.xml
init:
compile:
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/build.xml:26: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/build.xml:32: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 9 source files to /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/vlc_build/src/libbluray/bdj/libbluray-j2se-1.4.0.jar.p
    [javac] warning: [options] bootstrap class path is not set in conjunction with -source 8
    [javac]   not setting the bootstrap class path may lead to class files that cannot run on JDK 8
    [javac]     --release 8 is recommended instead of -source 8 -target 1.8 because it sets the bootstrap class path automatically
    [javac] warning: [options] source value 8 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 8 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java:26: warning: [removal] AccessController in java.security has been deprecated and marked for removal
    [javac] import java.security.AccessController;
    [javac]                     ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java:31: error: BDFramePeer is not abstract and does not override abstract method getAppropriateGraphicsConfiguration(GraphicsConfiguration) in WindowPeer
    [javac] public class BDFramePeer extends BDComponentPeer implements FramePeer
    [javac]        ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java:194: warning: [removal] AccessController in java.security has been deprecated and marked for removal
    [javac]         AccessController.doPrivileged(
    [javac]         ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/io/FileInputStream.java:63: warning: [removal] SecurityManager in java.lang has been deprecated and marked for removal
    [javac]         SecurityManager security = System.getSecurityManager();
    [javac]         ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/io/FileInputStream.java:63: warning: [removal] getSecurityManager() in System has been deprecated and marked for removal
    [javac]         SecurityManager security = System.getSecurityManager();
    [javac]                                          ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/io/FileInputStream.java:100: warning: [removal] SecurityManager in java.lang has been deprecated and marked for removal
    [javac]         SecurityManager security = System.getSecurityManager();
    [javac]         ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/io/FileInputStream.java:100: warning: [removal] getSecurityManager() in System has been deprecated and marked for removal
    [javac]         SecurityManager security = System.getSecurityManager();
    [javac]                                          ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/java/io/FileInputStream.java:211: warning: [removal] finalize() in Object has been deprecated and marked for removal
    [javac]     protected void finalize() throws IOException {
    [javac]                    ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/org/videolan/PortingHelper.java:25: warning: [removal] stop() in Thread has been deprecated and marked for removal
    [javac]         t.stop();
    [javac]          ^
    [javac] /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/org/videolan/PortingHelper.java:29: error: cannot find symbol
    [javac]         t.stop();
    [javac]          ^
    [javac]   symbol:   method stop()
    [javac]   location: variable t of type ThreadGroup
    [javac] Note: /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/java-j2se/org/dvb/ui/DVBGraphicsImpl.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors
    [javac] 12 warnings
BUILD FAILED
/Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/src/libbluray/bdj/build.xml:32: Compile failed; see the compiler error output for details.
Total time: 1 second
ninja: build stopped: subcommand failed.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /Users/videolanci/sandbox/bin/ninja -C /Users/videolanci/builds/hY5hq4SXk/0/rom1v/vlc/contrib/contrib-aarch64-apple-darwin19/bluray/vlc_build
make: *** [.bluray] Error 1

--release 8 is recommended instead of -source 8 -target 1.8

This might be a good hint.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information