We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The title says it all. ServerEnvironment.isDevelopment throws an NPE when System.getProperty("sun.java.command") returns null.
ServerEnvironment.isDevelopment
System.getProperty("sun.java.command")
This happens for example if I attempt to start a java application as a service via Apache Jsvc.
changing
String command = System.getProperty("sun.java.command"); return command.startsWith(INTELLIJ_MAIN) && !command.contains(INTELLIJ_JUNIT) ? "true" : null;
to
String command = System.getProperty("sun.java.command"); return command != null && command.startsWith(INTELLIJ_MAIN) && !command.contains(INTELLIJ_JUNIT) ? "true" : null;
should fix the problem.
This bug is easily reproducible by executing
Properties props = System.getProperties(); props.remove("sun.java.command"); System.setProperties(props);
before calling ServerConfig.builder()
ServerConfig.builder()
If anyone needs a workaround, passing the missing property to jsvc bypasses the problem: /usr/bin/jsvc -Dsun.java.command=my.made.up.command ...
/usr/bin/jsvc -Dsun.java.command=my.made.up.command ...
The text was updated successfully, but these errors were encountered:
What JVM are you using?
Sorry, something went wrong.
Oracle jdk on debian jessie:
> java -version java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode) > uname -a Linux debian-jessie 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux
The problem only occurs when I start the app via jsvc. It runs just fine when I start it on the same machine directly via java instead of jsvc.
java
jsvc
This is really just a minor issue since a easy workaround exists, but I guess fixing it in 1.0 would still be nice :)
Thanks for the report. We'll get this fixed and issue another RC :)
f2c8b52
No branches or pull requests
The title says it all.
ServerEnvironment.isDevelopment
throws an NPE whenSystem.getProperty("sun.java.command")
returns null.This happens for example if I attempt to start a java application as a service via Apache Jsvc.
changing
to
should fix the problem.
This bug is easily reproducible by executing
before calling
ServerConfig.builder()
If anyone needs a workaround, passing the missing property to jsvc bypasses the problem:
/usr/bin/jsvc -Dsun.java.command=my.made.up.command ...
The text was updated successfully, but these errors were encountered: