tis-oracle-java8-jre-nonfree

8.0.271-5
Last "paid" version provided by Oracle for Java Standard Edition Runtime Environment 8
6346 downloads
Download
default icon

  Description 

  • package : tis-oracle-java8-jre-nonfree
  • version : 8.0.271-5
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Jimmy PELÉ
  • description : Last "paid" version provided by Oracle for Java Standard Edition Runtime Environment 8
  • locale : all
  • target_os : windows
  • min_wapt_version : 1.7
  • 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 :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Oracle
  • licence : OTN
  • signature_date : 2020-11-19T11:41:18.021935
  • Homepage : https://www.oracle.com/java/
  • Conflicts :

  Setup.py 

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

uninstallkey = []

# Please note that this is the last version of Java Runtime Environment (JRE) CPU edition under OTN License that mean that you can ONLY use it for personnal or developpement 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 = '{26A24AE4-039D-4CA4-87B4-2F32180%sF0}'
uninstall_key_string_x64 = '{26A24AE4-039D-4CA4-87B4-2F64180%sF0}'


def install():
    # Initializing variables
    package_version = control.version.split('-')[0]
    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)


def update_package():
    print('Download/Update package content from upstream binary sources')

    # 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'

    # 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', user_agent='Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko')
    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)




def get_proxies():
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


def bs_find(url, element, attribute=None, value=None, user_agent=None, proxies=None, features='html.parser', **kwargs):
    """"You may need to use a user agent for some websites.
    Example: user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0')
    """
    if user_agent:
        page = requests.get(url, proxies=proxies, headers={'User-Agent':'%s' % user_agent}, **kwargs).text
    else:
        page = requests.get(url, proxies=proxies, **kwargs).text
    soup = BeautifulSoup.BeautifulSoup(page, features=features)
    if value:
        return soup.find(element, {attribute: value})
    else:
        return soup.find(element)


def bs_find_all(url, element, attribute=None, value=None, user_agent=None, proxies=None, features='html.parser', **kwargs):
    """"You may need to use a user agent for some websites.
    Example: user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0')
    """
    if user_agent:
        page = requests.get(url, proxies=proxies, headers={'User-Agent':'%s' % user_agent}, **kwargs).text
    else:
        page = requests.get(url, proxies=proxies, **kwargs).text
    soup = BeautifulSoup.BeautifulSoup(page, features=features)
    if value:
        return soup.find_all(element, {attribute:value})
    else:
        return soup.find_all(element)


def remove_outdated_binaries(version,list_filename_contain=('x64','x86','win32','win64','32','64'),list_extensions=('exe','msi','deb','rpm','dmg','pkg')):
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*.%s' % file_ext):
            if not version in bin_in_dir:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        print('Outdated binary: %s Removed' % bin_in_dir)
                        remove_file(bin_in_dir)


										

  Changelog 



Changelog software url : https://www.java.com/en/download/faq/release_changes.xml



No changelog.txt.
									
  manifest.sha256