![]() bin/cp -fr /usr/java/jdk1.8.0_05/jre/lib/desktop/icons/hicolor/* /usr/share/icons/System You'll also want to add the Java Preferences menu item to your Gnome desktop by running the following commands: /bin/cp -fr /usr/java/jdk1.8.0_05/jre/lib/desktop/* /usr/share/ To add the Java plugin to FireFox (for applet support) run the following command: ln -s /usr/java/jdk1.8.0_05/jre/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/ Additionally you can run other Java related commands such as jjs (the Nashorn engine interface) or jmc (Java Mission Control) without having to fully qualify their paths. Now you should be able to run java -version and javac -version and the output should indicate that you are running the 1.8.0_05 version of those commands. The makewhatis command at the end will update the man keyword database with the newly added man pages. The alternatives commands shown above will also add links for all the Java command's man pages. My alternatives commands are based in part on the scripts that run when you install the OpenJDK RPMs.īecause all of the command links will originate in the /usr/bin directory there will be no need to update the PATH environmental variable. The alternatives commands that you want to run are a little long so I put them in a script you can download and run. Basically the /usr/bin/java program (and others) will be a link to your preferred version of the program. The alternatives system allows you to have multiple versions of the same command installed while enabling you to specify the default version that should be used by the system. The correct approach is to use the alternatives command. Some people attempt to adjust the PATH environmental variable to put the Oracle JDK binaries first but this is not the right approach when attempting to configure a system-wide default version of Java. If fact, since the Oracle JDK binaries are not in your PATH by default, if the java command already works then you are most likely running one of the OpenJDK binaries. If these other versions of Java are installed when your run java or javac you might be running a version of Java other than the one included in the Oracle JDK. You can check to see which versions are installed by running rpm -qa *jdk*. Often the default install of Red Hat based systems will install one or more versions OpenJDK. You might also have other versions of Java (JRE or JDK) installed. The benefit of using yum over rpm to install the RPMs is that yum will also prompt you to install any dependencies. The JDK will be installed in /usr/java/jdk1.8.0_05. The above commands install the JDK and the JDK demos (which will be good for testing some of the other steps we will be performing). Yum localinstall jdk-8u5-linux-圆4-demos.rpm As root run: yum localinstall jdk-8u5-linux-圆4.rpm I'm using the RPM files, also installing the demos, and I'm installing on a 64-bit Linux system. ![]() I'm using JDK 8 update 5 which you can download from. This article will show you how to full configure everything. Installing the official Oracle JDK on Linux is easy enough but the installation of the Oracle JDK (both RPM and tar.gz methods) doesn't integrate with your desktop or deal with PATH issues.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |