[1.0 tempFix] Windows: sikuli-script.cmd: no class def found error --- workaround

Bug #1182870 reported by obiwan-92 on 2013-05-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

**** fixed in 1.1.0
the command file to use now is runsikulix.cmd


**** bug sikuli-script.cmd: happens on Java 6 only installations.

WORKAROUND: use the following command to run your script:

<... path ...>\sikuli-script.cmd -j6 -r <... path to your script ...>.sikuli

a fixed version is in the "Sikuli-1.0.0-SupplementalStuff"


I try to launch a Sikuli Script with the command line.
It doesn't work.

I use the 1.0.0 version of Sikuli with Java 1.6 and I try to launch my script with "sikuli-script.cmd".
My command in Windows CMD is >> "%SIKULI_HOME%sikuli-script.cmd" -r d:\Sikuli\script_test.sikuli

The error returned is :
-Xms64M -Xmx512M -Dfile.encoding=UTF-8
-r d:\Sikuli\Skl_PCC_Wrapper.sikuli
+++ using as SIKULIX_HOME: C:\Program Files\Sikuli\
+++ this Sikuli version is 32-Bit
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
+++ trying to start Sikuli Script
Exception in thread "main" java.lang.NoClassDefFoundError: org/sikuli/script/SikuliScript
Caused by: java.lang.ClassNotFoundException: org.sikuli.script.SikuliScript
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.sikuli.script.SikuliScript . Program will exit.

The command <<"%SIKULI_HOME%sikuli-script.cmd" -i>> doesn't work either with the same error return.
Maybe I have made ​​a mistake

obiwan-92 (obiwan-92) wrote :

I have made a mistake, it need '-j6' in parameters.
Sorry, it's resolved.

Changed in sikuli:
status: New → Invalid
RaiMan (raimund-hocke) on 2013-05-22
summary: - Problem to launch script in command line for Win32
+ [1.0] Windows: sikuli-script.cmd: no class def found error --- use -j6
+ as parameter
description: updated

No not really your mistake.

In your installation with only Java 6, using -j6 should not be necessary (its a bug, thanks for finding and finding the workaround).

RaiMan (raimund-hocke) on 2013-05-22
description: updated
RaiMan (raimund-hocke) on 2013-05-22
Changed in sikuli:
status: Invalid → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
summary: - [1.0] Windows: sikuli-script.cmd: no class def found error --- use -j6
- as parameter
+ [1.0 tempFix] Windows: sikuli-script.cmd: no class def found error ---
+ workaround
RaiMan (raimund-hocke) on 2013-06-09
Changed in sikuli:
milestone: none → 1.1.0
tags: added: scriptrun
RaiMan (raimund-hocke) on 2015-09-17
Changed in sikuli:
importance: High → Critical
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers