For those of you who don't use VS Code, I highly recommend swapping to it. When I first started writing scripts back in 2013 for OSB, I was using IntelliJ, I believe. However, VS Code offers so much more flexibility, and now that it can compile jars for you, I think it's a better option than Eclipse and IntelliJ. So, here's the guide on how to get you up and running on VS Code.
You will need to ensure that you have the Java JDK 1.8+ already installed. If not, download it from here -> https://www.oracle.com/java/technologies/javase-jre8-downloads.html
Next, you'll want to install Maven as this is what will be used to compile your script.
Go to http://maven.apache.org/download.cgi and download the archive.
Find a place you want to store the unzipped files. For me, it's on a secondary drive (Z:\Programs\maven)
Edit your environment variables
Here, you'll want to append the path to the bin folder of Maven to your global Windows path (for me: Z:\Programs\maven\bin)
While you're here, you'll want to add a new user variable called JAVA_HOME if you don't already have it. This is required for an extension in VS Code in order to create the Java project. You'll see that mine is on the C drive.
If you haven't done so already, download VS Code: https://code.visualstudio.com/download
Then you'll need to add some extensions. You'll want to click the tab with the four boxes, shown below. And then you want to search for the Java Extension Pack. This will install the Maven extension as well as debugging and Java language support extensions which are helpful for writing Java.
Once that is done, you can create your first project. On Windows, press CTRL + Shift + P and a dialog should pop up. With your new extensions, you should be able to type Maven and be able to select the option Maven: Create Maven Project.
You'll then be able to select different libraries and default templates for the project. Select maven-archetype-quickstart as this will provide a small bootstrapped Maven project. You'll then be asked for the version you want. Pick the latest version (at this time, v1.4). Then choose where you want the project's folder to be created.
Next, you'll be prompted with questions for the setup of the project. Enter the values based on your project scope.
You'll need to add the OSB jar file to the project. There is a command you can use to do this, but it's currently broken and doesn't add the dependency to the classpath at this time. So, the quickest way is to paste the following code in .classpath while replacing the path to your OSB file. You will also need to create a folder called lib and add the OSB file there. If you have errors in building your project later on, then you can additionally press CTRL + Shift + P and choose Java: Add a jar file or a folder to project classpath and select the OSB jar file. This will create a .vscode folder with settings.json with reference to the the lib folder you created and the classpath information you added below.
<classpathentry kind="lib" path="Z:/Cloud/Development/OSBot/OSBot 2.5.67.jar" />
I'm going to skip over writing Java for OSB at this time. When you're ready to build your project, you can do it via command line, or through a command in VS Code. Either way, it'll use Maven which you installed earlier. On Windows, press CTRL + Shift + P and type in Maven. You'll want Maven: Execute Commands
You'll need to select the project, which should default to the project you have open. Then you'll need to select package
Once that is done, you'll have a folder called target inside your root project folder. Inside the target folder, you will have your built jar file, which you can then add to your OSB script folder.