Using the provided Dev-image
We provide a ready-to-go image of a virtual machine, running Debian 12, for VirtualBox.
The machine is set up with all the required software and helper scripts, to enable development of custom codeunits.
The image is setup with MariaDB, Tomcat 8, Netbeans 11.3 and a java-project that automatically deploys to the local Tomcat instance and has access to the TS-API with javadoc.
If the image is connected to a bridged network, the database and webserver are accessible from other machines (port 3306 and 8080 are open). use the command ip a
to find the IP of the machine.
The image is running Debian 12 with a custom LXDE interface.
Getting the image running
The image is buildt for VirtualBox, so install that.
Once you have the image downloaded, start the import wizard in VirtualBox (ctrl + i) and follow it.
Now you should be able to boot the VM. The username and password for the user is noted in the comment on the VM.
The machine includes the following programs:
- Firefox, to access the local Tomcat server
- NetBeans 11.3, to develop codeunits
- DBeaver CE 24, to access the local DB
Deploying codeunits
To deploy your code to the local Tomcat instance do the following:
- Open Netbeans
- Build the project (right-click the project in the project-browser on the left and select build)
- Copy the generated .jar file from
/home/developer/NetBeansProjects/[ApplicationName]/dist
to/mnt/sda/deploy
- Clear the cache (open http://localhost:8080/app/service?CacheClear) or go back to the app in firefox and select Administrator -> Services -> Cache control -> Cache clear
Debugging codeunits
Attach the NetBeans debugger to the local Tomat server:
Click "debug" in the top-left menu -> click "attach debugger" -> click "OK", the default settings should work
Add a breakpoint to your code by selecting the line number and try to invoke it from the browser.
Updating the API and platform
To update the local environment to the latest version of the TS-API and TS Platform, open a terminal and execute the following commands.
updateAPI
ts -w app upgrade-alphaapp
You will be prompted to input the password for the user.