If you just want to run that command, you can use CFEXECUTE.  If you want to
run it in the same JVM as CF (in page), then you're going to have to add
that JVM argument to the JVM arguments in the CF admin (so it's on CF's
JVM), and then you should be able to do it.  Have you tried building a
program in Java that does exactly what you want CF to do just to check the
algorithm?  Then run it with the same JVM args (available in
%cf_root%/runtime/bin/jvm.config for standalone versions) as CF has to make
sure the environment.  

Cheers,
barneyb

> -----Original Message-----
> From: Kev McCabe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 25, 2004 10:32 AM
> To: CF-Talk
> Subject: Calling Java Direct in a CFM Page
>
> Guys,
>
> Been racking my brains all day on this one, so may be some
> one would be able
> to help.
>
> I want to run this:
>
> java
> -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apac
> he.xerces.pars
> ers.XIncludeParserConfiguration sax.Writer afile.xml
>
> This works ok on a Dos Prompt.
>
> So I added the Class paths to the JRUN JVM config file.
>
> And I know this works as I run:
>
> <CFSCRIPT>
> Version =
> CreateObject("java","org.apache.xerces.impl.Version");
> </CFSCRIPT>
> <CFDUMP var="#Version#"/>
>
> This comes back with the correct version of xerces 2.6
>
> So does any one know how I can parse using sax.Writer
>
> The reason I can't use the XMLTRANSFORM is because I want to
> use xInclude
> which xerces 2.6 gives me.
>
> What I have tried is this:
> <CFSCRIPT>
> Version =
> CreateObject("java","org.apache.xerces.impl.Version");
> SAXParser =
> CreateObject("java","org.apache.xerces.parsers.SAXParser");
> ParsedDocument = SAXParser.parse('afile.xml');
> </CFSCRIPT>
> <CFDUMP var="#variables#"/>
>
> This gives me the details of the version & SAXPARSER but no
> ParsedDocument
> and I don't seem to be able to reference this.
>
> I know this may be the wrong place for what I'm getting to
> but any resources
> about using JAVA in a CFM page would be useful.
>
> Many Thanks in Advance
>
>
> _____________________________
> Mr Kev McCabe
> Senior ETV Developer,
> British Sky Broadcasting
> First Floor North East,
> West Cross House
> Grant Way
> Isleworth
> Middlesex
> TW7 5QD
> [EMAIL PROTECTED]
> http://www.sky.com
> tel: +44 (0) 20 7941 5329
> fax: +44 (0) 20 7941 5243
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to