System.setProperty范围 [英] Scope of System.setProperty

查看:2675
本文介绍了System.setProperty范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是的<一个范围href="http://developer.android.com/reference/java/lang/System.html#setProperty%28java.lang.String,%20java.lang.String%29">System.setProperty在Android的?

What's the scope of System.setProperty in Android?

如果我设置一个属性(比如 System.setProperty(http.keepAlive,假)),不会影响系统中的所有应用程序,目前应用程序的当前任务或当前线程的唯一?

If I set a property (say System.setProperty("http.keepAlive", "false")), does it affect all apps in the system, the current app, the current task or the current thread only?

这哪里是记录?

推荐答案

Java的系统属性不跨进程边界,它们被保存在内存中,并连接到虚拟机的一个实例。因此,如果内应用设置系统属性它将是不可见的设备上运行的其他应用程序。

Java "system" properties do not cross process boundaries, they are held in memory and are tied to a single instance of the virtual machine. Therefore if you set a system property within application it will not be visible to other applications running on the device.

这篇关于System.setProperty范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆