Java

Functions

  • BundleInfo if the given object is loaded by a OSGi bundle, this function is returning information about that bundle
  • CreateDynamicProxy wrap the given component with a java class that implements the given interfaces.
  • CreateObject The CreateObject function takes different arguments depending on the value of the first argument:
  • GetClassPath returns a array containing the Java classpath of the current enviroment.
  • GetPageContext Gets the current PageContext (http://www.lucee.org/javadoc/lucee/runtime/PageContext.html) object that provides access to page attributes and configuration, request and response objects.
  • JavaCast Converts the data type of a CFML variable to pass as an argument to an overloaded method of a Java object. Use only for scalar and string arguments. [type - quicky] boolean,int,long,float,double,string
  • Serialize opposite of evaluate, this function serialize all cfml object and all serializble Java objects. can also serilize Components.
  • UnserializeJava literal defintion of a serialized Java Object by function serialize

Guides

  • Lucee 5 and OSGi Lucee 5 is completely based around OSGi
  • Using Java in Lucee ### Do you really need Java? ### Before you start creating Java objects in Lucee you should ask yourself: Do I really need Java here or can I get the same result with CFML alone? It's been said in computing that "premature optimization is the root of all evil" and Sean will (rightfully) remind you that "perfection is the enemy of the good", so if you can achieve similar results without referring to Java objects -- please stick to CFML path ### When should you use Java? ### Having said that, there are some instances where it makes sense to use Java objects directly: use * you want to use a library that was written in Java * you must optimize a bottleneck segment of code for speed In this tutorial I will focus on the first reason for using Java

Tags

  • <cfobject> Lets you call methods in COM, CORBA, and JAVA objects.