Skip to content

Commit 979d825

Browse files
committed
Need to preserve order of classpath. Depend on DataStructures
1 parent d5f08af commit 979d825

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
julia 0.4
22
Compat 0.8.6
3+
DataStructures
34
@windows WinReg

src/JavaCall.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export JavaObject, JavaMetaClass,
88
using Base.Dates
99
using Compat
1010
import Compat.String
11+
import DataStructures: OrderedSet
1112

1213
@static if is_windows()
1314
using WinReg

src/jvm.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ end
121121

122122
@static is_unix() ? (const sep = ":") : nothing
123123
@static is_windows() ? (const sep = ";") : nothing
124-
cp=Set{String}()
125-
opts=Set{String}()
124+
cp=OrderedSet{String}()
125+
opts=OrderedSet{String}()
126126

127127
function addClassPath(s::String)
128128
if isloaded()
@@ -148,7 +148,8 @@ function init()
148148
if isempty(cp)
149149
init(opts)
150150
else
151-
init(vcat(collect(opts), reduce((x,y)->string(x,sep,y),"-Djava.class.path=$(collect(cp)[1])",collect(cp)[2:end])))
151+
ccp = collect(cp)
152+
init(vcat(collect(opts), reduce((x,y)->string(x,sep,y),"-Djava.class.path=$(ccp[1])",ccp[2:end])))
152153
end
153154
end
154155

0 commit comments

Comments
 (0)