如何从ColdFusion访问Java类的公共静态成员?
You run the createObject but don't call the "init" before running the static method. For example:
<cfset systemObject = createObject("java", "java.lang.System") />
<cfoutput>#systemObject.currentTimeMillis()#</cfoutput>
In this case "currentTimeMillis()" is a static method of the System class.
我还要提到该类必须在CF的类路径中。
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.