diff options
-rw-r--r-- | .SRCINFO | 114 | ||||
-rw-r--r-- | LICENSE | 128 | ||||
-rw-r--r-- | PKGBUILD | 174 | ||||
-rw-r--r-- | java.desktop | 8 | ||||
-rw-r--r-- | jconsole.desktop | 9 | ||||
-rw-r--r-- | jdk.install | 4 | ||||
-rw-r--r-- | jre.install | 35 | ||||
-rw-r--r-- | jshell.desktop | 8 |
8 files changed, 410 insertions, 70 deletions
@@ -1,30 +1,110 @@ pkgbase = jdk - pkgdesc = Oracle Java Development Kit - pkgver = 12.0.1 - pkgrel = 1 + pkgdesc = Oracle Java + pkgver = 22 + pkgrel = 2 url = https://www.oracle.com/java/ - install = jdk.install arch = x86_64 - license = custom - depends = java-environment-common - depends = jre>=12 - depends = jre<13 - depends = zlib - depends = hicolor-icon-theme - provides = java-environment=12 - provides = java-environment-jdk=12 - source = https://download.oracle.com/otn-pub/java/jdk/12.0.1+12/69cfe15208a647278a19ef0990eea691/jdk-12.0.1_linux-x64_bin.tar.gz + license = LicenseRef-custom + makedepends = python-html2text + noextract = jdk-22_doc-all.zip + source = https://download.oracle.com/java/22/archive/jdk-22_linux-x64_bin.tar.gz + source = https://download.oracle.com/otn_software/java/jdk/22+36/830ec9fcccef480bb3e73fb7ecafe059/jdk-22_doc-all.zip + source = jdk-22_doc-license.html::https://download.oracle.com/otndocs/jcp/java_se-22-final-spec/license.html source = java.desktop source = jconsole.desktop source = jshell.desktop source = java_16.png source = java_48.png - sha256sums = 9fd6dcdaf2cfca7da59e39b009a0f5bcd53bec2fb16105f7ca8d689cdab68d75 - sha256sums = 7b348c5f6b6ce7df7f849a90f0bdbbdb5a2d6236ec05e96e0b160755cf87fd69 - sha256sums = 74d52ebc46e1d6b104130c04209a9cf318163de022034239042a1981a6ffd60f - sha256sums = d207bb3f4a55e329546d084d8b82b6c217177ff11ebcc85e6420b14b011b3cd1 + source = LICENSE + sha256sums = 17feecbbbbd8f9a3e27d7dd7689b02ba29ebfa98af59034d26812d0a671ce194 + sha256sums = b1a91fe8a9ae579e01aaea4c4eb041c753d7837d4e255db8b26fb011735aa790 + sha256sums = 80c207fe067921acca0624a72c29590dff6c916886f870e83a0c19b036061960 + sha256sums = 5249be0129a1c3c1a0f8e5c905e4202f259c82ba1b88e70578125141d74f2515 + sha256sums = 0ebbdbdf84f9f59e9296a3257a54424d9da956a5f8e5024f2d7a36b69db465a7 + sha256sums = 4914e9d0e7e0da19934cf5151802376d41574d2804a849e4e92f062d57d00672 sha256sums = d27fec1d74f7a3081c3d175ed184d15383666dc7f02cc0f7126f11549879c6ed sha256sums = 7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176 + sha256sums = 20becfcac0bdeaa29a76e6966d727f8cc79381354cbd5d530cdec823954df19f + +pkgname = jre + pkgdesc = Oracle Java Runtime Environment + install = jre.install + depends = java-runtime-common + depends = ca-certificates-utils + depends = freetype2 + depends = libx11 + depends = libxext + depends = libxi + depends = libxtst + depends = libxrender + optdepends = alsa-lib: for basic sound support + optdepends = gtk2: for the Gtk+ 2 look and feel - desktop usage + optdepends = gtk3: for the Gtk+ 3 look and feel - desktop usage + provides = java-runtime=22 + provides = java-runtime-jdk22 + provides = jre22-jdk=22-2 + provides = java-runtime-headless=22 + provides = java-runtime-headless-jdk=22 + provides = jre22-jdk-headless=22-2 + conflicts = jdk + backup = etc/java-jdk/management/jmxremote.access + backup = etc/java-jdk/management/jmxremote.password.template + backup = etc/java-jdk/management/management.properties + backup = etc/java-jdk/security/policy/limited/default_US_export.policy + backup = etc/java-jdk/security/policy/limited/default_local.policy + backup = etc/java-jdk/security/policy/limited/exempt_local.policy + backup = etc/java-jdk/security/policy/unlimited/default_US_export.policy + backup = etc/java-jdk/security/policy/unlimited/default_local.policy + backup = etc/java-jdk/security/policy/README.txt + backup = etc/java-jdk/security/java.policy + backup = etc/java-jdk/security/java.security + backup = etc/java-jdk/logging.properties + backup = etc/java-jdk/net.properties + backup = etc/java-jdk/sound.properties pkgname = jdk + pkgdesc = Oracle Java Development Kit + install = jdk.install + depends = java-environment-common + depends = java-runtime-common + depends = ca-certificates-utils + depends = freetype2 + depends = libx11 + depends = libxext + depends = libxi + depends = libxtst + depends = libxrender + depends = zlib + depends = hicolor-icon-theme + optdepends = alsa-lib: for basic sound support + optdepends = gtk2: for the Gtk+ 2 look and feel - desktop usage + optdepends = gtk3: for the Gtk+ 3 look and feel - desktop usage + provides = java-environment=22 + provides = java-environment-jdk=22 + provides = jdk22-jdk=22-2 + provides = jre + provides = java-runtime=22 + provides = java-runtime-jdk22 + provides = jre22-jdk=22-2 + provides = java-runtime-headless=22 + provides = java-runtime-headless-jdk=22 + provides = jre22-jdk-headless=22-2 + conflicts = jre + backup = etc/java-jdk/management/jmxremote.access + backup = etc/java-jdk/management/jmxremote.password.template + backup = etc/java-jdk/management/management.properties + backup = etc/java-jdk/security/policy/limited/default_US_export.policy + backup = etc/java-jdk/security/policy/limited/default_local.policy + backup = etc/java-jdk/security/policy/limited/exempt_local.policy + backup = etc/java-jdk/security/policy/unlimited/default_US_export.policy + backup = etc/java-jdk/security/policy/unlimited/default_local.policy + backup = etc/java-jdk/security/policy/README.txt + backup = etc/java-jdk/security/java.policy + backup = etc/java-jdk/security/java.security + backup = etc/java-jdk/logging.properties + backup = etc/java-jdk/net.properties + backup = etc/java-jdk/sound.properties +pkgname = jdk-doc + pkgdesc = Oracle Java documentation + arch = any diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..573e5255afa4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,128 @@ +Oracle No-Fee Terms and Conditions (NFTC) + +Definitions + +"Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) +a company or organization (each an "Entity") accessing the Programs, if +use of the Programs will be on behalf of such Entity; or (b) an +individual accessing the Programs, if use of the Programs will not be +on behalf of an Entity. "Program(s)" refers to Oracle software provided +by Oracle pursuant to the following terms and any updates, error +corrections, and/or Program Documentation provided by Oracle. "Program +Documentation" refers to Program user manuals and Program installation +manuals, if any. If available, Program Documentation may be delivered +with the Programs and/or may be accessed from +www.oracle.com/documentation. "Separate Terms" refers to separate +license terms that are specified in the Program Documentation, readmes +or notice files and that apply to Separately Licensed Technology. +"Separately Licensed Technology" refers to Oracle or third party +technology that is licensed under Separate Terms and not under the +terms of this license. + +Separately Licensed Technology + +Oracle may provide certain notices to You in Program Documentation, +readmes or notice files in connection with Oracle or third party +technology provided as or with the Programs. If specified in the +Program Documentation, readmes or notice files, such technology will be +licensed to You under Separate Terms. Your rights to use Separately +Licensed Technology under Separate Terms are not restricted in any way +by the terms herein. For clarity, notwithstanding the existence of a +notice, third party technology that is not Separately Licensed +Technology shall be deemed part of the Programs licensed to You under +the terms of this license. + +Source Code for Open Source Software + +For software that You receive from Oracle in binary form that is +licensed under an open source license that gives You the right to +receive the source code for that binary, You can obtain a copy of the +applicable source code from https://oss.oracle.com/sources/ or +http://www.oracle.com/goto/opensourcecode. If the source code for such +software was not provided to You with the binary, You can also receive +a copy of the source code on physical media by submitting a written +request pursuant to the instructions in the "Written Offer for Source +Code" section of the latter website. + +----------------------------------------------------------------------- +-------- + +The following license terms apply to those Programs that are not +provided to You under Separate Terms. + +License Rights and Restrictions + +Oracle grants to You, as a recipient of this Program, subject to the +conditions stated herein, a nonexclusive, nontransferable, limited +license to: + +(a) internally use the unmodified Programs for the purposes of +developing, testing, prototyping and demonstrating your applications, +and running the Program for Your own personal use or internal business +operations; and + +(b) redistribute the unmodified Program and Program Documentation, +under the terms of this License, provided that You do not charge Your +licensees any fees associated with such distribution or use of the +Program, including, without limitation, fees for products that include +or are bundled with a copy of the Program or for services that involve +the use of the distributed Program. + +You may make copies of the Programs to the extent reasonably necessary +for exercising the license rights granted herein and for backup +purposes. You are granted the right to use the Programs to provide +third party training in the use of the Programs and associated +Separately Licensed Technology only if there is express authorization +of such use by Oracle on the Program's download page or in the Program +Documentation. + +Your license is contingent on compliance with the following conditions: + +- You do not remove markings or notices of either Oracle's or a +licensor's proprietary rights from the Programs or Program +Documentation; + +- You comply with all U.S. and applicable export control and economic +sanctions laws and regulations that govern Your use of the Programs +(including technical data); + +- You do not cause or permit reverse engineering, disassembly or +decompilation of the Programs (except as allowed by law) by You nor +allow an associated party to do so. + +For clarity, any source code that may be included in the distribution +with the Programs is provided solely for reference purposes and may not +be modified, unless such source code is under Separate Terms permitting +modification. + +Ownership + +Oracle or its licensors retain all ownership and intellectual property +rights to the Programs. + +Information Collection + +The Programs' installation and/or auto-update processes, if any, may +transmit a limited amount of data to Oracle or its service provider +about those processes to help Oracle understand and optimize them. +Oracle does not associate the data with personally identifiable +information. Refer to Oracle's Privacy Policy at +www.oracle.com/privacy. + +Disclaimer of Warranties; Limitation of Liability + +THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE +FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING +WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO +YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +Last updated: 12 September 2021 @@ -1,53 +1,144 @@ -# Maintainer : Daniel Bermond < gmail-com: danielbermond > +# Maintainer : Daniel Bermond <dbermond@archlinux.org> # Contributor: Det <nimetonmaili g-mail> -pkgname=jdk -pkgver=12.0.1 -_build=12 -_hash=69cfe15208a647278a19ef0990eea691 +pkgbase=jdk +pkgname=('jre' 'jdk' 'jdk-doc') +pkgver=22 +_build=36 +_hash=830ec9fcccef480bb3e73fb7ecafe059 _majver="${pkgver%%.*}" -_next="$((_majver + 1))" -pkgrel=1 -pkgdesc='Oracle Java Development Kit' +pkgrel=2 +pkgdesc='Oracle Java' arch=('x86_64') url='https://www.oracle.com/java/' -license=('custom') -depends=('java-environment-common' "jre>=${_majver}" "jre<${_next}" 'zlib' 'hicolor-icon-theme') -provides=("java-environment=${_majver}" "java-environment-jdk=${_majver}") -install="${pkgname}.install" -source=("https://download.oracle.com/otn-pub/java/jdk/${pkgver}+${_build}/${_hash}/${pkgname}-${pkgver}_linux-x64_bin.tar.gz" +license=('LicenseRef-custom') +makedepends=('python-html2text') +source=("https://download.oracle.com/java/${_majver}/archive/jdk-${pkgver}_linux-x64_bin.tar.gz" + "https://download.oracle.com/otn_software/java/jdk/${pkgver}+${_build}/${_hash}/jdk-${pkgver}_doc-all.zip" + "jdk-${_majver}_doc-license.html"::"https://download.oracle.com/otndocs/jcp/java_se-${_majver}-final-spec/license.html" 'java.desktop' 'jconsole.desktop' 'jshell.desktop' 'java_16.png' - 'java_48.png') -sha256sums=('9fd6dcdaf2cfca7da59e39b009a0f5bcd53bec2fb16105f7ca8d689cdab68d75' - '7b348c5f6b6ce7df7f849a90f0bdbbdb5a2d6236ec05e96e0b160755cf87fd69' - '74d52ebc46e1d6b104130c04209a9cf318163de022034239042a1981a6ffd60f' - 'd207bb3f4a55e329546d084d8b82b6c217177ff11ebcc85e6420b14b011b3cd1' + 'java_48.png' + 'LICENSE') +noextract=("jdk-${pkgver}_doc-all.zip") +sha256sums=('17feecbbbbd8f9a3e27d7dd7689b02ba29ebfa98af59034d26812d0a671ce194' + 'b1a91fe8a9ae579e01aaea4c4eb041c753d7837d4e255db8b26fb011735aa790' + '80c207fe067921acca0624a72c29590dff6c916886f870e83a0c19b036061960' + '5249be0129a1c3c1a0f8e5c905e4202f259c82ba1b88e70578125141d74f2515' + '0ebbdbdf84f9f59e9296a3257a54424d9da956a5f8e5024f2d7a36b69db465a7' + '4914e9d0e7e0da19934cf5151802376d41574d2804a849e4e92f062d57d00672' 'd27fec1d74f7a3081c3d175ed184d15383666dc7f02cc0f7126f11549879c6ed' - '7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176') - + '7cf8ca096e6d6e425b3434446b0835537d0fc7fe64b3ccba7a55f7bd86c7e176' + '20becfcac0bdeaa29a76e6966d727f8cc79381354cbd5d530cdec823954df19f') + DLAGENTS=('https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -b oraclelicense=a -o %o %u') -package() { +_jre_deps=('java-runtime-common' 'ca-certificates-utils' 'freetype2' 'libx11' 'libxext' + 'libxi' 'libxtst' 'libxrender') +_jre_optdeps=('alsa-lib: for basic sound support' + 'gtk2: for the Gtk+ 2 look and feel - desktop usage' + 'gtk3: for the Gtk+ 3 look and feel - desktop usage') +_jre_provides=("java-runtime=${_majver}" "java-runtime-jdk${_majver}" + "jre${_majver}-jdk=${pkgver}-${pkgrel}" + "java-runtime-headless=${_majver}" "java-runtime-headless-jdk=${_majver}" + "jre${_majver}-jdk-headless=${pkgver}-${pkgrel}") +_jre_backup=("etc/java-${pkgbase}/management/jmxremote.access" + "etc/java-${pkgbase}/management/jmxremote.password.template" + "etc/java-${pkgbase}/management/management.properties" + "etc/java-${pkgbase}/security/policy/limited/default_US_export.policy" + "etc/java-${pkgbase}/security/policy/limited/default_local.policy" + "etc/java-${pkgbase}/security/policy/limited/exempt_local.policy" + "etc/java-${pkgbase}/security/policy/unlimited/default_US_export.policy" + "etc/java-${pkgbase}/security/policy/unlimited/default_local.policy" + "etc/java-${pkgbase}/security/policy/README.txt" + "etc/java-${pkgbase}/security/java.policy" + "etc/java-${pkgbase}/security/java.security" + "etc/java-${pkgbase}/logging.properties" + "etc/java-${pkgbase}/net.properties" + "etc/java-${pkgbase}/sound.properties") + +prepare() { + mkdir -p "jdk-doc-${pkgver}" + bsdtar -x -f "jdk-${pkgver}_doc-all.zip" -C "jdk-doc-${pkgver}" --strip-components='1' + html2text "jdk-${_majver}_doc-license.html" > LICENSE-doc +} + +_package_jre() { cd "jdk-${pkgver}" + local _jvmdir="/usr/lib/jvm/java-${_majver}-jdk" - local _jvmdir="/usr/lib/jvm/java-${_majver}-${pkgname}" - + install -d -m755 "${pkgdir}/etc" install -d -m755 "${pkgdir}/${_jvmdir}" install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" + # conf + cp -a conf "${pkgdir}/etc/java-${pkgbase}" + ln -s "../../../../etc/java-${pkgbase}" "${pkgdir}/${_jvmdir}/conf" + # bin - cp -a bin "${pkgdir}/${_jvmdir}" - rm "${pkgdir}/${_jvmdir}/bin/"{java,jjs,jrunscript,keytool,pack200} - rm "${pkgdir}/${_jvmdir}/bin/"{rmid,rmiregistry,unpack200} + install -D -m755 bin/{java,jfr,jrunscript,jwebserver} -t "${pkgdir}/${_jvmdir}/bin" + install -D -m755 bin/{keytool,rmiregistry} -t "${pkgdir}/${_jvmdir}/bin" + + # libs + cp -a lib "${pkgdir}/${_jvmdir}" + rm "${pkgdir}/${_jvmdir}/lib/"{ct.sym,libattach.so,libsaproc.so,src.zip} + + # man pages + local _file + for _file in man/man1/{java,jfr,jrunscript,keytool,rmiregistry}.1 + do + install -D -m644 "$_file" "${pkgdir}/usr/share/${_file%.1}-jdk${_majver}.1" + done + + install -D -m644 release -t "${pkgdir}/${_jvmdir}" + + # link JKS keystore from ca-certificates-utils + rm "${pkgdir}/${_jvmdir}/lib/security/cacerts" + ln -s /etc/ssl/certs/java/cacerts "${pkgdir}${_jvmdir}/lib/security/cacerts" + + # legal/licenses + cp -a legal/* "${pkgdir}/usr/share/licenses/${pkgname}" + ln -s "$pkgname" "${pkgdir}/usr/share/licenses/java-${pkgname}" + ln -s "../../../share/licenses/${pkgname}" "${pkgdir}/${_jvmdir}/legal" + install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}" +} + +package_jre() { + pkgdesc+=' Runtime Environment' + depends=("${_jre_deps[@]}") + optdepends=("${_jre_optdeps[@]}") + provides=("${_jre_provides[@]}") + conflicts=('jdk') + backup=("${_jre_backup[@]}") + install=jre.install + + _package_jre +} + +package_jdk() { + pkgdesc+=' Development Kit' + depends=('java-environment-common' "${_jre_deps[@]}" 'zlib' 'hicolor-icon-theme') + optdepends=("${_jre_optdeps[@]}") + provides=("java-environment=${_majver}" "java-environment-jdk=${_majver}" + "jdk${_majver}-jdk=${pkgver}-${pkgrel}" 'jre' "${_jre_provides[@]}") + conflicts=('jre') + backup=("${_jre_backup[@]}") + install=jdk.install + + _package_jre + + cd "${srcdir}/jdk-${pkgver}" + local _jvmdir="/usr/lib/jvm/java-${_majver}-${pkgname}" + + # bin + install -D -m755 bin/* -t "${pkgdir}/${_jvmdir}/bin" # libs install -D -m644 lib/ct.sym -t "${pkgdir}/${_jvmdir}/lib" install -D -m644 lib/libattach.so -t "${pkgdir}/${_jvmdir}/lib" install -D -m644 lib/libsaproc.so -t "${pkgdir}/${_jvmdir}/lib" - cp -a lib/jfr "${pkgdir}/${_jvmdir}/lib" cp -a include "${pkgdir}/${_jvmdir}" cp -a jmods "${pkgdir}/${_jvmdir}" @@ -55,22 +146,27 @@ package() { install -D -m644 lib/src.zip -t "${pkgdir}/${_jvmdir}/lib" # desktop and icons - install -D -m644 "${srcdir}/java.desktop" "${pkgdir}/usr/share/applications/java-java${_majver}-jdk.desktop" - install -D -m644 "${srcdir}/jconsole.desktop" "${pkgdir}/usr/share/applications/jconsole-java${_majver}-jdk.desktop" - install -D -m644 "${srcdir}/jshell.desktop" "${pkgdir}/usr/share/applications/jshell-java${_majver}-jdk.desktop" - install -D -m644 "${srcdir}/java_16.png" "${pkgdir}/usr/share/icons/hicolor/16x16/apps/java${_majver}-jdk.png" - install -D -m644 "${srcdir}/java_48.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/java${_majver}-jdk.png" + install -D -m644 "${srcdir}/java.desktop" "${pkgdir}/usr/share/applications/java-java-jdk.desktop" + install -D -m644 "${srcdir}/jconsole.desktop" "${pkgdir}/usr/share/applications/jconsole-java-jdk.desktop" + install -D -m644 "${srcdir}/jshell.desktop" "${pkgdir}/usr/share/applications/jshell-java-jdk.desktop" + install -D -m644 "${srcdir}/java_16.png" "${pkgdir}/usr/share/icons/hicolor/16x16/apps/java-jdk.png" + install -D -m644 "${srcdir}/java_48.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/java-jdk.png" # man pages local _file - for _file in man/man1/* + while read -r -d '' _file do install -D -m644 "$_file" "${pkgdir}/usr/share/${_file%.1}-jdk${_majver}.1" - done - rm "${pkgdir}/usr/share/man/man1/"{java,jjs,jrunscript,keytool,pack200}-jdk"${_majver}".1 - rm "${pkgdir}/usr/share/man/man1/"{rmid,rmiregistry,unpack200}-jdk"${_majver}".1 + done < <(find man/man1 -type f -print0) +} + +package_jdk-doc() { + pkgdesc+=' documentation' + arch=('any') - # legal/licenses - cp -a legal/* "${pkgdir}/usr/share/licenses/${pkgname}" - ln -s "$pkgname" "${pkgdir}/usr/share/licenses/java${_majver}-${pkgname}" + install -d -m755 "${pkgdir}/usr/share"/{doc,licenses} + cp -dr --no-preserve='ownership' "jdk-doc-${pkgver}" "${pkgdir}/usr/share/doc/java-jdk" + mv "${pkgdir}/usr/share/doc/java-jdk/legal" "${pkgdir}/usr/share/licenses/${pkgname}" + install -D -m644 LICENSE-doc "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + ln -s "../../licenses/${pkgname}" "${pkgdir}/usr/share/doc/java-jdk/legal" } diff --git a/java.desktop b/java.desktop index bf14d3517c40..7cae75d1dbeb 100644 --- a/java.desktop +++ b/java.desktop @@ -1,10 +1,10 @@ [Desktop Entry] -Name=Oracle Java 12 Runtime -Comment=Oracle Java 12 Runtime +Name=Oracle Java 22 Runtime +Comment=Oracle Java 22 Runtime Keywords=java;runtime -Exec=/usr/lib/jvm/java-12-jdk/bin/java -jar +Exec=/usr/lib/jvm/java-22-jdk/bin/java -jar Terminal=false Type=Application -Icon=java12-jdk +Icon=java-jdk MimeType=application/x-java-archive;application/java-archive;application/x-jar; NoDisplay=true diff --git a/jconsole.desktop b/jconsole.desktop index 4b73c8ddcf85..172fbc581aa1 100644 --- a/jconsole.desktop +++ b/jconsole.desktop @@ -1,9 +1,10 @@ [Desktop Entry] -Name=Oracle Java 12 Console -Comment=Oracle Java 12 Monitoring and Management Console +Name=Oracle Java 22 Console +Comment=Oracle Java 22 Monitoring and Management Console Keywords=java;console;monitoring -Exec=/usr/lib/jvm/java-12-jdk/bin/jconsole +Exec=/usr/lib/jvm/java-22-jdk/bin/jconsole Terminal=false Type=Application -Icon=java12-jdk +Icon=java-jdk +StartupWMClass=sun-tools-jconsole-JConsole Categories=Application;System; diff --git a/jdk.install b/jdk.install index df31ceffe439..58fecc5709b6 100644 --- a/jdk.install +++ b/jdk.install @@ -1,4 +1,4 @@ -THIS_JDK='java-12-jdk' +THIS_JDK='java-22-jdk' fix_default() { if [ ! -x /usr/bin/java ]; then @@ -42,7 +42,7 @@ post_upgrade() { pre_remove() { if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then - # Check JRE12 is still available + # Check JRE22 is still available if [ -x /usr/lib/jvm/${THIS_JDK}/bin/java ]; then /usr/bin/archlinux-java unset fi diff --git a/jre.install b/jre.install new file mode 100644 index 000000000000..bf5c7f0cc426 --- /dev/null +++ b/jre.install @@ -0,0 +1,35 @@ +THIS_JRE='java-22-jdk' + +fix_default() { + if [ ! -x /usr/bin/java ]; then + /usr/bin/archlinux-java unset + echo "" + else + /usr/bin/archlinux-java get + fi +} + +post_install() { + default=$(fix_default) + case ${default} in + "") + /usr/bin/archlinux-java set ${THIS_JRE} + ;; + ${THIS_JRE}) + # Nothing + ;; + *) + echo "Default Java environment is already set to '${default}'" + echo "See 'archlinux-java help' to change it." + ;; + esac + + echo "When you use a non-reparenting window manager," + echo "set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh" +} + +post_upgrade() { + if [ -z "$(fix_default)" ]; then + /usr/bin/archlinux-java set ${THIS_JRE} + fi +} diff --git a/jshell.desktop b/jshell.desktop index e166068579ba..b185c42e456d 100644 --- a/jshell.desktop +++ b/jshell.desktop @@ -1,9 +1,9 @@ [Desktop Entry] -Name=Oracle Java 12 Shell -Comment=Oracle Java 12 Shell +Name=Oracle Java 22 Shell +Comment=Oracle Java 22 Shell Keywords=java;shell -Exec=/usr/lib/jvm/java-12-jdk/bin/jshell +Exec=/usr/lib/jvm/java-22-jdk/bin/jshell Terminal=true Type=Application -Icon=java12-jdk +Icon=java-jdk Categories=Application;System; |