Verify java version compatibility

后端 未结 4 1474
一整个雨季
一整个雨季 2021-01-05 19:44

I have a jar file compiled using jdk 1.7, I\'d like to check during load time that the java runtime environment my jar is running under is 1.7 or newer. Is there a way to do

4条回答
  •  长情又很酷
    2021-01-05 20:22

    Consider deploying your software using Java Web Start technology. You can then specify in the jnlp file the exact java version supported by your application.

    Specifically the minimum java version is declared in the j2se element.

    For example:

    
    
        
            Dynamic Tree Demo
            Dynamic Team
            
            
        
        
            
            
            
    
        
        
         
         
    
    

    See this link for more information

提交回复
热议问题