3. Test Drive

Test that the Totalcross SDK is installed correctly

Register

To have access to all features of these tools you need to have a TotalCross account!

VS Code
CLI Tool
VS Code

Step 1: open VS Code terminal CTRL+SHIFT+P and search TotalCross:

Step 2: select TotalCross: Register option and fill in the fields with your information:

CLI Tool

Step 1: open your Terminal/CMD/Powershell

Step 2: type totalcross register and you will be asked for some information about yourself.

After complete, your account will be created!

Login

You can now login!

VS Code
CLI Tool
VS Code

Step 1: open VS Code Command Palette (CTRL+Shift+P) and search TotalCross:

Step 2: select TotalCross: Login option and fill in the fields with your information:

CLI Tool

Step 1: open your Terminal/CMD/Powershell

Step 2: run totalcross login then write your e-mail and password already registered.

Ready! You are logged in.

Create

Creating your first application is really simple and straightforward. Once you have accomplished all the basic requirements, you will be able to run your first application in about 5 minutes. Thus, choose the environment that makes you feel more comfortable:

VS Code
CLI Tool
VS Code

Step 1: open VS Code Command Palette (CTRL+Shift+P) and type TotalCross autocomplete should help! Select TotalCross: Create new Project. Then create a folder called HelloWorld and select it.

Step 2: GroupId will be com.totalcross, but you can replace with the name of your company (as you would chose a domain for your company backwards, example: org.wikipedia for wikipedia.org).

Step 3: ArtifactId is the name of your application, in this example it will be HelloWorld. Select the latest version of TotalCross SDK and choose whatever platform you intend to deploy an application.

(Optional) A new window with the new project structure will be open. Right click on theRunHelloWorldApplication.java inside src> main> com> totalcross and choose click Run (IDE). This will make your new application run on our Java simulator:

CLI Tool

Step 1: open your Terminal/CMD/Powershell

Step 2: run totalcross create and you will be asked for the following information that you will be typing into the terminal as they appear.

Step 3: after answering the questions, your project will be created and ready to be developed. You can give a ls in the terminal to check if your project was created in a folder with the name of the project.

Now you know how to create TotalCross projects!

Package

As Totalcross is a cross platform SDK, packaging is one of the most important phases in the development process. Using Totalcross, you can deliver application for the following platform.

VS Code
CLI
VS Code

Step 1: open VS Code Command Palette (CTRL+Shift+P) and search for TotalCross: Package

Step 2: after the package process is finished the target program will take place inside the folder target/install/<platform>

CLI

Step 1: open your Terminal/CMD/Powershell

Step 2: cd into your project folder:

Step 3: run totalcross package :

Step 4: wait a minute. The result of the package will be in the folder target/install/<platform>

Did you have any trouble or want to understand package process? See out this guide!

Deploy

In addition, you can still deploy in an uncomplicated way, in the environment you want.

Deploy is working only for linux arm programs. This feature performs the implementation and execution of the platform via ssh.

VS Code
CLI
VS Code

Step 1: open VS Code Command Palette (CTRL+Shift+P) and search for TotalCross: Deploy

Step 2: fill in the device information to deploy.

Step 3: see the result on the screen or with VNC

CLI

Step 1: open your Terminal/CMD/Powershell

Step 2: cd into your project folder

Step 3: run totalcross deploy, fill in the device information to deploy.

You've learnt how to create a new project, package and deploy.