Démarrage + java 17 avec ancienne config

This commit is contained in:
luki39 2022-05-19 12:32:03 +02:00
parent 0e3ac16027
commit c383972a5b
2 changed files with 16 additions and 2 deletions

View File

@ -409,6 +409,20 @@ class ProcessBuilder {
}
args.push('-Xmx' + ConfigManager.getMaxRAM())
args.push('-Xms' + ConfigManager.getMinRAM())
const defaultjvmOption = [
'-XX:+UnlockExperimentalVMOptions',
'-XX:+UseG1GC',
'-XX:G1NewSizePercent=20',
'-XX:G1ReservePercent=20',
'-XX:MaxGCPauseMillis=50',
'-XX:G1HeapRegionSize=32M'
]
if (ConfigManager.getJVMOptions().lenght < 6){
ConfigManager.setJVMOptions(defaultjvmOption)
}
args = args.concat(ConfigManager.getJVMOptions())
// Main Java Class

View File

@ -88,7 +88,7 @@ document.getElementById('launch_button').addEventListener('click', function(e){
loggerLanding.log('Launching game..')
const mcVersion = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer()).getMinecraftVersion()
const jExe = ConfigManager.getJavaExecutable()
if(jExe == null){
if(jExe == null || jExe.includes('jdk8')){
asyncSystemScan(mcVersion)
} else {
@ -260,7 +260,7 @@ function asyncSystemScan(mcVersion, launchAfter = true){
sysAEx.on('message', (m) => {
if(m.context === 'validateJava'){
if(m.result == null){
if(m.result == null || m.result.includes('jdk8')){
// If the result is null, no valid Java installation was found.
// Show this information to the user.
setOverlayContent(