Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
bc1ed3a1
Commit
bc1ed3a1
authored
Nov 16, 2015
by
Jacob Potter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support lib: target Java 7, not 8
parent
946e0ac5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
support-lib/java/com/dropbox/djinni/NativeLibLoader.java
support-lib/java/com/dropbox/djinni/NativeLibLoader.java
+11
-8
test-suite/java/build.xml
test-suite/java/build.xml
+1
-1
No files found.
support-lib/java/com/dropbox/djinni/NativeLibLoader.java
View file @
bc1ed3a1
...
...
@@ -21,6 +21,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.net.URISyntaxException
;
import
java.net.URL
;
import
java.nio.file.DirectoryStream
;
import
java.nio.file.FileSystem
;
import
java.nio.file.FileSystems
;
import
java.nio.file.Files
;
...
...
@@ -30,7 +31,6 @@ import java.nio.file.StandardCopyOption;
import
java.util.Collections
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
java.util.stream.Stream
;
/**
* Utilities for loading native libraries containing djinni interfaces
...
...
@@ -88,14 +88,11 @@ public class NativeLibLoader {
if
(!
localFile
.
exists
())
{
return
;
}
if
(
localFile
.
isDirectory
())
{
log
.
log
(
Level
.
FINE
,
"Loading all libs in "
+
localFile
.
getAbsolutePath
());
Stream
<
Path
>
streamPaths
=
Files
.
walk
(
localFile
.
toPath
(),
1
);
for
(
Path
p
:
(
Iterable
<
Path
>)
streamPaths:
:
iterator
)
{
File
f
=
p
.
toFile
();
for
(
File
f
:
localFile
.
listFiles
())
{
if
(
f
.
isFile
())
{
loadLibrary
(
f
.
getAbsolutePath
());
}
}
streamPaths
.
close
();
}
else
{
loadLibrary
(
localFile
.
getAbsolutePath
());
}
...
...
@@ -119,11 +116,17 @@ public class NativeLibLoader {
// Walk the directory and load libs
FileSystem
fs
=
FileSystems
.
newFileSystem
(
libsURL
.
toURI
(),
Collections
.
emptyMap
());
FileSystems
.
newFileSystem
(
libsURL
.
toURI
(),
Collections
.
<
String
,
String
>
emptyMap
());
Path
myPath
=
fs
.
getPath
(
jarPath
);
for
(
Path
p
:
(
Iterable
<
Path
>)
Files
.
walk
(
myPath
,
1
)::
iterator
)
{
DirectoryStream
<
Path
>
directoryStream
=
Files
.
newDirectoryStream
(
myPath
);
try
{
for
(
Path
p
:
directoryStream
)
{
loadLibFromJarPath
(
p
);
}
}
finally
{
directoryStream
.
close
();
}
fs
.
close
();
}
...
...
test-suite/java/build.xml
View file @
bc1ed3a1
...
...
@@ -35,7 +35,7 @@
<arg
value=
"install"
/>
</exec>
<mkdir
dir=
"build/classes"
/>
<javac
destdir=
"build/classes"
includeantruntime=
"false"
encoding=
"UTF-8"
debug=
"on"
>
<javac
destdir=
"build/classes"
includeantruntime=
"false"
encoding=
"UTF-8"
debug=
"on"
target=
"1.7"
source=
"1.7"
>
<classpath>
<fileset
dir=
"../../deps/java/"
><include
name=
"*.jar"
/></fileset>
<fileset
dir=
"../../deps/java/test"
><include
name=
"*.jar"
/></fileset>
...
...
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