3. Your first app

Running your first application in TotalCross.

​

Creating Your First Application (Hello World)

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
VS Code

Install our plugin for VS Code: TotalCross extension for VS Code.

After having the plugin installed, open VS Code console (CTRL + Shift + P) and type TotalC… autocomplete should help!

Select TotalCross: Create new Project. Then create a folder called HelloWorld and select it. 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). 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.

Click to expand

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:

Click to expand
CLI

The TotalCross CLI tool is under development. But don't worry, our awesome development team are going to get this done in the first week of february 2020 😁 .

Packaging

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

With the project open in VS Code, open the Command Palette F1 or (CTRL + Shift + P) and search for Totalcross: Package;

After the package process is finished the target program will take place inside the folder target/install/<platform>.

CLI

The TotalCross CLI tool is under development. But don't worry, our awesome development team are going to get this done in the first week of february 2020 😁 .

Deploy

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

VS Code
CLI
VS Code

In VS Code the deploy is working only for linux arm programs. This feature performs the implementation and execution of the platform via ssh.

To do it open the project and press F1 or (CTRL + Shift + P) and search for Totalcross: Deploy&Run.

CLI

The TotalCross CLI tool is under development. But don't worry, our awesome development team are going to get this done in the first week of february 2020 😁 .

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

​