
com.fathzer.launcher.Console Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-check-launcher Show documentation
Show all versions of java-check-launcher Show documentation
A java application launcher that checks if used JRE is
compatible with launched application
The newest version!
package com.fathzer.launcher;
import java.text.MessageFormat;
import java.util.ResourceBundle;
/** A {@link Logger} that outputs its messages to System.err.
*/
public class Console implements Logger {
private static final String WRONG_JAVA_VERSION_PATTERN;
private static final String FATAL_ERROR_MESSAGE;
static {
final ResourceBundle bundle = Localization.MESSAGES;
WRONG_JAVA_VERSION_PATTERN = bundle.getString("console.unsupported.java.version.pattern");
FATAL_ERROR_MESSAGE = bundle.getString("console.fatal.error.message");
}
public void fatalError(Exception exception) {
System.err.println(FATAL_ERROR_MESSAGE);
exception.printStackTrace();
}
public void wrongJavaVersion(Version min, String current) {
final Object[] args = new Object[] {current, min};
System.err.println(MessageFormat.format(WRONG_JAVA_VERSION_PATTERN, args));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy