It’s been many years since I’ve done anything substantial with Java. I’d like to try to do a series of posts to get a feel for the Java ecosystem.
Just to start things off, the most simple thing. Hello world along with trying out VSCode w/ Java.
Most of these steps are from https://code.visualstudio.com/docs/java/java-tutorial - so this will be rehash of that, I just want to write it down as I learn better that way.
Oracle is undergoing some changes with licensing for the Java SDK(?) - I won’t pretend to understand that, but it sounds like utilizing the open JDK is the route to go.
Install VSCode from https://code.visualstudio.com. After installation, install VSCode extensions (Control + Shift + X):
- Language Support for Java
- Debugger for Java
- Java Test Runner
- Maven for Java
- Java Dependency Viewer
- Java Extension Pack
Lastly, install maven - I’d like to use it from the CLI.
I need to get into how Java projects and the like work, but for now, a simple hello world should suffice for this post.
Control F5 that bad boy and then get the output!
Note I did initially have some VSCode output errors - one related to a missing classpath, and one was complaining about not being able to create a launch.json file.
The missing classpath appeared to be related to the fact that I’m working with a raw .java file, and the secondary error was resolved when I restarted VSCode /shrug.
Next time, I hope to be able to dive into some of the boilerplate and ceremony of Java, so that I can better understand how to get a project up and running from the ground up; or to modify an already existing project.Photo by takeshi2 on Unsplash.