Check the code example at the end of this page http://www.openbluedragon.org/manual/?/cfscript_java#notes
 David Mulder

On 16-2-2012 9:01, David G Ortega wrote:
Hi,

ysterday I was able to run embedded java inside the destop release
under windows 7. I didn't have luck with the Ready2Run version. See
this thread 
https://groups.google.com/group/openbd/browse_thread/thread/9ab88b5a5d493d2f

The problem now is that openBD or the tools.jar java compiler can not
find any package, only the java ones. While openBD can find the
packages when using the createObject function, inside the java script
it can't. If you see the example below I have made to imports
java.util is fine but com.mongodb is not. Not to say that the mongo
jar comes with the build.

Here is the test:

<cfscript>
mongo = createObject("java","com.mongodb.Mongo").Init();
</cfscript>

<cfscript language="java">
        import java.util.*;
        import com.mongodb.*;

        Mongo mongoConnection = new Mongo();
</cfscript>

here is the error:

cfScript language='java' Compilation Error
Request /test/test3.cfm
Template        C:/jetty-openbd/webapps/openbd/test/test3.cfm

Line#-6: package com.mongodb does not exist
Line#4: cannot find symbol symbol : class Mongo
Line#4: cannot find symbol symbol : class Mongo
<cfscript language='java'>
1
2
   import java.util.*;
3
   import com.mongodb.*;
4

5
   Mongo mongoConnection = new Mongo();
</cfscript>


--
online documentation: http://openbd.org/manual/
  google+ hints/tips: https://plus.google.com/115990347459711259462
    http://groups.google.com/group/openbd?hl=en

    Join us @ http://www.OpenCFsummit.org/ Dallas, Feb 2012

Reply via email to