Re: [External] : Re: jpackage OS/X JDK-8263157 fix regressed out

2021-07-22 Thread Alexey Semenyuk
There is no corresponding folder on other platforms, so to simplify 
packaging "app" directory is used on all platforms.


- Alexey

On 7/22/2021 2:42 PM, Alan Snyder wrote:

Why is a directory named “app” used for dynamic libraries instead of the 
conventional directory “Frameworks”?

   Alan




On Jul 22, 2021, at 11:04 AM, Michael Hall  wrote:




On Jul 22, 2021, at 12:29 PM, Alexey Semenyuk  
wrote:

The fix for JDK-8263157 cleared the default value of `java.library.path` system 
property and resulted in JDK-8267598 regression. So the fix for JDK-8263157 was 
reworked: jpackage doesn't set `java.library.path` system property, but it adds 
`app` directory to `DYLD_LIBRARY_PATH` env variable on OSX. OSX JVM startup 
code builds the value of `java.library.path` system property from the value of 
`DYLD_LIBRARY_PATH` env variable. This way jpackage doesn't interfere with the 
default JVM initialization code and also adds `app`  directory to 
`java.library.path` system property.
As far as I can see it from the log, the value of `java.library.path` contains 
`app` dir - 
`/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app`. So it 
works as expected.
Are you sure the native library is in place?

- Alexey


I missed that it was there somehow, but…

ls outputdir/HalfPipe.app/Contents/app | grep dylib
libAppleScriptEngine.dylib
libBSF4ooRexx.dylib
libfscript.dylib
libhp.dylib
libmacattrs.dylib

Also overriding
-Djava.library.path=$APPDIR
worked. So I didn’t look too closely.
So what am I still missing?
;/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app:/Users/mjh/Library/Java/Extensions:
Inconsistent path separators?




Re: [External] : Re: jpackage OS/X JDK-8263157 fix regressed out

2021-07-22 Thread Michael Hall



> On Jul 22, 2021, at 1:46 PM, Alexey Semenyuk  
> wrote:
> 
> Oh, inconsistent path separators indeed. Good catch! This is the reason it 
> doesn't work as it should.
> Filed https://bugs.openjdk.java.net/browse/JDK-8271155 to track it.
> 
> - Alexey
> 
> 

Thank you.



Re: [External] : Re: jpackage OS/X JDK-8263157 fix regressed out

2021-07-22 Thread Alexey Semenyuk
Oh, inconsistent path separators indeed. Good catch! This is the reason 
it doesn't work as it should.

Filed https://bugs.openjdk.java.net/browse/JDK-8271155 to track it.

- Alexey


On 7/22/2021 2:04 PM, Michael Hall wrote:



On Jul 22, 2021, at 12:29 PM, Alexey Semenyuk  
wrote:

The fix for JDK-8263157 cleared the default value of `java.library.path` system 
property and resulted in JDK-8267598 regression. So the fix for JDK-8263157 was 
reworked: jpackage doesn't set `java.library.path` system property, but it adds 
`app` directory to `DYLD_LIBRARY_PATH` env variable on OSX. OSX JVM startup 
code builds the value of `java.library.path` system property from the value of 
`DYLD_LIBRARY_PATH` env variable. This way jpackage doesn't interfere with the 
default JVM initialization code and also adds `app`  directory to 
`java.library.path` system property.
As far as I can see it from the log, the value of `java.library.path` contains 
`app` dir - 
`/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app`. So it 
works as expected.
Are you sure the native library is in place?

- Alexey


I missed that it was there somehow, but…

ls outputdir/HalfPipe.app/Contents/app | grep dylib
libAppleScriptEngine.dylib
libBSF4ooRexx.dylib
libfscript.dylib
libhp.dylib
libmacattrs.dylib

Also overriding
-Djava.library.path=$APPDIR
worked. So I didn’t look too closely.
So what am I still missing?
;/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app:/Users/mjh/Library/Java/Extensions:
Inconsistent path separators?




Re: jpackage OS/X JDK-8263157 fix regressed out

2021-07-22 Thread Alan Snyder
Why is a directory named “app” used for dynamic libraries instead of the 
conventional directory “Frameworks”?

  Alan



> On Jul 22, 2021, at 11:04 AM, Michael Hall  wrote:
> 
> 
> 
>> On Jul 22, 2021, at 12:29 PM, Alexey Semenyuk  
>> wrote:
>> 
>> The fix for JDK-8263157 cleared the default value of `java.library.path` 
>> system property and resulted in JDK-8267598 regression. So the fix for 
>> JDK-8263157 was reworked: jpackage doesn't set `java.library.path` system 
>> property, but it adds `app` directory to `DYLD_LIBRARY_PATH` env variable on 
>> OSX. OSX JVM startup code builds the value of `java.library.path` system 
>> property from the value of `DYLD_LIBRARY_PATH` env variable. This way 
>> jpackage doesn't interfere with the default JVM initialization code and also 
>> adds `app`  directory to `java.library.path` system property.
>> As far as I can see it from the log, the value of `java.library.path` 
>> contains `app` dir - 
>> `/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app`. So 
>> it works as expected.
>> Are you sure the native library is in place?
>> 
>> - Alexey
>> 
> 
> I missed that it was there somehow, but…
> 
> ls outputdir/HalfPipe.app/Contents/app | grep dylib
> libAppleScriptEngine.dylib
> libBSF4ooRexx.dylib
> libfscript.dylib
> libhp.dylib
> libmacattrs.dylib
> 
> Also overriding 
> -Djava.library.path=$APPDIR
> worked. So I didn’t look too closely. 
> So what am I still missing?
> ;/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app:/Users/mjh/Library/Java/Extensions:
> Inconsistent path separators?



Re: jpackage OS/X JDK-8263157 fix regressed out

2021-07-22 Thread Michael Hall



> On Jul 22, 2021, at 12:29 PM, Alexey Semenyuk  
> wrote:
> 
> The fix for JDK-8263157 cleared the default value of `java.library.path` 
> system property and resulted in JDK-8267598 regression. So the fix for 
> JDK-8263157 was reworked: jpackage doesn't set `java.library.path` system 
> property, but it adds `app` directory to `DYLD_LIBRARY_PATH` env variable on 
> OSX. OSX JVM startup code builds the value of `java.library.path` system 
> property from the value of `DYLD_LIBRARY_PATH` env variable. This way 
> jpackage doesn't interfere with the default JVM initialization code and also 
> adds `app`  directory to `java.library.path` system property.
> As far as I can see it from the log, the value of `java.library.path` 
> contains `app` dir - 
> `/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app`. So 
> it works as expected.
> Are you sure the native library is in place?
> 
> - Alexey
> 

I missed that it was there somehow, but…

ls outputdir/HalfPipe.app/Contents/app | grep dylib
libAppleScriptEngine.dylib
libBSF4ooRexx.dylib
libfscript.dylib
libhp.dylib
libmacattrs.dylib

Also overriding 
-Djava.library.path=$APPDIR
worked. So I didn’t look too closely. 
So what am I still missing?
;/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app:/Users/mjh/Library/Java/Extensions:
Inconsistent path separators?

Re: jpackage OS/X JDK-8263157 fix regressed out

2021-07-22 Thread Alexey Semenyuk
The fix for JDK-8263157 cleared the default value of `java.library.path` 
system property and resulted in JDK-8267598 regression. So the fix for 
JDK-8263157 was reworked: jpackage doesn't set `java.library.path` 
system property, but it adds `app` directory to `DYLD_LIBRARY_PATH` env 
variable on OSX. OSX JVM startup code builds the value of 
`java.library.path` system property from the value of 
`DYLD_LIBRARY_PATH` env variable. This way jpackage doesn't interfere 
with the default JVM initialization code and also adds `app`  directory 
to `java.library.path` system property.
As far as I can see it from the log, the value of `java.library.path` 
contains `app` dir - 
`/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app`. 
So it works as expected.

Are you sure the native library is in place?

- Alexey

On 7/22/2021 10:01 AM, Michael Hall wrote:

JDK-8263157  [macos]: 
java.library.path is being set incorrectly

The fix for this seems to be gone in both current jdk17 and jdk18 releases. 
There is no ‘app’ directory included in java.library.path.

outputdir/HalfPipe.app/Contents/runtime/Contents/Home/bin/java -version
openjdk version "18-ea" 2022-03-15
OpenJDK Runtime Environment (build 18-ea+6-237)
OpenJDK 64-Bit Server VM (build 18-ea+6-237, mixed mode)

outputdir/HalfPipe.app/Contents/MacOS/HalfPipe
Exception in thread "main" java.lang.UnsatisfiedLinkError: no hp in 
java.library.path: 
/opt/ooRexx/lib/ooRexx;/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app:/Users/mjh/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
at java.base/java.lang.System.loadLibrary(Unknown Source)
at us.hall.hp.common.LoaderLaunchStub.(LoaderLaunchStub.java:35)
Failed to launch JVM