Skip to content

Commit 7122f33

Browse files
committed
Set default Java type if version is specified
Adds a check to set 'java.type' to 'jre' if 'java.version' is present and 'java.type' is not a string. Ensures proper initialization of Java options before starting.
1 parent f6f5561 commit 7122f33

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Launch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ export default class Launch extends EventEmitter {
264264
if (this.options.downloadFileMultiple < 1) this.options.downloadFileMultiple = 1
265265
if (this.options.downloadFileMultiple > 30) this.options.downloadFileMultiple = 30
266266
if (typeof this.options.loader.path !== 'string') this.options.loader.path = `./loader/${this.options.loader.type}`;
267+
if (this.options.java.version && typeof this.options.java.type !== 'string') this.options.java.type = 'jre';
267268
this.start();
268269
}
269270

0 commit comments

Comments
 (0)