importClass(Packages.java.util.ArrayList); function search() { var list = new ArrayList(); ... }
Kind regards, Robby Pelssers -----Oorspronkelijk bericht----- Van: Des Magner [mailto:d...@icandriveatractor.com] Verzonden: zo 23-1-2011 1:25 Aan: users@cocoon.apache.org Onderwerp: Adding my Java code to flowscript Hi I am trying to add some custom code to be called from my flowscript but with no success. I followed the instructions in the user documentation to the letter (http://cocoon.apache.org/2.1/userdocs/flow/java.html). I have added my source directory entry to the component-instance in the format "file:/path/to/my/source" but it doesn't seem to want to pick up the code. Say I have the following code in my flowscript: var resource = new Packages.Test(); with the file Test.java placed in my source dir as specified above, I consistently get the following error: org.mozilla.javascript.EvaluatorException: "file:///....js", line ..: Not a Java class: [JavaPackage Test] I can get around it by placing the compiled class in the cocoon/WEB-INF/classes directory but this is not a very elegant solution. Any help would be greatly appreciated. Thanks Des --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org