Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BraillePlot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Georg Graßnick
BraillePlot
Commits
92cbcb7e
Commit
92cbcb7e
authored
5 years ago
by
Georg Graßnick
Browse files
Options
Downloads
Patches
Plain Diff
Do not add JNI path if it already exists
parent
a5cc58cb
No related branches found
Branches containing commit
No related tags found
1 merge request
!35
Feat/libluis bin
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/tudresden/inf/mci/brailleplot/util/NativeLibraryHelper.java
+15
-3
15 additions, 3 deletions
...dresden/inf/mci/brailleplot/util/NativeLibraryHelper.java
with
15 additions
and
3 deletions
src/main/java/de/tudresden/inf/mci/brailleplot/util/NativeLibraryHelper.java
+
15
−
3
View file @
92cbcb7e
...
...
@@ -43,16 +43,28 @@ public final class NativeLibraryHelper {
* @param path The path to add.
*/
private
static
synchronized
void
registerNewSystemLibPath
(
final
String
path
)
{
// TODO Check if path is already included and abort, if so
String
currentLibPath
=
System
.
getProperty
(
"jna.library.path"
);
String
newLibPath
=
null
;
boolean
pathExists
=
false
;
if
(
currentLibPath
==
null
)
{
newLibPath
=
path
;
}
else
{
// Do not insert path if it already is included
String
[]
existingPaths
=
currentLibPath
.
split
(
File
.
pathSeparator
);
for
(
String
s
:
existingPaths
)
{
if
(
s
.
equals
(
path
))
{
pathExists
=
true
;
break
;
}
}
newLibPath
=
currentLibPath
+
File
.
pathSeparator
+
path
;
}
LOG
.
debug
(
"Setting JNI library path property to \""
+
newLibPath
+
"\""
);
System
.
setProperty
(
"jna.library.path"
,
newLibPath
);
if
(!
pathExists
)
{
LOG
.
debug
(
"Setting JNI library path property to \""
+
newLibPath
+
"\""
);
System
.
setProperty
(
"jna.library.path"
,
newLibPath
);
}
}
private
static
String
calculateLibPath
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment