![]() ![]() Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead. The problem solvers who create careers with code. LinkedIn YouTube Facebook Twitter Products ![]() The command also issues a prompt allowing you to choose a version. The output displays the versions of Java currently on the system, as shown in Figure 1. In the terminal on a Linux system, run the following command: $ sudo alternatives -config java You have to make sure that JAVA_HOME is set correctly, with version details. The line defining JAVA_HOME in the output is as follows: export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-17.0.4.1.1–1.fc35.x86_64 For instance, you can execute this command in the terminal: $ more ~/.bashrc bashrc file to see whether it defines JAVA_HOME and what value is assigned to the environment variable. The file itself contains a series of commands to configure the terminal session.Ĭheck your. bashrc file is a script that runs when a user logs in. bashrc: this dot means that the file doesn't normally turn up when you display the contents of the directory. bashrc if you use the Bash shell that is the default on Linux. This file is located in your home directory and is called. When you upgrade Java, the system installs a new JDK, and you need to update JAVA_HOME to point to the new location.Įnvironment variables used in the shell are generally defined in a start-up file. Java Platform, Standard Edition (Java SE), permits you to deploy Java applications on desktops as well as servers. You can learn more about the Java platform components in the article, What is the Java Runtime Environment. Java Runtime Environment 64-Bit 8 Update 371. When non-developers run Java, they don't need the entire JDK, so they can download a JRE and point JAVA_HOME to that. As the error message shown earlier indicates, you should point to your JDK if you have a JDK. Your shell finds the proper Java environment through an environment variable called JAVA_HOME.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |