Configure Eclipse for Andi Extension Development
Overview
This article provides an overview on how to configure JDK 17 which is required for extension creation and to import the FirstExtension project archive.
Java Runtime
As Andi currently runs on the Java 17 runtime, click the Window->Preferences menu and select the Java Installed JREs option as shown. If you don't have a JDK (Java Development Kit) or JRE (Java Runtime Enviornment) 17 listed as installed, you must download the JVM, install it and then click the Add button to register it. It will be referenced later by the FirstExtension project.
Import the FirstExtension Sample
To import the sample project:
Open Eclipse and create a new workspace if you don't already have one
Click the File->Import menu, expand General and select Projects from Folder or Archive
Click the Next button to select the sample archive
Enter the path as shown to your FirstExtension.zip archive and click Finish to create the project. The project will be created in your workspace.
Verify your project has a correctly configured Java runtime which will allow it to compile automatically to verify your code changes and allow you create your own Java archive (JAR) which you will use to extend the Andi Integrated Scripting environment
Right click on the FirstExtension project and click the Properties menu item
Select the Java Build Path item, then the Libraries tab as shown. If you have a registered JVM, you will see all of the associated runtime jars such as rt.jar etc as shown below. If you don't have a runtime, you may need to register it using the Window->Preferences->Installed JREs->Add button to select the directory where you installed JDK 1.8.
The last step is to configure the Andi extension api jar path which is included in a directory under the default installation.
Right click on the FirstExtension project and choose Java Build Path.
Click on the andiExtensionsApi library and click the Edit... button
Update the user to complete the path to the jar and select Open and then Ok on the original dialog to save the path