Java10 [error] RunTimeINIT: *** Java 8+: skipped: addToClasspath()

Asked by masuo on 2018-05-21

I tried Java10 , [error] RunTimeINIT occured.

Windows10 Home
java version "10.0.1" 2018-04-17
SikuliX 1.1.3(2018-04-08_20:40)

[Details: when run runsikulix.cmd-----------------------------------------]
+++ running this Java
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
+++ trying to run SikuliX
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar C:\SikuliX1.1.3\sikulix.jar
[error] RunTimeINIT: *** BE AWARE: Running on Java 8+ *** Please report problems ***
[error] RunTimeINIT: *** Java 8+: skipped: storeClassPath()
[error] RunTimeINIT: *** Java 8+: skipped: storeClassPath()
[error] RunTimeINIT: *** Java 8+: skipped: addToClasspath() - caller: RunTime.libsExport IDE
[info] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[info] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/C:/SikuliX1.1.3/sikulix.jar) to method
WARNING: Please consider reporting this to the maintainers of org.python.core.PySystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

[Details: When load("C:\selenium\32bit\selenium-server-standalone-2.45.0.jar")---------------]
[error] RunTimeIDE: *** Java 8+: skipped: addToClasspath() - caller: JythonHelper.load
[error] JythonSupport: load: not possible: C:\selenium\32bit\selenium-server-standalone-2.45.0.jar

[error] script [ Selenium_capture ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\script\Selenium_capture.sikuli\", line 102, in <module> IE() File "C:\script\Selenium_capture.sikuli\", line 11, in IE import org.openqa.selenium.remote as REMOTE ImportError: No module named remote

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Best RaiMan (raimund-hocke) said : #1

Beginning with Java 9, any internal manipulation of the classpath at runtime is no longer possible in the way it is implemented currently. I do not have a solution for this yet.

As a workaround you have to take care yourself, that jars needed at runtime are already on the Java classpath before starting your stuff, since the load() cannot be used for that any longer.

masuo (masuo-ohara) said : #2

Thanks RaiMan, that solved my question.

masuo (masuo-ohara) said : #3

I confermed to be able to use sikulix.jar with selenium-server-standalone-2.53.1.jar on java10 environment.

create an external jar folder named "extjar" on local drive C:\.
save selenium-server-standalone-2.53.1.jar and bsf-2.4.jar in extjar.
add option "--module-path C:\extjar" to runsikulix.cmd.

java %PARMS% --module-path C:\extjar -jar "%SIKULIX_HOME%%SJAR%.jar" %SIKULI_COMMAND%