tis-oracle-java8-jre-nonfree icon

Java SE JRE 8

Silent install package for Java SE JRE 8

8.0.371-8

  • package: tis-oracle-java8-jre-nonfree
  • name: Java SE JRE 8
  • version: 8.0.371-8
  • categories: System and network
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor: Oracle
  • licence: OTN
  • locale: all
  • target_os: windows
  • impacted_process: java,javaw,javaws,jushed,iexplore
  • architecture: all
  • signature_date:
  • size: 119.96 Mo
  • installed_size: 706.32 Mo
  • homepage : https://www.oracle.com/java/
  • conflicts :

package           : tis-oracle-java8-jre-nonfree
version           : 8.0.371-8
architecture      : all
section           : base
priority          : optional
name              : Java SE JRE 8
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : Last "paid" version provided by Oracle for Java Standard Edition Runtime Environment 8
depends           : 
conflicts         : tis-oracle-java8-jre-free
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.0
sources           : https://www.java.com/en/download/manual.jsp
installed_size    : 706320000
impacted_process  : java,javaw,javaws,jushed,iexplore
description_fr    : Dernière version "payante" fournie par Oracle pour Java Standard Edition Runtime Environment 8
description_pl    : Ostatnia "płatna" wersja dostarczona przez Oracle dla Java Standard Edition Runtime Environment 8
description_de    : Letzte "kostenpflichtige" Version, die von Oracle für die Java Standard Edition Runtime Environment 8 bereitgestellt wurde
description_es    : Última versión "de pago" proporcionada por Oracle para Java Standard Edition Runtime Environment 8
description_pt    : Última versão "paga" fornecida pela Oracle para Java Standard Edition Runtime Environment 8
description_it    : Ultima versione "a pagamento" fornita da Oracle per Java Standard Edition Runtime Environment 8
description_nl    : Laatste "betaalde" versie van Oracle voor Java Standard Edition Runtime Environment 8
description_ru    : Последняя "платная" версия, предоставленная Oracle для Java Standard Edition Runtime Environment 8
audit_schedule    : 
editor            : Oracle
keywords          : oracle,java,jre,runtime,environment,8
licence           : OTN
homepage          : https://www.oracle.com/java/
package_uuid      : df09a076-a79a-48fb-b329-90f27faa6840
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://www.java.com/en/download/faq/release_changes.xml
min_os_version    : 5.1
max_os_version    : 
icon_sha256sum    : 0a52b3abe6be5984135a8f9b65637051520957f7d6b12253a4063c768a07a461
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : dOs+9ae5axYmziXRYLA8Z72QgAi1cD9p0Mrk6Z6Xw2yQ2Ci0X8sT4ZDMxYklImqZZUWPK1Kb8rK0NRu+npbuAPATce119F4ziOIdY0+q+Km+gSDcvQoOmVaFKfZl3EDSJ9W+lgcOoUlAJwRXg5YiERYzXjHdU7XU1eZqYy2dClPAJcb12eBh0R+km+OCRBRkA0gVnw5AzStzLn1QFtkfw0Wmevps4AM5ST7Z4yhDe5On+F9qVOtCKykFZExyzQPh3M6YSxtLPnUKJ4ax4iNOGPCm9VXGGzabjqyqqlS2yfAbvBq6GOYJsk3KRtEmMnDOGo7Ex/VTWmPOHH0mycfM9g==
signature_date    : 2023-05-02T16:47:28.969697
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

# -*- coding: utf-8 -*-
from setuphelpers import *

# Please note that this is the last version of Java Runtime Environment (JRE) under OTN License that mean that you can ONLY use for free for personal or development use.
# More info here : https://blogs.oracle.com/java-platform-group/oracle-java-se-releases-faq
# Installation procedure: https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_installer_options.html
"""
UninstallKey                           Software                                                              Version             Uninstallstring
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{26A24AE4-039D-4CA4-87B4-2F64180xxxF0} Java 8 Update xxx (64-bit)                                            8.0.xxx0.9          MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180xxxF0}
{26A24AE4-039D-4CA4-87B4-2F32180xxxF0} Java 8 Update xxx                                                     8.0.xxx0.9          MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180xxxF0}
{4A03706F-666A-4037-7777-5F2748764D10} Java Auto Updater                                                     2.8.xxx.8
"""

# Defining variables
bin_name_string_x86 = "jre-8u%s-windows-i586.exe"
bin_name_string_x64 = "jre-8u%s-windows-x64.exe"
silent_inst_args_string = 'INSTALLCFG="%s" /s'
uninstall_key_string_x86 = "{71124AE4-039E-4CA4-87B4-2F32180%sF0}"
uninstall_key_string_x64 = "{71124AE4-039E-4CA4-87B4-2F64180%sF0}"


def install():
    # Initializing variables
    package_version = control.get_software_version()
    short_version = package_version.split("8.0.")[1]
    java_cfg = makepath(basedir, "java.cfg")
    processes_to_kill = control.impacted_process.split(",")
    install_dir_x86 = makepath(programfiles32, "Java", "jre1.8.0_%s" % short_version)
    install_dir_x64 = makepath(programfiles64, "Java", "jre1.8.0_%s" % short_version)

    # Uninstalling Olders / Others Java 8 versions
    check_installed = installed_softwares(name="Java 8")
    for uninstall_java in check_installed:
        if "Oracle" in uninstall_java["publisher"]:
            if uninstall_java["version"] < package_version:
                print("Removing %s" % uninstall_java["name"])
                run(uninstall_cmd(uninstall_java["key"]))

    # Removing remaining folders to avoid errors
    if need_install(uninstall_key_string_x86 % short_version):
        if isdir(install_dir_x86):
            killalltasks(processes_to_kill)
            remove_tree(install_dir_x86)
    if iswin64():
        if need_install(uninstall_key_string_x64 % short_version):
            if isdir(install_dir_x64):
                killalltasks(processes_to_kill)
                remove_tree(install_dir_x64)

    # Installing Java 8
    print("Installing: %s" % bin_name_string_x86 % short_version)
    install_exe_if_needed(
        bin_name_string_x86 % short_version, silentflags=silent_inst_args_string % java_cfg, key=uninstall_key_string_x86 % short_version
    )

    if iswin64():
        print("Installing: %s" % bin_name_string_x64 % short_version)
        install_exe_if_needed(
            bin_name_string_x64 % short_version, silentflags=silent_inst_args_string % java_cfg, key=uninstall_key_string_x64 % short_version
        )

    # Uninstalling Java Updater
    check_installed_updater = installed_softwares(name="Java Auto Updater")
    for uninstall_updater in check_installed_updater:
        print("Removing: %s" % uninstall_updater["name"])
        run(uninstall_cmd(uninstall_updater["key"]))

    # Disabling Automatic Updates and removing SunJavaUpdateSched startup key
    print("Disabling: Automatic Java Updates")
    if iswin64():
        registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run", "SunJavaUpdateSched")
        registry_setstring(HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy", "EnableJavaUpdate", 0, type=REG_DWORD)
    registry_delete(HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "SunJavaUpdateSched")
    registry_setstring(HKEY_LOCAL_MACHINE, r"SOFTWARE\JavaSoft\Java Update\Policy", "EnableJavaUpdate", 0, type=REG_DWORD)

# -*- coding: utf-8 -*-
from setuphelpers import *
import bs4 as BeautifulSoup


def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    url = "https://www.oracle.com/java/technologies/javase-jre8-downloads.html"
    bin_name_string_x86 = "jre-8u%s-windows-i586.exe"
    bin_name_string_x64 = "jre-8u%s-windows-x64.exe"
    # Download Guide: https://gist.github.com/wavezhang/ba8425f24a968ec9b2a8619d7c2d86a6
    # https://gist.github.com/wavezhang/ba8425f24a968ec9b2a8619d7c2d86a6#gistcomment-3377085

    # Getting latest version from official website
    # bs_search = bs_find_all('https://www.java.com/en/download/manual.jsp', 'a', 'title',  'Download Java software for Windows Offline')
    bs_search = bs_find_all(url, "a", "href", "/downloads/javase-software-license-agreement.html#license-lightbox", proxies=proxies)
    for bs_seak in bs_search:
        if bs_seak["data-file"].endswith("-windows-i586.exe"):
            update_number = bs_seak["data-file"].split("/")[-3].split("-")[-0].replace("8u", "")
            build_number = bs_seak["data-file"].split("/")[-3].split("-")[-1].replace("b", "")
            encrypted_path = bs_seak["data-file"].split("/")[-2]
            break

    arch_name_x86 = "windows-i586"
    arch_name_x64 = "windows-x64"

    latest_bin_x86 = bin_name_string_x86 % update_number
    latest_bin_x64 = bin_name_string_x64 % update_number

    file_name_x86 = "jre-8u%s-%s.exe" % (update_number, arch_name_x86)
    file_name_x64 = "jre-8u%s-%s.exe" % (update_number, arch_name_x64)

    # https://sdlc-esd.oracle.com/ESD6/JSCDL/jdk/8u271-b09/61ae65e088624f5aaa0b1d2d801acb16/jre-8u271-windows-i586.exe?GroupName=JSC&FilePath=/ESD6/JSCDL/jdk/8u271-b09/61ae65e088624f5aaa0b1d2d801acb16/jre-8u271-windows-i586.exe&BHost=javadl.sun.com&File=jre-8u271-windows-i586.exe&=1603380937_844fab0e9ecd6dcdf4efe8d98d697ce4&ext=.exe
    # https://javadl.oracle.com/webapps/download/AutoDL?BundleId=243735_61ae65e088624f5aaa0b1d2d801acb16 # jre-8u271-windows-i586.exe
    # https://javadl.oracle.com/webapps/download/GetFile/1.8.0_271-b09/61ae65e088624f5aaa0b1d2d801acb16/windows-i586/jdk-8u271-windows-x64.exe
    # https://javadl.oracle.com/webapps/download/GetFile/1.8.0_[xxx]-b[xx]/[encrypted_path]/windows-i586/[file_name_exe]

    url_dl_x86 = "https://javadl.oracle.com/webapps/download/GetFile/1.8.0_%s-b%s/%s/%s/%s" % (
        update_number,
        build_number,
        encrypted_path,
        arch_name_x86,
        latest_bin_x86,
    )
    url_dl_x64 = "https://javadl.oracle.com/webapps/download/GetFile/1.8.0_%s-b%s/%s/%s/%s" % (
        update_number,
        build_number,
        encrypted_path,
        arch_name_x86,
        latest_bin_x64,
    )

    version = "8.0.%s" % update_number

    print("Latest %s version is: Update %s" % (app_name, update_number))

    # Downloading latest binaries
    if not isfile(latest_bin_x64):
        print("Downloading " + latest_bin_x64)
        if not isfile(latest_bin_x64):
            wget(url_dl_x64, latest_bin_x64, proxies=proxies)

    if not isfile(latest_bin_x86):
        print("Downloading " + latest_bin_x86)
        if not isfile(latest_bin_x86):
            wget(url_dl_x86, latest_bin_x86, proxies=proxies)

        # Changing version of the package
        control.version = "%s-%s" % (version, int(control.version.split("-")[-1]) + 1)
        control.save_control_to_wapt()
        print("Changing package version to: %s in WAPT\\control" % control.version)

    # Deleting outdated binaries
    remove_outdated_binaries(update_number)

b69b05010d13f13f3f85877b06afd9d7a5c238e667c4bc28af51cebe59739a95 : setup.py
f583134252923916f89136c36ec9358b8c99c9a539aa9fab4eb45806613a6c43 : jre-8u371-windows-x64.exe
1bac96029320614f6ad9a5d6f6d3793304e4dd4e063e6d5772969b1c8ad020e8 : update_package.py
32eb91bc7933a1e99fb1416e60523ecfde0811e5cdeb74b7877f457bf6dfea3e : jre-8u371-windows-i586.exe
0a52b3abe6be5984135a8f9b65637051520957f7d6b12253a4063c768a07a461 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
53ee2011d1f55b6549bddbfa233e89cf8154989ee8ee129a3a2336e015d47929 : luti.json
c586cc22cd7f6382e51d9914b35f86f128d251d9fdaae53407354d22ce27d887 : java.cfg
c863f13a62a6df869cc6c7353f1e711b753995bac2ce8b969b8432d397888357 : WAPT/control