Maximum size for a sikuli file? --- generated byte code max 64K

Asked by Rosen

When I compiled and ran a large sikuli file, the script was stopped, and the error message said: java.lang.ClassFormatError: Invalid method Code length 66272 in class file org/python/pycode/_pyx438. I found that if the code length was smaller that 65536 bytes, this problem doesn't exist.

If the maximum size limit is true, is there a way to solve this issue without having to divide the code into different files?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

--1. the limit of 64K for the file size of generated byte code in the Jython/Java environment is fixed with the current environment (Jython 2.5.2/Java 6).

--2. When reducing the file size by refactoring does not bring you under the limit, you have to split the file into smaller pieces. Which should not be very complicated with Sikuli's support for import.
If import for some reason is not suitable, you might try execfile().

Revision history for this message
Rosen (rosenhu555) said :
#2

OK, thanks!