Helidon 2 introduced a CLI tool that eases the development process. Developers can create, build and run Helidon applications via the command line.
For Windows, we will need the Visual C++ Redistributable Runtime.
Then, we can use Powershell to install it. Start CMD as an administrator, and execute:
PowerShell -Command Invoke-WebRequest -Uri "https://helidon.io/cli/latest/windows/helidon.exe" -OutFile "C:\Windows\system32\helidon.exe"
Once installed, the available command-line options are below.
Create a Project — helidon init
It’s easy to create a new project. Just execute the command below and enter the project details:
cd C:\java-projects\helidon-clihelidon init
First, select the default version (2.5.0). Next, select Helidon SE or Helidon MP. Then, the archetype such as bare, quickstart, or database. Select database, then provide the database name or hit enter for default. Next, enter the project details (Maven-related) and then a Java package name. Last, inform yes (y) to start a development loop.
Then, our project will start, and as soon as the startup process finishes, we’ll see the usual notification message as shown below.
Now, we can navigate to the project directory and open it in our preferred IDE. Below we will use Eclipse, so we used Maven to generate the relevant IDE project files:
cd C:\java-projects\helidon-cli\database-semvn eclipse:eclipse
That’s it! We used the Helidon CLI to create a new Helidon SE project with database connectivity that uses Helidon’s DBClient, and a sample in-memory (embedded) database. Happy coding!
Oracle Developers and Oracle OCI Free Tier
Join our Oracle Developers channel on Slack to discuss Microservices, Java, JDBC, Oracle Cloud Infrastructure, Oracle Database, and other topics!
Build, test, and deploy your applications on Oracle Cloud — for free! Get access to OCI Cloud Free Tier!