From b5a02ef03958a36cdac81a198824970266ea64bb Mon Sep 17 00:00:00 2001 From: hankcs Date: Sat, 29 Sep 2018 12:42:09 -0400 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=9A=E8=BF=87JVM?= =?UTF-8?q?=E7=9A=84=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0=E6=8C=87=E5=AE=9A?= =?UTF-8?q?data=E8=B7=AF=E5=BE=84=EF=BC=9Ajava=20-DHANLP=5FROOT=3D/opt/han?= =?UTF-8?q?lp=20=E5=88=99=E5=8A=A0=E8=BD=BD/opt/hanlp/data=20https://githu?= =?UTF-8?q?b.com/hankcs/HanLP/issues/983?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/hankcs/hanlp/HanLP.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hankcs/hanlp/HanLP.java b/src/main/java/com/hankcs/hanlp/HanLP.java index ec48b1e9e..d94b7c25d 100644 --- a/src/main/java/com/hankcs/hanlp/HanLP.java +++ b/src/main/java/com/hankcs/hanlp/HanLP.java @@ -229,7 +229,8 @@ public static final class Config } catch (Exception e) { - String HANLP_ROOT = System.getenv("HANLP_ROOT"); + String HANLP_ROOT = System.getProperty("HANLP_ROOT"); + if (HANLP_ROOT == null) HANLP_ROOT = System.getenv("HANLP_ROOT"); if (HANLP_ROOT != null) { HANLP_ROOT = HANLP_ROOT.trim();