Démarrage + java 17 avec ancienne config
This commit is contained in:
parent
0e3ac16027
commit
c383972a5b
@ -409,6 +409,20 @@ class ProcessBuilder {
|
|||||||
}
|
}
|
||||||
args.push('-Xmx' + ConfigManager.getMaxRAM())
|
args.push('-Xmx' + ConfigManager.getMaxRAM())
|
||||||
args.push('-Xms' + ConfigManager.getMinRAM())
|
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())
|
args = args.concat(ConfigManager.getJVMOptions())
|
||||||
|
|
||||||
// Main Java Class
|
// Main Java Class
|
||||||
|
@ -88,7 +88,7 @@ document.getElementById('launch_button').addEventListener('click', function(e){
|
|||||||
loggerLanding.log('Launching game..')
|
loggerLanding.log('Launching game..')
|
||||||
const mcVersion = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer()).getMinecraftVersion()
|
const mcVersion = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer()).getMinecraftVersion()
|
||||||
const jExe = ConfigManager.getJavaExecutable()
|
const jExe = ConfigManager.getJavaExecutable()
|
||||||
if(jExe == null){
|
if(jExe == null || jExe.includes('jdk8')){
|
||||||
asyncSystemScan(mcVersion)
|
asyncSystemScan(mcVersion)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ function asyncSystemScan(mcVersion, launchAfter = true){
|
|||||||
sysAEx.on('message', (m) => {
|
sysAEx.on('message', (m) => {
|
||||||
|
|
||||||
if(m.context === 'validateJava'){
|
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.
|
// If the result is null, no valid Java installation was found.
|
||||||
// Show this information to the user.
|
// Show this information to the user.
|
||||||
setOverlayContent(
|
setOverlayContent(
|
||||||
|
Loading…
Reference in New Issue
Block a user