File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ include("convert.jl")
29
29
include (" reflect.jl" )
30
30
31
31
function __init__ ()
32
+ if VERSION ≥ v " 1.1-" && VERSION < v " 1.3-"
33
+ @warn (" JavaCall does not work correctly on Julia v$VERSION . \n " *
34
+ " Either use Julia v1.0.x, or v1.3.0 or higher.\n " *
35
+ " For 1.3 onwards, please also set the environment variable `JULIA_COPY_STACKS` to be `1` or `yes`" )
36
+ end
37
+ if VERSION ≥ v " 1.3-" && get (ENV , " JULIA_COPY_STACKS" , " " ) ∉ (" 1" , " yes" )
38
+ @warn (" JavaCall needs the environment variable `JULIA_COPY_STACKS` to be `1` or `yes`. " *
39
+ " Calling the JVM may result in undefined behavior." )
40
+ end
32
41
findjvm ()
33
42
global create = Libdl. dlsym (libjvm, :JNI_CreateJavaVM )
34
43
end
Original file line number Diff line number Diff line change 152
152
addOpts (s:: String ) = isloaded () ? @warn (" JVM already initialised. This call has no effect" ) : push! (opts, s)
153
153
154
154
function init ()
155
- if VERSION ≥ v " 1.3" && get (ENV , " JULIA_COPY_STACKS" , " " ) ∉ (" 1" , " yes" )
156
- @warn (" JavaCall needs the environment variable `JULIA_COPY_STACKS` to be `1` or `yes`. " *
157
- " Calling the JVM may result in undefined behavior." )
158
- end
159
155
if isempty (cp)
160
156
init (opts)
161
157
else
You can’t perform that action at this time.
0 commit comments