Getting Started with TotalCross using IntelliJ IDE

How to configure TotalCross to run in IntelliJ IDE and run your first Hello World application.

Diego Carrillo
TotalCross Community
Oct 15, 2020

--

Getting Started with TotalCross using IntelliJ IDE: Importing a HelloWorld Maven Project

Please make sure that your IntelliJ IDE is updated

Clone the HelloWorld repository

Step 1: Clone or download this repository containing a TotalCross HelloWorld application

Import and run the project from IntelliJ IDE

Step 1: Open the IntelliJ IDE. From the starting page, select Open or Import and open the folder where your HelloWorld repository is located. Open it as a maven project.

Step 2: To run your application at the TotalCross simulator, expand HelloWorld/src/main/java at the Project tab, then expand com.totalcross, right-click the RunHelloWordApplication file and choose Run 'RunHelloApplication.main()'. The TotalCross simulator will open with your brand new application.

Package your application

Step 1: Open IntelliJ’s maven extension, right-click the option Lifecycle > package and choose Run Maven Build

Step 2: Maven will resolve all the dependencies that you need and build your application for the platforms configured at the pom.xml file. This project is configured by default to build to Android, Linux (x86), and Linux_arm targets. Fell free to remove platforms you don’t want and maybe add others such as iOS or Windows. The generated folders will be located inside your repository at target/install/<platform>. You can deploy a folder of any platform directly to your target and run you application anywhere!

You’re now ready to create your first project with TotalCross!

--

--

TotalCross Community
TotalCross Community

Published in TotalCross Community

Focused on publishing articles and tutorials about cross-platform software development ( Embedded systems, Android, iOS, and others) using TotalCross Java framework.

Diego Carrillo
Diego Carrillo