DEV Community

Cover image for TotalCross: A Powerful Cross-Platform Development Technology
Oderlan Freire
Oderlan Freire

Posted on

TotalCross: A Powerful Cross-Platform Development Technology

I decided to make this article based on my first few contacts with TotalCross technology. It was something totally new and exciting for me, as I believe it is for all developers, to be able to manipulate a new, robust and powerful technology. In this article I will talk about what TotalCross is, how it works and about TotalCross in VS Code.

What is TotalCross?

TotalCross is a Java based cross-platform SDK technology, aiming to make life easier for the developer or even the common user.It has a very low footprint, taking up a small amount of space on your device, less than 5MB in fact. Being cross-platform, the developer only needs to worry about learning the basics of Java and the TotalCross library to be able to run the program on embedded systems, Windows, Linux, Mac, IOS and Android. It has the same performance with all systems, and doesn't risk changes to the program or how it will behave regardless of the platform.

How it works?

The developer uses the Java language to develop the program code and compile it to generate the Java bytecode. TCVM converts this Java bytecode to TC bytecode, therefore giving a performance boost that is characteristic of TotalCross, thus packaging and distributing it to the desired platform.

TotalCross on VSCode

Starting to developing TotalCross on VSCode is quite simple, just install the TotalCross plugin from VSCode's own marketplace. It is important to know that for the plugin to run well, it is necessary to have JDK11 and Maven installed on your machine.

Creating a project:

After installing JDK11, Maven and the plugin, it's time to start the first project.
Open your VSCode, when the welcome screen appears, press "Ctrl + Shift + P" to open the command palette, type TotalCross and 4 options will appear to you, click Create New Project.
Create Project
When the file explorer opens, select or create the folder where you want to store the project. You can use a folder in any location, however, I would recommend creating it in the "Documents" directory for better organization.
Folder Selection
When you select the folder, the VScode will ask you to enter the GroupId, which is basically the company or user ID. The following format should be used, ".com.company_name/user". For example com.totalcross.
Project ID
Right after that, it will ask the user to give the program a name:
Project Name
The next step is to choose the version of the TotalCross SDK, I recommend choosing the most recent one.
versao TC
Select which platform you want to develop the code for, then press enter or click OK:
Devices
Next, VSCode will automatically download a HelloWorld template for you to modify and start developing your program.
Hello World  Example

How to run the code:

Right-click on the file named RunApplication.java and click on the option Run Java.
Run
VSCode will import, compile and run the Java project, creating the application window:
App

Conclusion:

I hope you enjoyed this article about TotalCross. After my first contact with this technology, I can say that I recommend it. If you are looking for a new, powerful, accessible and quality technology to develop your program, whether it is cross-platform or not, I strongly recommend TotalCross. This is due to the facilities that the technology offers with its library, easy installation, small footprint, agility, performance increase due to TCVM, and the fact that it has a large community that is on the rise. The TotalCross community is always open to help you learn, exchanging experiences and answering any questions.

You can join the TotalCross community through the official website, GitHub and Discord. It will be a great experience and you are sure to learn a lot of great things! Look forward to seeing you there!

I am Oderlan Freire from Ocara, Ceará. I started working at TotalCross as an intern in 2021, student of Information Systems at the Federal University of Ceará, and I participated in the SharinAgro project, one of the top projects selected for the Microsoft contest IA for Earth.

Top comments (2)

Collapse
 
vaneskasousa profile image
Vaneska Sousa

Really nice!! 👏 👏 👏 👏 👏

Collapse
 
oderlanfreire profile image
Oderlan Freire

thanks :)