Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
java-jni-test
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
java-jni-test
Commits
41c2577d
Commit
41c2577d
authored
Sep 07, 2017
by
fangzhipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试改成dylib后缀名称
parent
558cafc3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
lib/libJAVA_JNI3.dylib
lib/libJAVA_JNI3.dylib
+0
-0
lib/libhello.dylib
lib/libhello.dylib
+0
-0
src/main/java/com/paul0523/HelloWorld.java
src/main/java/com/paul0523/HelloWorld.java
+3
-1
No files found.
lib/libJAVA_JNI3.dylib
0 → 100755
View file @
41c2577d
File added
lib/libhello.
jni
lib
→
lib/libhello.
dy
lib
View file @
41c2577d
File moved
src/main/java/com/paul0523/HelloWorld.java
View file @
41c2577d
...
...
@@ -11,7 +11,7 @@ public class HelloWorld{
//设置查找路径为当前项目路径,注意直接设置java.library.path属性无效
addDir
(
"/Users/fangzhipeng/Documents/workspace-idea/java-jni-test/lib"
);
//加载动态库的名称
System
.
loadLibrary
(
"
hello
"
);
System
.
loadLibrary
(
"
JAVA_JNI3
"
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -19,7 +19,9 @@ public class HelloWorld{
}
public
static
void
main
(
String
[]
args
){
long
time
=
System
.
currentTimeMillis
();
new
HelloWorld
().
hello
();
System
.
out
.
println
((
System
.
currentTimeMillis
()
-
time
));
}
public
static
void
addDir
(
String
s
)
throws
IOException
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment