This commit is contained in:
parent
d177fe5398
commit
186b2bd681
@ -505,6 +505,8 @@ public class AseAwkPanel extends Panel implements DropTargetListener
|
|||||||
|
|
||||||
public void prepareNativeInterface ()
|
public void prepareNativeInterface ()
|
||||||
{
|
{
|
||||||
|
String libBase = "aseawk_jni";
|
||||||
|
|
||||||
String osname = System.getProperty ("os.name").toLowerCase();
|
String osname = System.getProperty ("os.name").toLowerCase();
|
||||||
String osarch = System.getProperty("os.arch").toLowerCase();
|
String osarch = System.getProperty("os.arch").toLowerCase();
|
||||||
String userHome = System.getProperty("user.home");
|
String userHome = System.getProperty("user.home");
|
||||||
@ -515,6 +517,20 @@ public class AseAwkPanel extends Panel implements DropTargetListener
|
|||||||
|
|
||||||
URL url = this.getClass().getResource (
|
URL url = this.getClass().getResource (
|
||||||
this.getClass().getName() + ".class");
|
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 ();
|
String protocol = url.getProtocol ();
|
||||||
|
|
||||||
boolean isHttp = url.getPath().startsWith ("http://");
|
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);
|
/*if (isHttp)*/ base = java.net.URLDecoder.decode (base);
|
||||||
|
|
||||||
String libBase = "aseawk_jni";
|
|
||||||
if (isHttp) libBase = libBase + "-" + osname + "-" + osarch;
|
if (isHttp) libBase = libBase + "-" + osname + "-" + osarch;
|
||||||
String libName = System.mapLibraryName(libBase);
|
String libName = System.mapLibraryName(libBase);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user