Hello, On 10/12/17 16:15, epirat07 at gmail.com (Marvin Scholz) wrote: > Does it need to compile with JDK 9 to run with JRE 9?
For this case, it actually does :(
For instance, the BDFileSystem does not implement one virtual function,
so on runtime, there is a potential problem.
Also, sun.awt.CausedFocusEvent.Cause was removed and replaced by
FocusEvent.Cause which is new in jdk9. So that is another symbol that
will not be resolved on runtime.
I am attaching a patch that allows here building on Linux, but the
resulting library cannot be run any more with jdk < 9, since the
FocusEvent.Cause does not exist in jdk8. Also the patch resolves the
implementing of the missing function of FileSystem by extending
UnixFileSystem. Which is bound to work here on Linux, but a fix for
Windows has to be different.
> It seems it already fails at initializing the JVM, maybe API changed for that?
In src/libbluray/bdj/bdj.c there is:
static const char * const jvm_dir[] = {"jre/lib/" JAVA_ARCH "/server"};
which is wrong for jdk9 and higher, since it should be "lib/server"
simply. Most likely that is why you cannot initialize the JVM.
But there are some more bad news. When you try to build the whole thing
with jdk10, which is due to be released in March, you get:
[javac]
/home/abuild/rpmbuild/BUILD/libbluray-1.0.2/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java:81:
error: cannot find symbol
[javac] if
(classDepth("javax.crypto.JceSecurityManager") < 3) {
[javac] ^
[javac] symbol: method classDepth(String)
[javac] location: class BDJSecurityManager
[javac]
/home/abuild/rpmbuild/BUILD/libbluray-1.0.2/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java:88:
error: cannot find symbol
[javac] if (classDepth("org.videolan.Libbluray") == 3) {
[javac] ^
[javac] symbol: method classDepth(String)
[javac] location: class BDJSecurityManager
[javac]
/home/abuild/rpmbuild/BUILD/libbluray-1.0.2/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java:97:
error: cannot find symbol
[javac] if (classDepth("sun.awt.AWTAutoShutdown") > 0) {
[javac] ^
[javac] symbol: method classDepth(String)
[javac] location: class BDJSecurityManager
[javac]
/home/abuild/rpmbuild/BUILD/libbluray-1.0.2/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java:222:
warning: [removal] checkSystemClipboardAccess() in SecurityManager has
been deprecated and marked for removal
[javac] public void checkSystemClipboardAccess() {
[javac] ^
[javac] Note: Some input files use or override 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] 3 errors
[javac] 7 warnings
This is due to the fact that some of the SecurityManager methods,
deprecated since java 1.2, were finally removed. So, libbluray, as it is
right now, will not work with jdk10 either, if built with whatever lower
version that will allow it to be built. This will need a rethinking of
the BDJSecurityManager.java all together and when one looks at the
deprectation warnings, some other problems are just waiting for their
own time.
Cheers
Fridrich
--- libbluray-1.0.1/src/libbluray/bdj/build.xml 2017-03-02 14:33:49.000000000 +0100
+++ libbluray-1.0.1/src/libbluray/bdj/build.xml 2017-10-30 08:32:10.295848485 +0100
@@ -8,7 +8,6 @@
<property name="dist" location="../../.libs"/>
<property name="src_awt" value=""/>
<property name="src_asm" value="../../../contrib/asm/src/"/>
- <property name="bootclasspath" value=""/>
<property name="version" value=""/>
<target name="init">
@@ -20,14 +19,12 @@
<target name="compile" depends="init"
description="compile the source " >
<javac srcdir="${src_asm}" destdir="${build}" debug="yes"
- bootclasspath="${bootclasspath}"
- source="1.5" target="1.5">
+ source="1.6" target="1.6">
<compilerarg value="-XDignore.symbol.file"/>
<compilerarg value="-Xlint:-deprecation"/>
</javac>
<javac srcdir="${src}${src_awt}" destdir="${build}" debug="yes"
- bootclasspath="${bootclasspath}"
- source="1.4" target="1.4">
+ source="1.6" target="1.6">
<compilerarg value="-XDignore.symbol.file"/>
<compilerarg value="-Xlint:-deprecation"/>
</javac>
--- libbluray-1.0.1/src/libbluray/bdj/java/java/io/BDFileSystem.java 2017-03-02 14:33:49.000000000 +0100
+++ libbluray-1.0.1/src/libbluray/bdj/java/java/io/BDFileSystem.java 2017-10-30 09:25:33.483391121 +0100
@@ -38,7 +38,7 @@
import org.videolan.BDJXletContext;
import org.videolan.Logger;
-public abstract class BDFileSystem extends FileSystem {
+public abstract class BDFileSystem extends UnixFileSystem {
private static final Logger logger = Logger.getLogger(BDFileSystem.class.getName());
--- libbluray-1.0.1/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java 2017-03-02 14:33:49.000000000 +0100
+++ libbluray-1.0.1/src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java 2017-10-30 09:08:08.259034704 +0100
@@ -173,7 +173,7 @@
return ((BDToolkit)BDToolkit.getDefaultToolkit()).createImage((Component)null, width, height);
}
- public boolean requestFocus(Component c, boolean a, boolean b, long l, sun.awt.CausedFocusEvent.Cause d) {
+ public boolean requestFocus(Component c, boolean a, boolean b, long l, FocusEvent.Cause d) {
if (c == null) {
return true;
}
signature.asc
Description: OpenPGP digital signature
_______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
