Skip to main content
Participant
March 27, 2008
Question

CFObject and java Class

  • March 27, 2008
  • 1 reply
  • 238 views
Hi,
I am trying to call a java class using cfobject tag.
I placed my all classes under D:\cfm\ecpay\classes folder . And add this path to jvm.config file.
I am getting class Not Found Exception while running my page.


Here is the code of cfobject

<cfobject
type = "java"
name = "myObj"
class = "ExcelToDb2"
action = "create">
<cfset ret = myObj.init()>

can some help me out on this.

Thanks
This topic has been closed for replies.

1 reply

Participating Frequently
March 27, 2008
It is pretty straight forward and I think there would be a problem for "Classpath". Please check it again in your CF admin. There would be also syntax error.

Restarting the server is also required in case you compile a new class etc.

Alternatively you can copy your classes into the directory "cfroot\wwwroot\WEB-INF\classes" and restart the server before testing them.