Sub Initialize
If hc.IsInitialized = False Then
TempFolder = File.DirTemp
Dim jo As JavaObject = hc
Dim proxy, socketAddress As JavaObject
socketAddress.InitializeNewInstance("java.net.InetSocketAddress", Array (Main.Ho, Main.Po))
proxy.InitializeNewInstance("java.net.Proxy", Array ("HTTP", socketAddress))
Dim builder As JavaObject = jo.RunMethod("sharedInit", Array("hc"))
builder.RunMethod("proxy", Array(proxy)) '<---- fixed!!!
jo.SetField("client", builder.RunMethod("build", Null))
TaskIdToJob.Initialize
End If
End Sub