Stupid question, but what JDK are you using to compile the Java code?

CF uses 1.4.x, so make sure you use a 1.4 JDK to compile the code.

If you use a 1.5+ compiler, you will run into issues.

Mark

On 4/17/07, Russ <[EMAIL PROTECTED]> wrote:
> AFAIK, the main method is not meant to be called by any other classes... it's 
> only meant to be called when the program is directly executed.
>
> Take all the code from the main method, and put it into its own method.  Call 
> that method.  Use the main method only when testing the app directly from 
> eclipse or command line.  (you can instantiate a class of itself and then 
> call the methods of that object).
>
> Try the code I posted earlier, and see if that works from CF.  Once you get 
> that working, then put in your actual code.
>
> Once again,  even if you do get the main somehow executing, it's poor coding 
> practices and will cause you more problems in the long run.  Your code should 
> be properly structured.
>
> Russ
>
> > -----Original Message-----
> > From: Andrew Whone [mailto:[EMAIL PROTECTED]
> > Sent: Monday, April 16, 2007 11:50 AM
> > To: CF-Talk
> > Subject: Re: CF and Java
> >
> > I tried that and it's still the same error message so presumably the array
> > is problematic but should work see:
> > http://weblogs.macromedia.com/cantrell/archives/2003/06/passing_coldfus.cf
> > m
> >
> > I put the blank constructor in the code thus:
> >
> > public class IRMark {
> >    /**
> >     * Generate and print the IRmark.
> >     *
> >     * @param args - Pass the filename of the input document
> >     * @throws Exception
> >     */
> >       public IRMark() {}
> >       public static void main(String args[]) throws Exception {
> >
> >               // Init the Apache XML security library
> >               Init.init();
> > .......etc
> > I am wiser but no further on.
> > Any more suggestions much appreciated.
> > A+
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275479
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to