21 lines
776 B
Java
21 lines
776 B
Java
import java.awt.GraphicsEnvironment;
|
|
|
|
public class Decapite{
|
|
private boolean isHeadless;
|
|
private boolean isHeadlessInstance;
|
|
private GraphicsEnvironment environnementGraphique;
|
|
|
|
public Decapite(){
|
|
this.environnementGraphique = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
|
this.isHeadless = environnementGraphique.isHeadless();
|
|
this.isHeadlessInstance = environnementGraphique.isHeadlessInstance();
|
|
}
|
|
|
|
@Override
|
|
public String toString(){
|
|
String isHeadlessString = this.isHeadless ? "oui" : "non";
|
|
String isHeadlessInstanceString = this.isHeadlessInstance ? "oui" : "non";
|
|
|
|
return "isHeadless dit : " + isHeadlessString + "\nisHeadlessInstance dit : " + isHeadlessInstanceString;
|
|
}
|
|
} |