JavaCall first time


#1

I’m trying to get JavaCall set up.

My java_home is “C:/Program Files/Java/jre1.8.0_151”.
I tried changing it to “C:/Program Files (x86)/Java/jre1.8.0_151” to no avail.

julia> JavaCall.init(["-Xmx4g"])
Unable to initialise Java VM: -5
init(::Array{String,1}) at jvm.jl:171
include_string(::String, ::String) at loading.jl:522
include_string(::String, ::String, ::Int64) at eval.jl:30
include_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34
(::Atom.##100#105{String,Int64,String})() at eval.jl:75
withpath(::Atom.##100#105{String,Int64,String}, ::Void) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:60
macro expansion at eval.jl:73 [inlined]
(::Atom.##98#103{Dict{String,Any}})() at task.jl:80

#2

This looks like a problem with JavaCall finding the JVM. The documentation says something about using “WinReg” on windows to detect this automatically. Does this ring any bells? @avik may know more.


#3

Restarting Julia worked…