Skip to main content

Local Installation

This section of the documentation will cover the steps required only for users who wish to use webforJ for web and/or application development with a local BBj instance on their machine. This installation will not allow users to contribute to the webforJ foundation code itself.


info

This walkthrough will cover installation on a Windows system - installation steps may vary for Mac/Linux OS devices.


Installation will be broken down into the following steps:

  1. Java and Maven download and configuration
  2. BBj download and installation
  3. Using the BBj Plugin Manager to create your application
  4. Launching your application

1. Java and Maven download and configuration

In order to use webforJ, you must first have Java and Maven installed and properly configured. If you already have Java and Maven downloaded, please skip to Step 2. If you also have BBj installed on your system, please skip to Step 3.

Java

Java OpenJDK17 can be found by following this link. It is recommended to allow the installation to handle setting the JAVA_HOME variable during installation, where applicable.

Maven

Maven should also be downloaded, and can be found at this link. It is recommended to configure your system environment variables with Maven - a guide for installation and configuration for Windows users can be found here.

2. BBj download and installation

While following this step, be sure that you install the BBj version that corresponds to the same webforJ version.

This video can help with the installation of BBj if you need assistance with setup. The installation section of the BASIS website can be found at this link

tip

It is recommended to use the latest stable revision build of BBj, and to select "BBj" from the list of options, without "Barista" or "Addon".

3. Install and configure the webforJ plugin

Once BBj has been installed, we can access the Plugin Manager in order to install tools needed to configure webforJ. To start, type "Plugin Manager" into the start menu or Finder.

After the plugin manager has been opened, navigate to the "Available Plugins" tab towards the top.

Plugin manager configuration

Once in this section, check the "Show versions under development" checkbox

Plugin manager configuration

The DWCJ entry should now be visible in the list of available plugins for download. Click on this entry in the list to select it.

Plugin manager configuration

With the DWCJ entry selected, click the "Install" button

Plugin manager configuration

Once the plugin has finished installing, click on the "Installed Plugins" tab at the top.

Plugin manager configuration

This tab displays installed plugins, which should now include the DWCJ entry. Click on the entry within the list.

Plugin manager configuration

With the DWCJ entry selected, click the "Configure" button

Plugin manager configuration

On the window that opens, click the "Enable Maven Remote Install" button at the bottom left of the window.

Plugin manager configuration

tip

Alternatively, navigate to the bin directory within your bbx folder and run the following command:

./bbj -tIO DWCJ/cli.bbj - enable_remote_install

A dialog should display that remote installation has been enabled. Click "OK" to close this dialog.

Plugin manager configuration

4. Clone the repository

Once BBj and the required webforJ plugin are installed and configured, we can clone the "Hello World" repository from the webforJ Github page. This project comes with the necessary tools to run your first webforJ program!

To begin, navigate to the HelloWorldJava repository and clone the project to your machine.

Click on the Code button Plugin manager configuration

Copy the repository URL to your clipboard to clone Plugin manager configuration

Once the project is cloned onto your machine, you can open it with your preferred IDE. Within your IDE, navigate to the pom.xml file that comes with the project. Within this file are various tags that can be modified to install your application to your own desired specifications.

tip

For first time users, it is recommended to use the default settings and avoid changing the pom.xml that comes with the project.

Proceed to open the folder in your preferred terminal, and run the following command:

mvn install

This will run the installation plugin which will do the work of setting your project up for you.

info

If the above command does not work, check to make sure that your environment variables have been sufficiently edited to run Maven globally.

Once this process has been completed, you should be able to navigate top the following URL and see your program running:

http://localhost:8888/webapp/hworld