Skip to content

Commit 2d3d839

Browse files
dkocherAliveDevil
authored andcommitted
Set library.jansi.path for loading native library.
1 parent 1538858 commit 2d3d839

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

cli/osx/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<property name="app.runtime.archs" value="'x86_64 arm64'"/>
2424
<property name="app.runtime.system.min" value="10.13"/>
2525
<property name="jvm.runtime.args"
26-
value="-client --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED -Djava.library.path=$APP_PACKAGE/Contents/Frameworks -Djna.boot.library.path=$APP_PACKAGE/Contents/Frameworks -Djna.library.path=$APP_PACKAGE/Contents/Frameworks -Djna.nounpack=true -Djava.awt.headless=true -Dsun.jnu.encoding=utf-8 -Dfile.encoding=utf-8 -Dsun.io.useCanonCaches=false -DLog4jContextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -XX:+UseG1GC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:+UseStringDeduplication"/>
26+
value="-client --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED -Djava.library.path=$APP_PACKAGE/Contents/Frameworks -Dlibrary.jansi.path=$APP_PACKAGE/Contents/Frameworks -Djna.boot.library.path=$APP_PACKAGE/Contents/Frameworks -Djna.library.path=$APP_PACKAGE/Contents/Frameworks -Djna.nounpack=true -Djava.awt.headless=true -Dsun.jnu.encoding=utf-8 -Dfile.encoding=utf-8 -Dsun.io.useCanonCaches=false -DLog4jContextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -XX:+UseG1GC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:+UseStringDeduplication"/>
2727

2828
<condition property="jvm.runtime.debug"
2929
value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 ">

cli/src/main/csharp/ch/cyberduck/cli/WindowsTerminalPreferences.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
1717
//
1818

19+
using System;
1920
using ch.cyberduck.cli;
2021
using ch.cyberduck.core.cryptomator;
2122
using ch.cyberduck.core.serviceloader;
@@ -28,6 +29,7 @@
2829
using Ch.Cyberduck.Core.Proxy;
2930
using java.security;
3031
using sun.security.mscapi;
32+
using JavaSystem = java.lang.System;
3133

3234
namespace Ch.Cyberduck.Cli
3335
{
@@ -48,6 +50,8 @@ protected override void setDefaults()
4850
{
4951
base.setDefaults();
5052

53+
JavaSystem.setProperty("library.jansi.path", AppContext.BaseDirectory);
54+
5155
this.setDefault("application.language", "en");
5256

5357
Security.addProvider(new SunMSCAPI());

core/src/main/csharp/ch/cyberduck/core/preferences/ApplicationPreferences.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ public ApplicationPreferences(Locales locales, IPropertyStoreFactory propertySto
4545
this.locales = locales;
4646
SetEnvironmentInfo();
4747
this.propertyStore = propertyStore.New();
48-
49-
JavaSystem.setProperty("jna.boot.library.path", AppContext.BaseDirectory);
5048
}
5149

5250
public override List applicationLocales() => locales.applicationLocales();
@@ -145,6 +143,8 @@ protected override void setDefaults()
145143
{
146144
base.setDefaults();
147145

146+
JavaSystem.setProperty("jna.boot.library.path", AppContext.BaseDirectory);
147+
148148
this.setDefault("os.version", Environment.OSVersion.Version.ToString());
149149

150150
this.setDefault("oauth.handler.scheme",

0 commit comments

Comments
 (0)