Katalon 8 CustomKeywords.groovy import error

OS: Windows 10
Katalon version: 8.0.1 and 8.1.0

In my project, we have a custom keyword ExtractContent(Message msg). In the CustomKeywords.groovy file, it is declared as follows:

def static “utilities.Email.ExtractContent”(
Message msg ) {
(new utilities.Email()).ExtractContent(

In Katalon 7.9.1, this works perfectly fine, because Katalon adds an import for javax.mail.Message. However, Katalon 8.0.1 and 8.1.0 remove this import, and then give the following error:

I checked the CustomKeywords.groovy file, and Katalon 8.0.1 and 8.1.0 do not include the import for javax.mail.Message (and they remove it when it is added manually). The correct behaviour would be to add this import, as version 7.9.1 does.

Edit: it might be worth mentioning that all of this project has been done in Katalon 7.9.1. We came across this issue when a new coworker opened this project in Katalon 8.1.0

Hi @stefane,

Katalon Studio already replaced embedded Oracle JRE 8 with Azul Zulu OpenJDK 8.
So you should add the below external library in Library Management to make it works: https://mvnrepository.com/artifact/com.sun.mail/javax.mail/1.6.2.

Thanks for your information,
Nam Nguyen.

1 Like