This article was written for people who were programming in other languages and would like to program in Java. In this article, it is up to environment construction. We do not explain the program or create the program.
This article is based on the content of the Wiki. wiki link https://ja.wikipedia.org/wiki/Java
The environment for this article is Mac. So I'll explain what to do with a Mac.
Java is a type of programming language. Sometimes it also includes the execution environment and development environment. It is a programming language that has been around since 1995, and many people have left behind materials. Also, since most PCs have Java installed, it can be said that it is a language that is easy for beginners to touch.
Java is on most PCs as I wrote above, but I think it may be out of date. In such a case, you can download Java at the link below. Java download site: https://www.oracle.com/java/technologies/javase-downloads.html
If you want to know which version you have on your PC, go to the terminal on mac
/usr/libexec/java_home -V
Please enter. Then you will see the version and path you have on your PC.
java --version
You can see which version is currently selected by typing.
Switching versions
export JAVA_HOME = \ version path \
You can do it with. In my case, I develop with Java SE 11.
export JAVA_HOME=`/usr/libexec/java_home -v 11.0.6`
I entered.
For windows, it is done on the console, but the command is different. I can't try it right now, so I won't give a detailed explanation.
This time we will be developing with Java SE 11, so Java SE 11 (LTS) Oracle JDK Click JDK Download.
After clicking, click MacOS Installer.
After that, you can install it by clicking the downloaded file and following the instructions.
There are various development environments, but I use Visual Studio Code (hereinafter VSCode). VSCode download site: https://azure.microsoft.com/ja-jp/products/visual-studio-code/
Download it, open VS Code and create practice.java on your desktop. Then We recommend installing the'Language Support for Java (TM) by Red Hat'extension. Is displayed, so let's install as you are told.
When the installation is complete, the environment construction is complete. If you want to try the program after installation See Hello World in VS Code! (Https://qiita.com/u-devi/items/74caeaeec3a00cb5e557).
--fin--
Recommended Posts