A következő címkéjű bejegyzések mutatása: java. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: java. Összes bejegyzés megjelenítése

2020. március 9.

Update Java version with AdoptOpenJDK

1. Install the JDK version you want with apt-get
(Steps copied from the linked source)

Import the official AdoptOpenJDK GPG key by running the following command:
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -

Import the AdoptOpenJDK DEB repository by running the following command:
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

Refresh your package list:
sudo apt-get update

Install your chosen AdoptOpenJDK package. For example, to install OpenJDK 8 with the HotSpot VM, run:
sudo apt-get install <adoptopenjdk-8-hotspot>

2. update alternatives:

List alternatives for java:
~$ update-alternatives --list java
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
/usr/lib/jvm/jdk-11.0.2/bin/java

Check the java version of the alternative you would like to set:
~$ /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java --version
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

Set the chosen version as the default:
~$ sudo update-alternatives --set java /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java

update environmetal variables
For me, there is a maven.sh in /etc/profile.d that sets the env vars required for maven.
~$ sudo gedit /etc/profile.d/maven.sh
Update the JAVA_HOME path here. (in my case to /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/)

2015. június 2.

How to install Oracle Java 1.7 and 1.8 on Ubuntu 14.04?

Install Java version 1.7

Install Java version 1.8

via PPA:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java8-installer

Set Java 1.7 as default version:
sudo update-java-alternatives -s java-7-oracle

To set environmental variables to Java 7, install:
sudo apt-get install oracle-java7-set-default

2015. január 8.

Java Applets on Trusty Thar (14.04)

I had trouble with my net-bank in Lucid Lynx, which problem was solved by installing the sun-java6-plugin.
(this is the ominous page)

Now, after switching to Trusty Thar, my net-banking site still does not work out of the box, because java does not come preinstalled with Ubuntu, so I have to try and find the best option for myself again.

Luckily this time it was enough to install icedtea-7-plugin through synaptic, and the Java Applet of my net-bank works smoothly.



2010. május 23.

Java Applets on Lucid

I found this terrific post, which completely worked for me. Unlike icedtea & co.
It runs my internet bank and it runs facebook photo uploader too!!

It goes like:

The one java app I have to use does not work correctly with openjdk and icedtea, so I really must use sun's runtime and plugin. I was surprised to see that neither this thread nor any of the others I could find said anything about getting sun's plugin to work on lucid (or with firefox-3.6 in general). Maybe my search string wasn't good enough. Anyway, here's how to do it.

First, open 'Software Sources', click the 'Other Software' tab, and enable the lucid partner repo. (If it doesn't show up on the list, add it: deb http://archive.canonical.com/ubuntu lucid partner )

Next, install sun-java6-plugin.

Uninstall both icedtea6-plugin and openjdk-6-jre.

And finally, due to this bug, run the following command in terminal:

sudo update-alternatives --install /usr/lib/mozilla/plugins/mozilla-javaplugin.so mozilla-javaplugin.so /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so 1

This is the only step that is specific to firefox-3.6 and lucid.

Restart firefox and check about:plugins to verify that the correct plugin version is loaded.

If icedtea and openjdk work for the apps you use, then I recommend that you continue to use them rather than switching to the sun versions. However, if you use apps that do not work correct with ubuntu's default java installation, the above should work.