Why do I see the error message "Code too Large" when compiling my Java script?
If you have created a large Java recording and are attempting to compile the script you may see the following error: "code too large public void tMain() throws Exception"
The most likely reason for this is a bytecode limitation in Java. Java has a maximum of 64K bytecode instructions per method.
There are two options to overcome this issue:
- Edit your script by breaking it up into functions and then call these functions from within TMain().
- Re-record your script. During the record process you should break the script up into smaller transactions by using the Recorder button "New Transaction".
Either of the above options will ensure that the 64K bytecode per method limitation is not met.