From rizwan at celestialsys.com Fri Dec 7 11:57:50 2018 From: rizwan at celestialsys.com (Rizwan) Date: Fri, 07 Dec 2018 17:27:50 +0530 Subject: opnejdk8 with jamvm linker error Message-ID: Hi All, Running a Java application using jamvm which links a third party library is not able to link. Java version used.. root at FX:/apps# java -jamvm -version openjdk version "1.8.0_102" OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-2-b14) JamVM (build 2.0.0, inline-threaded interpreter with stack-caching) root at FX:/apps# I have set LD_LIBRARY_PATH correctly. root at FX:~# echo $LD_LIBRARY_PATH /platform/lib/ root at FX:~# root at FX:~# java -jamvm -jar /apps/RFIDSampleApp1.jar Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: java.lang.UnsatisfiedLinkError: RFID_Connect at com.mot.rfid.api3.API3Natives.RFID_Connect(Native Method) at com.mot.rfid.api3.API3Natives.Connect(API3Natives.java:595) at com.mot.rfid.api3.RFIDReader.connect(RFIDReader.java:375) at org.zebra.RFIDSample4App.RFIDSample4App.connectToReader(RFIDSample4App.java:1517) at org.zebra.RFIDSample4App.RFIDSample4App.(RFIDSample4App.java:167) at org.zebra.RFIDSample4App.RFIDSample4App.main(RFIDSample4App.java:1562) ... 5 more root at FX:~# While I am able to run a sample hello application... root at FX:~# java -jamvm -jar /apps/hello.jar Hello, World Below is the verbose:jni log of linker error. Dynamic-linking native method java.net.NetworkInterface.getMacAddr0 ... JNI] [Dynamic-linking native method sun.misc.Unsafe.copyMemory ... internal] [Dynamic-linking native method sun.misc.Unsafe.putByte ... internal] [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.opendir0 ... JNI] [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.readdir ... JNI] [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.closedir ... JNI] [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.open0 ... JNI] [Dynamic-linking native method sun.nio.ch.IOUtil.initIDs ... JNI] [Dynamic-linking native method sun.nio.ch.IOUtil.iovMax ... JNI] [Dynamic-linking native method sun.nio.ch.FileChannelImpl.initIDs ... JNI] [Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.init ... JNI] [Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.close0 ... JNI] [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.lstat0 ... JNI] [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.unlink0 ... JNI] [Dynamic-linking native method sun.nio.ch.NativeThread.init ... JNI] [Dynamic-linking native method sun.nio.ch.NativeThread.current ... JNI] [Dynamic-linking native method sun.misc.Unsafe.pageSize ... internal] [Dynamic-linking native method sun.misc.Unsafe.getLongVolatile ... internal] [Dynamic-linking native method sun.misc.Unsafe.setMemory ... internal] [Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.write0 ... JNI] [Dynamic-linking native method com.mot.rfid.api3.API3Natives.RFID_Connect ... ] [Dynamic-linking native method java.io.FileOutputStream.writeBytes ... JNI] Exception in thread "main" [Dynamic-linking native method java.lang.System.identityHashCode ... JNI] java.lang.reflect.InvocationTargetException [Dynamic-linking native method java.lang.Throwable.getStackTraceDepth ... JNI] [Dynamic-linking native method java.lang.Throwable.getStackTraceElement ... JNI] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: java.lang.UnsatisfiedLinkError: RFID_Connect at com.mot.rfid.api3.API3Natives.RFID_Connect(Native Method) at com.mot.rfid.api3.API3Natives.Connect(API3Natives.java:595) at com.mot.rfid.api3.RFIDReader.connect(RFIDReader.java:375) at org.zebra.RFIDSample4App.RFIDSample4App.connectToReader(RFIDSample4App.java:1517) at org.zebra.RFIDSample4App.RFIDSample4App.(RFIDSample4App.java:167) at org.zebra.RFIDSample4App.RFIDSample4App.main(RFIDSample4App.java:1562) ... 5 more [Dynamic-linking native method java.io.UnixFileSystem.delete0 ... JNI] root at FX:/apps# I do not get the UnsatisfiedLinkError error with java "OpenJDK Zero VM (build 25.102-b14, interpreted mode) " root at FX:/apps# java -jar /apps/RFIDSampleApp1.jar Connected to 127.0.0.1 .................................................. Welcome to RFID API3 Java Standard Sample Application .................................................. Thanks Rizwan From martijnverburg at gmail.com Fri Dec 7 12:47:13 2018 From: martijnverburg at gmail.com (Martijn Verburg) Date: Fri, 7 Dec 2018 12:47:13 +0000 Subject: opnejdk8 with jamvm linker error In-Reply-To: References: Message-ID: Hi Rizwan, Welcome to OpenJDK. The discuss list is for low volume discussion about the OpenJDK community, governance etc. I think your issue needs to be reported over at JamVM - https://sourceforge.net/p/jamvm/mailman/jamvm-general/ Cheers, Martijn On Fri, 7 Dec 2018 at 11:58, Rizwan wrote: > Hi All, > > > > > Running a Java application using jamvm which links a third party library > is > not able to link. > > Java version used.. > > root at FX:/apps# java -jamvm -version > openjdk version "1.8.0_102" > OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-2-b14) > JamVM (build 2.0.0, inline-threaded interpreter with stack-caching) > root at FX:/apps# > > I have set LD_LIBRARY_PATH correctly. > root at FX:~# echo $LD_LIBRARY_PATH > /platform/lib/ > root at FX:~# > > root at FX:~# java -jamvm -jar /apps/RFIDSampleApp1.jar > Exception in thread "main" java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > > org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) > Caused by: java.lang.UnsatisfiedLinkError: RFID_Connect > at com.mot.rfid.api3.API3Natives.RFID_Connect(Native Method) > at com.mot.rfid.api3.API3Natives.Connect(API3Natives.java:595) > at com.mot.rfid.api3.RFIDReader.connect(RFIDReader.java:375) > at > > org.zebra.RFIDSample4App.RFIDSample4App.connectToReader(RFIDSample4App.java:1517) > at org.zebra.RFIDSample4App.RFIDSample4App.(RFIDSample4App.java:167) > at org.zebra.RFIDSample4App.RFIDSample4App.main(RFIDSample4App.java:1562) > ... 5 more > root at FX:~# > > While I am able to run a sample hello application... > root at FX:~# java -jamvm -jar /apps/hello.jar > Hello, World > > Below is the verbose:jni log of linker error. > > Dynamic-linking native method java.net.NetworkInterface.getMacAddr0 ... > JNI] > [Dynamic-linking native method sun.misc.Unsafe.copyMemory ... internal] > [Dynamic-linking native method sun.misc.Unsafe.putByte ... internal] > [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.opendir0 > ... > JNI] > [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.readdir ... > JNI] > [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.closedir > ... > JNI] > [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.open0 ... > JNI] > [Dynamic-linking native method sun.nio.ch.IOUtil.initIDs ... JNI] > [Dynamic-linking native method sun.nio.ch.IOUtil.iovMax ... JNI] > [Dynamic-linking native method sun.nio.ch.FileChannelImpl.initIDs ... JNI] > [Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.init ... JNI] > [Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.close0 ... > JNI] > [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.lstat0 ... > JNI] > [Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.unlink0 ... > JNI] > [Dynamic-linking native method sun.nio.ch.NativeThread.init ... JNI] > [Dynamic-linking native method sun.nio.ch.NativeThread.current ... JNI] > [Dynamic-linking native method sun.misc.Unsafe.pageSize ... internal] > [Dynamic-linking native method sun.misc.Unsafe.getLongVolatile ... > internal] > [Dynamic-linking native method sun.misc.Unsafe.setMemory ... internal] > [Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.write0 ... > JNI] > [Dynamic-linking native method com.mot.rfid.api3.API3Natives.RFID_Connect > ... ] > [Dynamic-linking native method java.io.FileOutputStream.writeBytes ... JNI] > Exception in thread "main" [Dynamic-linking native method > java.lang.System.identityHashCode ... JNI] > java.lang.reflect.InvocationTargetException > [Dynamic-linking native method java.lang.Throwable.getStackTraceDepth ... > JNI] > [Dynamic-linking native method java.lang.Throwable.getStackTraceElement > ... > JNI] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > > org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) > Caused by: java.lang.UnsatisfiedLinkError: RFID_Connect > at com.mot.rfid.api3.API3Natives.RFID_Connect(Native Method) > at com.mot.rfid.api3.API3Natives.Connect(API3Natives.java:595) > at com.mot.rfid.api3.RFIDReader.connect(RFIDReader.java:375) > at > > org.zebra.RFIDSample4App.RFIDSample4App.connectToReader(RFIDSample4App.java:1517) > at org.zebra.RFIDSample4App.RFIDSample4App.(RFIDSample4App.java:167) > at org.zebra.RFIDSample4App.RFIDSample4App.main(RFIDSample4App.java:1562) > ... 5 more > [Dynamic-linking native method java.io.UnixFileSystem.delete0 ... JNI] > root at FX:/apps# > > I do not get the UnsatisfiedLinkError error with java "OpenJDK Zero VM > (build 25.102-b14, interpreted mode) " > > root at FX:/apps# java -jar /apps/RFIDSampleApp1.jar > Connected to 127.0.0.1 > .................................................. > Welcome to RFID API3 Java Standard Sample Application > .................................................. > > > > > > > > Thanks > > Rizwan > From maobaolong at 139.com Tue Dec 18 02:29:16 2018 From: maobaolong at 139.com (=?utf-8?B?5q+b5a6d6b6Z?=) Date: Tue, 18 Dec 2018 10:29:16 +0800 (CST) Subject: Is there a cmakelists.txt file of openjdk11 Message-ID: <2b0f5c185a3b5a4-0000c.Richmail.00040656781616024353@139.com> Hi all, we need cmakelists.txt to make ability of clion could be the ide for openjdk. Because clion support cmake only, but not makefile project. In some famous c comunity, cmake is more and more popular. So is there a cmakelists.txt? From david.holmes at oracle.com Tue Dec 18 02:36:55 2018 From: david.holmes at oracle.com (David Holmes) Date: Tue, 18 Dec 2018 12:36:55 +1000 Subject: Is there a cmakelists.txt file of openjdk11 In-Reply-To: <2b0f5c185a3b5a4-0000c.Richmail.00040656781616024353@139.com> References: <2b0f5c185a3b5a4-0000c.Richmail.00040656781616024353@139.com> Message-ID: <141e0d34-22af-00db-2acd-aa160c6df93b@oracle.com> Hi, On 18/12/2018 12:29 pm, ??? wrote: > Hi all, we need cmakelists.txt to make ability of clion could be the ide for openjdk. Because clion support cmake only, but not makefile project. In some famous c comunity, cmake is more and more popular. So is there a cmakelists.txt? No there isn't. I suggest discussing on build-dev at openjdk.java.net. Cheers, David > > > > From david.holmes at oracle.com Tue Dec 18 03:33:00 2018 From: david.holmes at oracle.com (David Holmes) Date: Tue, 18 Dec 2018 13:33:00 +1000 Subject: Is there a cmakelists.txt file of openjdk11 In-Reply-To: <141e0d34-22af-00db-2acd-aa160c6df93b@oracle.com> References: <2b0f5c185a3b5a4-0000c.Richmail.00040656781616024353@139.com> <141e0d34-22af-00db-2acd-aa160c6df93b@oracle.com> Message-ID: I should add that this was raised in the past. Not sure what happened to it: http://mail.openjdk.java.net/pipermail/build-dev/2017-March/018846.html but again, take this up on build-dev. David On 18/12/2018 12:36 pm, David Holmes wrote: > Hi, > > On 18/12/2018 12:29 pm, ??? wrote: >> Hi all, we need cmakelists.txt to make ability of clion could be the >> ide for openjdk. Because clion support cmake only, but not makefile >> project. In some famous c comunity, cmake is more and more popular. So >> is there a cmakelists.txt? > > No there isn't. I suggest discussing on build-dev at openjdk.java.net. > > Cheers, > David > > >> >> >> >> From thomas.stuefe at gmail.com Tue Dec 18 09:49:23 2018 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Tue, 18 Dec 2018 10:49:23 +0100 Subject: Is there a cmakelists.txt file of openjdk11 In-Reply-To: <2b0f5c185a3b5a4-0000c.Richmail.00040656781616024353@139.com> References: <2b0f5c185a3b5a4-0000c.Richmail.00040656781616024353@139.com> Message-ID: Hi, I put one together some months ago, with Alexeys help, for the use with hotspot only: https://github.com/tstuefe/ojdk-clion. May have bitrotted though, CLion still felt too sluggish when compared to CDT so I stayed with the latter for the time being. Cheers, Thomas On Tue, Dec 18, 2018 at 3:29 AM ??? wrote: > > > > > Hi all, we need cmakelists.txt to make ability of clion could be the ide for openjdk. Because clion support cmake only, but not makefile project. In some famous c comunity, cmake is more and more popular. So is there a cmakelists.txt? > > > > > From jacob_tredinnick at mentor.com Mon Dec 24 16:48:21 2018 From: jacob_tredinnick at mentor.com (Tredinnick, Jacob) Date: Mon, 24 Dec 2018 16:48:21 +0000 Subject: Availability of Lucida fonts with OpenJDK 11 Message-ID: Hello, My team is currently working on migrating some of our (mostly Desktop & Swing-based) applications from OracleJDK 8 to OpenJDK 11 and we have discovered that Lucida fonts are not distributed with OpenJDK. This and other font changes are discussed in the chain here: http://mail.openjdk.java.net/pipermail/discuss/2017-November/004629.html Does anyone have any further advice on how best to enable our customers to continue to use these fonts? Is it feasible for us to obtain an OEM license to ship the fonts (as Oracle presumably did with OracleJDK 10 and earlier)? Or does anyone know of an open source alternative that is close enough to the fonts previously shipped with OracleJDK? Or will our customers have to license the fonts themselves in order to use them in our future releases? Based on initial research, I had found the following site which appears to license the fonts for individuals, sites or OEMs: https://tug.org/store/lucida/index.html Can anyone confirm that this is the correct point of contact regarding the Lucida fonts? Note: We have another question about font differences due to Freetype vs T2K, which I will ask on another chain... Thanks -- Jacob Tredinnick From philip.race at oracle.com Mon Dec 24 17:26:35 2018 From: philip.race at oracle.com (Philip Race) Date: Mon, 24 Dec 2018 09:26:35 -0800 Subject: Availability of Lucida fonts with OpenJDK 11 In-Reply-To: References: Message-ID: <5C2116CB.30900@oracle.com> You really want 2d-dev at openjdk.java.net for all of these questions. Not discuss. -phil. On 12/24/18, 8:48 AM, Tredinnick, Jacob wrote: > Hello, > > My team is currently working on migrating some of our (mostly Desktop& Swing-based) applications from OracleJDK 8 to OpenJDK 11 and we have discovered that Lucida fonts are not distributed with OpenJDK. > This and other font changes are discussed in the chain here: > http://mail.openjdk.java.net/pipermail/discuss/2017-November/004629.html > > Does anyone have any further advice on how best to enable our customers to continue to use these fonts? > Is it feasible for us to obtain an OEM license to ship the fonts (as Oracle presumably did with OracleJDK 10 and earlier)? > Or does anyone know of an open source alternative that is close enough to the fonts previously shipped with OracleJDK? > Or will our customers have to license the fonts themselves in order to use them in our future releases? > > Based on initial research, I had found the following site which appears to license the fonts for individuals, sites or OEMs: > https://tug.org/store/lucida/index.html > Can anyone confirm that this is the correct point of contact regarding the Lucida fonts? > > Note: We have another question about font differences due to Freetype vs T2K, which I will ask on another chain... > > Thanks > -- > Jacob Tredinnick From jacob_tredinnick at mentor.com Mon Dec 24 17:36:24 2018 From: jacob_tredinnick at mentor.com (Tredinnick, Jacob) Date: Mon, 24 Dec 2018 17:36:24 +0000 Subject: Availability of Lucida fonts with OpenJDK 11 In-Reply-To: <5C2116CB.30900@oracle.com> References: <5C2116CB.30900@oracle.com> Message-ID: <60988bbed6e648ae9d47cf377038b59c@SVR-IES-MBX-03.mgc.mentorg.com> Sorry . Will redirect both questions there... -----Original Message----- From: Philip Race [mailto:philip.race at oracle.com] Sent: 24 December 2018 17:27 To: Tredinnick, Jacob Cc: discuss at openjdk.java.net Subject: Re: Availability of Lucida fonts with OpenJDK 11 You really want 2d-dev at openjdk.java.net for all of these questions. Not discuss. -phil. On 12/24/18, 8:48 AM, Tredinnick, Jacob wrote: > Hello, > > My team is currently working on migrating some of our (mostly Desktop& Swing-based) applications from OracleJDK 8 to OpenJDK 11 and we have discovered that Lucida fonts are not distributed with OpenJDK. > This and other font changes are discussed in the chain here: > http://mail.openjdk.java.net/pipermail/discuss/2017-November/004629.ht > ml > > Does anyone have any further advice on how best to enable our customers to continue to use these fonts? > Is it feasible for us to obtain an OEM license to ship the fonts (as Oracle presumably did with OracleJDK 10 and earlier)? > Or does anyone know of an open source alternative that is close enough to the fonts previously shipped with OracleJDK? > Or will our customers have to license the fonts themselves in order to use them in our future releases? > > Based on initial research, I had found the following site which appears to license the fonts for individuals, sites or OEMs: > https://tug.org/store/lucida/index.html > Can anyone confirm that this is the correct point of contact regarding the Lucida fonts? > > Note: We have another question about font differences due to Freetype vs T2K, which I will ask on another chain... > > Thanks > -- > Jacob Tredinnick From jacob_tredinnick at mentor.com Mon Dec 24 17:33:37 2018 From: jacob_tredinnick at mentor.com (Tredinnick, Jacob) Date: Mon, 24 Dec 2018 17:33:37 +0000 Subject: FontMetrics differ between OracleJDK 8 and OpenJDK 11 Message-ID: <36fb21b0fa3b4d74abaa0dcc14db9b80@SVR-IES-MBX-03.mgc.mentorg.com> Hello, My team is currently working on migrating some of our (mostly Desktop & Swing-based) applications from OracleJDK 8 to OpenJDK 11 and we have discovered that some fonts in our application are getting drawn significantly differently e.g. significantly larger, differences with spaces between characters. When debugging, we found that the FontMetrics for the Font obtained as follows: FontMetrics metrics = Toolkit.getDefaultToolkit().getFontMetrics(font); Returns significantly different values: For example a plain, size 12 Calibri font: In OracleJDK 8 metrics.getMaxAscent() returns 11, while in OracleJDK 11 it returns 9. I understand that the proprietary "T2K" font engine was replaced by "FreeType" in OpenJDK but I'm surprised at the very noticeable differences that we now see in some of our text objects. Is it expected that FontMetrics would be so significantly different between OracleJDK 8 and OpenJDK 11? Note: I can share the code that generates the font metrics as well as a file describing all the diffs for fonts on my laptop if needed. Thanks -- Jake From philip.race at oracle.com Mon Dec 24 21:23:48 2018 From: philip.race at oracle.com (Phil Race) Date: Mon, 24 Dec 2018 13:23:48 -0800 Subject: FontMetrics differ between OracleJDK 8 and OpenJDK 11 In-Reply-To: <36fb21b0fa3b4d74abaa0dcc14db9b80@SVR-IES-MBX-03.mgc.mentorg.com> References: <36fb21b0fa3b4d74abaa0dcc14db9b80@SVR-IES-MBX-03.mgc.mentorg.com> Message-ID: <3BE2FA8C-B6C9-437C-85EA-14D5F5AC4B24@oracle.com> Again, wrong list. And anyway all openjdk lists are for people contributing. You can report bugs at Java.com -Phil. > On Dec 24, 2018, at 9:33 AM, Tredinnick, Jacob wrote: > > Hello, > > My team is currently working on migrating some of our (mostly Desktop & Swing-based) applications from OracleJDK 8 to OpenJDK 11 and we have discovered that some fonts in our application are getting drawn significantly differently e.g. significantly larger, differences with spaces between characters. > > When debugging, we found that the FontMetrics for the Font obtained as follows: > FontMetrics metrics = Toolkit.getDefaultToolkit().getFontMetrics(font); > > Returns significantly different values: > For example a plain, size 12 Calibri font: > In OracleJDK 8 metrics.getMaxAscent() returns 11, while in OracleJDK 11 it returns 9. > > I understand that the proprietary "T2K" font engine was replaced by "FreeType" in OpenJDK but I'm surprised at the very noticeable differences that we now see in some of our text objects. > Is it expected that FontMetrics would be so significantly different between OracleJDK 8 and OpenJDK 11? > > Note: I can share the code that generates the font metrics as well as a file describing all the diffs for fonts on my laptop if needed. > > Thanks > -- > Jake >