Which Java you need to use depends on the application you're trying to run. Find the right versionīefore you can set JAVA_HOME, you need to know which Java you want to use. That doesn't necessarily mean your computer has no Java home, it just means that nothing's bothered to set it yet. If there's no output, then your computer doesn't have that variable set. If there's output, then your computer is maintaining a JAVA_HOME variable. Regardless of what your default is, if you try to launch an application and then receive an error about the version of Java you're using, even though you know you've got the right version installed somewhere on your system, you can manually override the setting.Īpplications can derive the location of Java from your current session's environment variables.įirst, take a look at what, if anything, JAVA_HOME is set to currently: $ echo $JAVA_HOME Depending on what Linux distribution you run and what method you've used to install Java, your system default could be the first version of Java you installed or the most recent one. This is something you may not have set yourself. Normally, an application just uses whatever you have set as your default Java runtime. It's perfectly acceptable to have more than one version of Java installed, but applications may not know where to find the version it needs. You can, instead, run Java out of your home directory, but that sometimes means you have to point applications to that nonstandard install location. You might be on a system for which you don't have permission to install Java at the systemwide level. If you have two must-have applications, each of which uses a different version of Java, you may want to install both.ĭevelopers work on many different projects, some of which might use an old long-term support (LTS) version of Java while another uses the latest version. It's possible for Java (the language) to increment its version number while your favorite application sticks with an older version. Programming languages progress at one rate, while an application might develop at a different rate. There are a few reasons you might want more than one version of Java on your computer. Welcome to the communityįresh Java articles Why you might want multiple versions of Java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |