简体   繁体   中英

System.setProperty(“java.version”, “1.6”) not working Android 5

I was using this command on Android 4 and it was working without any problem: System.setProperty("java.version", "1.6"); but when I upgrade my Android to 5 I start getting this error: Ignoring attempt to set property "java.version" to value "1.6"

I want to set this property to 1.6 because I am using mvel library and this library checks this value inside it to do some logic, I don't want to modify the source of library to handle this problem, so How can I solve this problem ?

我没有测试,但正如API参考所说 ,它可能是只读属性然后你不能这样做。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM