Java mixed mode windows x86

Java on Windows: switching to a specific Java version/ runtime

This post show how to have multiple Java runtime environments on your PC and switch between them on Windows so that a particular program uses the version that you want it to.

Background

Due to Java SE Platform licensing changes by Oracle, developers have turned to alternatives such as OpenJDK. The AdoptOpenJDK site provides Prebuilt OpenJDK Binaries for Free (the main line on their landing page) and as you will see, there are numerous versions that you could use:

  • JDK 8 Long-term Support ( LTS )
  • JDK 11 LTS
  • JDK 16 (the latest)
  • Each of these could be 32-bit or 64-bit versions and you can choose the JVM that you run (Hotspot vs OpenJ9)

In short, there are options and there are times when you want to run something with a specific version of the JVM or you want to test something with multiple JVMs.

Installing and switching between multiple Java versions

The method that I follow is that I have a folder D:\apps where I put different applications tools that I want to use. Under this, I create a folder called jdk and use that as the main holding folder for all the different JDK / JVM that I want to use. I personally prefer not installin each JVM / JDK into my computer any more but to use them ‘without installation’.

Head on over to the releases page at AdoptOpenJDK to get the package you need. Start by changing the platform to Windows as shown below.

Next, pick the JDK (the full Java Development Kit) or the smaller JRE (Java Runtime Environment) and download the ZIP file version. Remember x86 means it’s the 32-bit version and x64 means that it’s the 64-bit version. If you have a modern (relatively new) Windows 10 PC, it’s almost certainly running the 64-bit version of Windows and will therefore support both the versions. In that case, the x64 is preferable though you may have some programs that don’t work correctly on the 64-bit version and need the 32-bit version.

Once you have downloaded the version (or versions) that you want to get, unzip the package. In my case, I unzip it to d:\apps\jdk so that I have all the JDKs/ JREs in one place. After unzipping, I change the folder names to be something like jdk-11.0.11_x64 and jdk-11.0.11_x86 so that I can easily tell which folder has the 64-bit and which one has the 32-bit.

Читайте также:  Невозможно найти пакет php gettext

Running a program with Java basically requires you to do: $ java . and for this to work, it needs two things to be in place:

  • The Java version that you want to run must be the first Java installation on the path (so that Windows can find it)
  • The environment variable JAVA_HOME must be set to the installation that you want to use

So, for switching Java versions, you need to do this:

set JAVA_HOME=d:\apps\jdk\jdk-11.0.11_x86\ path=d:\apps\jdk\jdk-11.0.11_x86\bin;%PATH% 

The first line sets the JAVA_HOME and the second one moves the x86 version of the JDK / JRE to the path. Note that the JAVA_HOME points to the main directory where the whole installation is, and the path must be to the /bin folder under the JAVA_HOME so that java.exe can be found. After you do this, you should see this:

$ java -version openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK Client VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode) 

To switch to a different version, you just need to set both those items correctly again. For example, in my case, I would do:

$ path=d:\apps\jdk\jdk-11.0.11_x64\bin;%PATH% $ set JAVA_HOME=d:\apps\jdk\jdk-11.0.11_x64\ $ java -version openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode) 

(Notice how the last line shows 64-Bit Server VM since it’s now running the 64-bit VM)

It’s not as convenient as using pik to switch Ruby versions on Windows but I imagine it would be a good idea to write something like pik for this. Also, I did not search if there are tools that let you do this easily but there might well be something.

That’s all there is to it. I noted this down mainly for myself since I need to do this occasionally. If it helps you, that’s great! Please leave a comment if there is something else that you think we should add into the post.

Источник

Помогите с ошибкой в игре майнкрафт.

Пытаюсь открыть версию 1 7 3 и выше и появляется эта ошибка:
# Java VM: Java HotSpot(TM) Client VM (25.45-b02 mixed mode windows-x86 )
# Problematic frame:
# C [ig4dev32.dll+0x3e88]#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\777\AppData\Roaming\.minecraft\hs_err_pid2040.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[L] Launcher exited.
[L] Minecraft closed with exit code: 1

Читайте также:  Php sql date functions

Зайдите в Пуск, далее в Панель управления, далее в Программы и компоненты.
Удалите с компъютера все версии Java которые есть в списке программ.
Перезагрузите компъютер.
Скачайте с официального сайта Java и установите заново.
java.com/ru/download/manual.jsp
Презагрузите компьютер.

Все равно появляется ошибка. [L] Minecraft Launcher [16;8] has initialized
[L] Running under TLauncher 1.9 for Ru-Minecraft.org
[L] Current machine: Windows 7 6.1 x32, Java 1.8.0_45, 3063 MB RAM
[L] Collecting info.
[L] Force update: false
[L] Selected version: 1.7.10
[L] Selected account: Account
[L] Version sync info: VersionSyncInfolocal=CompleteVersion

先輩 Мудрец (10944) Какая у вас версия виновс? ХР или 7 или 8? 32 или 64 битная? Сколько оперативной памяти? Узнать какой у вас виндовс можно нажав правой кнопкой на значек «Мой компьютер» и выбрав «Свойства» Скачивали Java с этого сайта? http://java.com/ru/download/manual.jsp Если да, то какую версию? Нужно скачать обе: 1. «Windows В автономном режиме» 2. «Windows В автономном режиме (64-разрядная версия) «

Судя по написанному, не в Minecraft дело, а в Java. Либо она для Windows твоей не подходит, либо сама Java хреновая. Пробуй переустановить, если не помогает то скачай другую Java. На всякий, другой Minecraft скачай.

1)Обнови java до последней версии 2) Если не помогло то проверь антивирус он может блокировать соединение.

Источник

Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode windows-x86) # Problema

Priority: P4

Description

FULL PRODUCT VERSION :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76ed8405, pid=5400, tid=2464
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b

FULL OS VERSION :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76ed8405, pid=5400, tid=2464
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b

Читайте также:  Задача черепашка на питоне

EXTRA RELEVANT SYSTEM CONFIGURATION :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76ed8405, pid=5400, tid=2464
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b

A DESCRIPTION OF THE PROBLEM :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76ed8405, pid=5400, tid=2464
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode windows-x86)
# Problematic frame:
# C [ntdll.dll+0x28405]
#
# An error report file with more information is saved as:
# C:\Users\i\Workspaces\MyEclipse 8.5\ocx\hs_err_pid5400.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

REGRESSION. Last worked in version 8u66

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76ed8405, pid=5400, tid=2464
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode windows-x86)
# Problematic frame:
# C [ntdll.dll+0x28405]
#
# An error report file with more information is saved as:
# C:\Users\i\Workspaces\MyEclipse 8.5\ocx\hs_err_pid5400.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

EXPECTED VERSUS ACTUAL BEHAVIOR :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76ed8405, pid=5400, tid=2464
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode windows-x86)
# Problematic frame:
# C [ntdll.dll+0x28405]
#
# An error report file with more information is saved as:
# C:\Users\i\Workspaces\MyEclipse 8.5\ocx\hs_err_pid5400.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

ERROR MESSAGES/STACK TRACES THAT OCCUR :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76ed8405, pid=5400, tid=2464
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode windows-x86)
# Problematic frame:
# C [ntdll.dll+0x28405]
#
# An error report file with more information is saved as:
# C:\Users\i\Workspaces\MyEclipse 8.5\ocx\hs_err_pid5400.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

REPRODUCIBILITY :
This bug can be reproduced always.

Источник

Оцените статью