From 186b2bd6815c11419efa35794254506ce4accdfd Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 11 Dec 2007 03:11:14 +0000 Subject: [PATCH] --- ase/test/awk/AseAwkPanel.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ase/test/awk/AseAwkPanel.java b/ase/test/awk/AseAwkPanel.java index 896e1c8d..0b5c1a50 100644 --- a/ase/test/awk/AseAwkPanel.java +++ b/ase/test/awk/AseAwkPanel.java @@ -505,6 +505,8 @@ public class AseAwkPanel extends Panel implements DropTargetListener public void prepareNativeInterface () { + String libBase = "aseawk_jni"; + String osname = System.getProperty ("os.name").toLowerCase(); String osarch = System.getProperty("os.arch").toLowerCase(); String userHome = System.getProperty("user.home"); @@ -515,6 +517,20 @@ public class AseAwkPanel extends Panel implements DropTargetListener URL url = this.getClass().getResource ( this.getClass().getName() + ".class"); + if (url == null) + { + if (osname.equals("win")) + { + jniLib.setText(System.getProperty("user.dir") + "\\lib\\" + System.mapLibraryName(libBase)); + } + else + { + jniLib.setText(System.getProperty("user.dir") + "/lib/.libs/" + System.mapLibraryName(libBase)); + } + + return; + } + String protocol = url.getProtocol (); boolean isHttp = url.getPath().startsWith ("http://"); @@ -526,7 +542,6 @@ public class AseAwkPanel extends Panel implements DropTargetListener /*if (isHttp)*/ base = java.net.URLDecoder.decode (base); - String libBase = "aseawk_jni"; if (isHttp) libBase = libBase + "-" + osname + "-" + osarch; String libName = System.mapLibraryName(libBase);