String nm = "sun.awt.X11GraphicsEnvironment";

 grep -r JAVA_HOME /root




import java.awt.GraphicsEnvironment;
import java.security.AccessController;
import java.security.PrivilegedAction;



public class bbaa {
    
    private static Boolean headless;

    private static Boolean defaultHeadless;
    
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        System.out.println(System.getProperty("javaplugin.version"));
        //System.out.println(getHeadlessProperty());
        aaa();
    }
    
    private static void aaa() {
        GraphicsEnvironment ge;
        String nm = "sun.awt.X11GraphicsEnvironment";
        Class<GraphicsEnvironment> geCls;
        try {
            System.out.println("init");
            geCls = (Class<GraphicsEnvironment>)Class.forName(nm);
            System.out.println("success");
        } catch (ClassNotFoundException ex) {
            ex.printStackTrace();
        }
    }
    
    
}


阅读更多
个人分类: JAVA it linux RHEL7
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭