Skip to content

Commit 40bcc4a

Browse files
committed
Merge pull request kohsuke#51 from salmito/patch-1
Fixed loading native library in Java 8
2 parents dccf1fd + 87f012c commit 40bcc4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/src/main/java/com4j/COM4J.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ private static void loadNativeLibrary() {
545545
final String fileName = "com4j-" + System.getProperty("os.arch") + ".dll";
546546

547547
// try loading com4j.dll in the same directory as com4j.jar
548-
URL res = COM4J.class.getClassLoader().getResource("com4j/COM4J.class");
548+
URL res = COM4J.class.getResource("/com4j/COM4J.class");
549549
String url = res.toExternalForm();
550550
if(url.startsWith("jar:")) {
551551
int idx = url.lastIndexOf('!');

0 commit comments

Comments
 (0)