To run, build and create Java apps you need to have Java installed on your machine and this page provides a step by step guide to get Java setup on your machine.
If there is anything missing or not clear in this guide, please leave a comment below.
Java Development Kit or JDK is responsbile for compiling Java application into runnable code. It also provides a series of basic libraries that we can use in Java development.
java -version
. You should see output similar to this to indicate Java is installed and ready to go:Note: The version number should be 15.0.2 or higher
Finally, enter javac -version
. You should see output similar to this to indicate Java is installed and ready to go:
You can find more details on the install process here: https://docs.oracle.com/en/java/javase/11/install/overview-jdk-installation.html
java -version
. You should see output similar to this to indicate Java is installed and ready to go:Note: The version number should be 15.0.2 or higher
Finally, enter javac -version
. You should see output similar to this to indicate Java is installed and ready to go:
If you are attempting to install this on a work computer, it may be that you don’t have the correct permissions to install the JDK. Have a conversation with your IT department to see if they can install the JDK for you, or give you the correct permissions to give you the freedom to install. Failing that, for our workshops, consider using a personal machine where you are likely to have the correct permissions.
If the issue isn’t around permission sets, Google the error you are getting and see if sites such as Stack Overflow offer solutions.
If you have installed the JDK but are receiving errors in your terminal or command about java or javac not being available it is likely that the environmental variable for your system named PATH is missing details of where your copy of the JDK are installed.
Oracle offer a useful guide on how to update your PATH to add the JDK folders to your PATH that you can find here: https://www.java.com/en/download/help/path.xml
Comments