# How to add Java files to Katalon studio or change the prefered language to java

**URL:** <https://forum.katalon.com/t/how-to-add-java-files-to-katalon-studio-or-change-the-prefered-language-to-java/6004>\
**Category:** Miscellaneous\
**Tags:** integrations\
**Created:** [June 29, 2017, 2:45pm UTC](https://forum.katalon.com/t/how-to-add-java-files-to-katalon-studio-or-change-the-prefered-language-to-java/6004 "2017-06-29T14:45:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deane](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Deane](https://forum.katalon.com/u/Deane)\
**Post date:** [June 29, 2017, 2:45pm UTC](https://forum.katalon.com/t/how-to-add-java-files-to-katalon-studio-or-change-the-prefered-language-to-java/6004/1 "2017-06-29T14:45:41Z")

</div>

Hi

Is it possible to change the language preference in Katalon studio from groovy to java?

Im using some methods from the twitter4j library and one of the methods use a do…while and groovy does not support this hence why the question is being asked.

Thank you.

---

<div class="post-metadata">

**Author:** ![Ashwary\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Ashwary\_Soni](https://forum.katalon.com/u/Ashwary_Soni)\
**Post date:** [August 8, 2017, 1:16pm UTC](https://forum.katalon.com/t/how-to-add-java-files-to-katalon-studio-or-change-the-prefered-language-to-java/6004/2 "2017-08-08T13:16:31Z")

</div>

I only got the answer for this…we just need to copy any paste the import files.

Ex:-import java.util.concurrent.TimeUnit;  
import org.openqa.selenium.By;  
import org.openqa.selenium.WebDriver;  
import org.openqa.selenium.WebElement;  
import org.openqa.selenium.chrome.ChromeDriver;  
import org.openqa.selenium.edge.EdgeDriver;  
import org.openqa.selenium.firefox.FirefoxDriver;  
import org.testng.annotations.BeforeTest;  
import org.testng.annotations.Parameters;  
import org.testng.annotations.Test;

like this i have added all the libraries and it is working.

---

<div class="post-metadata">

**Author:** ![Ashwary\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Ashwary\_Soni](https://forum.katalon.com/u/Ashwary_Soni)\
**Post date:** [August 8, 2017, 1:08pm UTC](https://forum.katalon.com/t/how-to-add-java-files-to-katalon-studio-or-change-the-prefered-language-to-java/6004/3 "2017-08-08T13:08:12Z")

</div>

You said that katalon can work with Java also ,then how to add the library ???

---

<div class="post-metadata">

**Author:** ![Hieu\_Mai](https://avatars.discourse-cdn.com/v4/letter/h/71e660/32.png) [@Hieu\_Mai](https://forum.katalon.com/u/Hieu_Mai)\
**Post date:** [July 3, 2017, 9:08am UTC](https://forum.katalon.com/t/how-to-add-java-files-to-katalon-studio-or-change-the-prefered-language-to-java/6004/4 "2017-07-03T09:08:56Z")

</div>

Hi there,

I don’t think you can change the internal library of Katalon Studio to Java.

And you’re right about Groovy not supporting do while method.

However, Groovy do support while method, and I believe that you can always convert a do while loop to a while loop.

You can try to convert your code to use a while loop or post your code here so that I can help you do it.
