Skip to content

Java "Hello Bot"

This tutorial will guide you through the process of creating a simple Java automation.


Creating Your First Project

BotCity offers a template project which includes all dependencies, provides scripts and a source code skeleton. A template is available on Github. Just clone the project in the folder you want to have the source code of your bot:

git clone

This template is a Maven Java project that you can import in any IDE.

Import on Eclipse

If you are using Eclipse, just click on File and Import:

Java Desktop Import

Choose Maven → Existing Maven Projects:

Java Desktop Import Maven

Click on Next

Set the Root Directory to your template bot path, press enter and select /pom.xml:

Java Desktop Import Root

Click on Finish.

Installing the Dependencies

BotCity frameworks are available as Java dependencies in the Nexus repository.

The dependencies will be installed automatically based on the pom.xml configuration.

In the pom.xml of the created project, you will find a configuration similar to this:


    <!-- Your other dependencies -->



Updating the Project Dependencies

In order to update dependencies recently installed on your local repository, open project menu and select Maven → Update Project:

Java Desktop Maven Update

Exploring the Project

├──   <- Simple README file for your bot Project
├── build.bat   <- Batch script to generate the JAR package
├──    <- Shell script to generate the JAR package
├── pom.xml     <- Maven project file for your bot
└── src
    └── main
        └── java
            └── dev
                └── botcity
                    └── main
                        └── <- Here is where you will develop
                                             your bot code.

Testing Your Project Locally is a bot skeleton providing the basic methods.

Run this class as a Java application and the BotCity website will be opened in your browser.

Here is a screenshot of the expected result: Java Desktop Result

🌟 Excellent 🌟

You are now ready to start creating automations using the BotCity’s Java Framework.


Under this tutorial you learned:

  • The dependencies required to develop automations using BotCity’s Java framework and how to get them installed.

  • How to create new Bot projects using BotCity’s template.

  • How to install and run your new Bot project locally.

Have fun automating 🤖

Next Steps

Now it is time to load your project with BotCity Studio and start creating your automations with Computer Vision and all the productivity offered by our tool.