[flexcoders] Re: Possible to invoke Flex2b2 compiler as a Java class?

2006-04-28 Thread Avi Flax



Anyone? Please?

--- In flexcoders@yahoogroups.com, Avi Flax [EMAIL PROTECTED] wrote:

 Dave, thanks for your help! What you said makes sense, but
 unfortunately I'm still having trouble with it.
 
 Here's my ColdFusion code:
 
 cfscript
  MXMLc = URLClassLoader.LoadJarClass(C:\Program Files\Adobe\Flex
 Framework 2\lib\mxmlc.jar, flex2.tools.Compiler);
 
  Args = '-flexlib C:\Program Files\Adobe\Flex Framework
 2\frameworks\ C:\inetpub\builder\mxml\test1.mxml;
 
  MXMLc.main(JavaCast(String, Args));
 /cfscript
 
 I *think* this follows what you suggested. When I try to run this, I
 get the following error message:
 
 The selected method main was not found.
 
 Either there are no methods with the specified method name and
 argument types, or the method main is overloaded with arguments types
 that ColdFusion can't decipher reliably. If this is a Java object and
 you verified that the method exists, you may need to use the javacast
 function to reduce ambiguity.
 
 So... any more tips?
 
 BTW I do know that I'm initializing the class properly; if I pass
 MXMLc to the CFDUMP tag, I see the following:
 
 object of flex2.tools.Compiler
 Methods:
  main (returns void)
  hashCode (returns int)
  getClass (returns java.lang.Class)
  wait (returns void)
  wait (returns void)
  wait (returns void)
  equals (returns boolean)
  notify (returns void)
  notifyAll (returns void)
  toString (returns java.lang.String)
 FILE_SPECS:
  file-specs
 
 Thanks!
 Avi
 
 --- In flexcoders@yahoogroups.com, Dave Wolf gatorj24@ wrote:
 
  In any Java JAR there can be a main-class which is the class called
  when no classname is specified. That main-class will also have a
  main() method which si the default entry point of the class. That
  method has the following signature
  
  public static void main(String[] args);
  
  Where the String[] are the command line arguments.
  
  Call the main() method passing in whatever command line arguments
  there would be as the String[].
  
  -- 
  Dave Wolf
  Cynergy Systems, Inc.
  Macromedia Flex Alliance Partner
  http://www.cynergysystems.com
  
  Email: dave.wolf@
  Office: 866-CYNERGY
  
  --- In flexcoders@yahoogroups.com, Avi Flax avif@ wrote:
  
   I'd like to invoke the Flex2b2 compiler from ColdFusion using
the Java
   class, if possible.
   
   I looked at the file MANIFEST.MF in mxmlc.jar, and saw: 
   
   Main-Class: flex2.tools.Compiler
   
   So, I tried this in CF:
   
   Application.com.MXMLc =
   Application.com.URLClassLoader.LoadJarClass(CompilerPath,
   flex2.tools.Compiler);
   
   That works, and I can CFDUMP the object to see a list of its methods
   and properties, but:
   
   - I can't set the property FILE_SPECS: I get an
   java.lang.IllegalAccessException with the message: field is final
   
   - I can't invoke the compile method. My code is:
   Application.com.MXMLc.compile(JavaCast(String, MxmlPath));
   I get the CF message The selected method compile was not found.
   
   Can anyone shed some light on this? Is it documented anywhere?
   
   I apologize if this is silly; I'm expert with CFML but not
experienced
   with Java interaction.
   
   I did try to just use CFEXECUTE at first, with mxmlc.exe, but had
   trouble with it. I've always found CFEXECUTE frustrating, so I
thought
   I'd give this approach a try.
   
   Thanks!
   Avi Flax
   Flex Newbie
   Arc90, New York
   http://www.arc90.com/
  
 











--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Re: Possible to invoke Flex2b2 compiler as a Java class?

2006-04-28 Thread Peter Farland



Sorry, this method of invocation is not supported by Flex.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Avi Flax
Sent: Friday, April 28, 2006 10:37 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Possible to invoke Flex2b2 compiler as a Java
class?

Anyone? Please?

--- In flexcoders@yahoogroups.com, Avi Flax [EMAIL PROTECTED] wrote:

 Dave, thanks for your help! What you said makes sense, but 
 unfortunately I'm still having trouble with it.
 
 Here's my ColdFusion code:
 
 cfscript
  MXMLc = URLClassLoader.LoadJarClass(C:\Program Files\Adobe\Flex

 Framework 2\lib\mxmlc.jar, flex2.tools.Compiler);
 
  Args = '-flexlib C:\Program Files\Adobe\Flex Framework 
 2\frameworks\ C:\inetpub\builder\mxml\test1.mxml;
 
  MXMLc.main(JavaCast(String, Args)); /cfscript
 
 I *think* this follows what you suggested. When I try to run this, I 
 get the following error message:
 
 The selected method main was not found.
 
 Either there are no methods with the specified method name and 
 argument types, or the method main is overloaded with arguments types 
 that ColdFusion can't decipher reliably. If this is a Java object and 
 you verified that the method exists, you may need to use the javacast 
 function to reduce ambiguity.
 
 So... any more tips?
 
 BTW I do know that I'm initializing the class properly; if I pass 
 MXMLc to the CFDUMP tag, I see the following:
 
 object of flex2.tools.Compiler
 Methods:
  main (returns void)
  hashCode (returns int)
  getClass (returns java.lang.Class)
  wait (returns void)
  wait (returns void)
  wait (returns void)
  equals (returns boolean)
  notify (returns void)
  notifyAll (returns void)
  toString (returns java.lang.String)
 FILE_SPECS:
  file-specs
 
 Thanks!
 Avi
 
 --- In flexcoders@yahoogroups.com, Dave Wolf gatorj24@ wrote:
 
  In any Java JAR there can be a main-class which is the class called 
  when no classname is specified. That main-class will also have a
  main() method which si the default entry point of the class. That 
  method has the following signature
  
  public static void main(String[] args);
  
  Where the String[] are the command line arguments.
  
  Call the main() method passing in whatever command line arguments 
  there would be as the String[].
  
  --
  Dave Wolf
  Cynergy Systems, Inc.
  Macromedia Flex Alliance Partner
  http://www.cynergysystems.com
  
  Email: dave.wolf@
  Office: 866-CYNERGY
  
  --- In flexcoders@yahoogroups.com, Avi Flax avif@ wrote:
  
   I'd like to invoke the Flex2b2 compiler from ColdFusion using
the Java
   class, if possible.
   
   I looked at the file MANIFEST.MF in mxmlc.jar, and saw: 
   
   Main-Class: flex2.tools.Compiler
   
   So, I tried this in CF:
   
   Application.com.MXMLc =
   Application.com.URLClassLoader.LoadJarClass(CompilerPath,
   flex2.tools.Compiler);
   
   That works, and I can CFDUMP the object to see a list of its 
   methods and properties, but:
   
   - I can't set the property FILE_SPECS: I get an 
   java.lang.IllegalAccessException with the message: field is
final
   
   - I can't invoke the compile method. My code is:
   Application.com.MXMLc.compile(JavaCast(String, MxmlPath)); I get

   the CF message The selected method compile was not found.
   
   Can anyone shed some light on this? Is it documented anywhere?
   
   I apologize if this is silly; I'm expert with CFML but not
experienced
   with Java interaction.
   
   I did try to just use CFEXECUTE at first, with mxmlc.exe, but had 
   trouble with it. I've always found CFEXECUTE frustrating, so I
thought
   I'd give this approach a try.
   
   Thanks!
   Avi Flax
   Flex Newbie
   Arc90, New York
   http://www.arc90.com/
  
 







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links



 









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












[flexcoders] Re: Possible to invoke Flex2b2 compiler as a Java class?

2006-04-24 Thread Avi Flax



Dave, thanks for your help! What you said makes sense, but
unfortunately I'm still having trouble with it.

Here's my ColdFusion code:

cfscript
 MXMLc = URLClassLoader.LoadJarClass(C:\Program Files\Adobe\Flex
Framework 2\lib\mxmlc.jar, flex2.tools.Compiler);

 Args = '-flexlib C:\Program Files\Adobe\Flex Framework
2\frameworks\ C:\inetpub\builder\mxml\test1.mxml;

 MXMLc.main(JavaCast(String, Args));
/cfscript

I *think* this follows what you suggested. When I try to run this, I
get the following error message:

The selected method main was not found.

Either there are no methods with the specified method name and
argument types, or the method main is overloaded with arguments types
that ColdFusion can't decipher reliably. If this is a Java object and
you verified that the method exists, you may need to use the javacast
function to reduce ambiguity.

So... any more tips?

BTW I do know that I'm initializing the class properly; if I pass
MXMLc to the CFDUMP tag, I see the following:

object of flex2.tools.Compiler
Methods:
 main (returns void)
 hashCode (returns int)
 getClass (returns java.lang.Class)
 wait (returns void)
 wait (returns void)
 wait (returns void)
 equals (returns boolean)
 notify (returns void)
 notifyAll (returns void)
 toString (returns java.lang.String)
FILE_SPECS:
 file-specs

Thanks!
Avi

--- In flexcoders@yahoogroups.com, Dave Wolf [EMAIL PROTECTED] wrote:

 In any Java JAR there can be a main-class which is the class called
 when no classname is specified. That main-class will also have a
 main() method which si the default entry point of the class. That
 method has the following signature
 
 public static void main(String[] args);
 
 Where the String[] are the command line arguments.
 
 Call the main() method passing in whatever command line arguments
 there would be as the String[].
 
 -- 
 Dave Wolf
 Cynergy Systems, Inc.
 Macromedia Flex Alliance Partner
 http://www.cynergysystems.com
 
 Email: [EMAIL PROTECTED]
 Office: 866-CYNERGY
 
 --- In flexcoders@yahoogroups.com, Avi Flax avif@ wrote:
 
  I'd like to invoke the Flex2b2 compiler from ColdFusion using the Java
  class, if possible.
  
  I looked at the file MANIFEST.MF in mxmlc.jar, and saw: 
  
  Main-Class: flex2.tools.Compiler
  
  So, I tried this in CF:
  
  Application.com.MXMLc =
  Application.com.URLClassLoader.LoadJarClass(CompilerPath,
  flex2.tools.Compiler);
  
  That works, and I can CFDUMP the object to see a list of its methods
  and properties, but:
  
  - I can't set the property FILE_SPECS: I get an
  java.lang.IllegalAccessException with the message: field is final
  
  - I can't invoke the compile method. My code is:
  Application.com.MXMLc.compile(JavaCast(String, MxmlPath));
  I get the CF message The selected method compile was not found.
  
  Can anyone shed some light on this? Is it documented anywhere?
  
  I apologize if this is silly; I'm expert with CFML but not experienced
  with Java interaction.
  
  I did try to just use CFEXECUTE at first, with mxmlc.exe, but had
  trouble with it. I've always found CFEXECUTE frustrating, so I thought
  I'd give this approach a try.
  
  Thanks!
  Avi Flax
  Flex Newbie
  Arc90, New York
  http://www.arc90.com/
 










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Re: Possible to invoke Flex2b2 compiler as a Java class?

2006-04-12 Thread Matt Horn
If you look at the mxmlc compiler's shell script (in the bin dir),
you'll see that all it's doing is invoking the JAR (with the various
arguments of course):

java $VMARGS -jar $FLEX_HOME/lib/mxmlc.jar $*

hth

matthew horn
flex docs

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Wolf
Sent: Tuesday, April 11, 2006 7:30 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Possible to invoke Flex2b2 compiler as a Java
class?

In any Java JAR there can be a main-class which is the class called
when no classname is specified.  That main-class will also have a
main() method which si the default entry point of the class.  That
method has the following signature

public static void main(String[] args);

Where the String[] are the command line arguments.

Call the main() method passing in whatever command line arguments
there would be as the String[].

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY

--- In flexcoders@yahoogroups.com, Avi Flax [EMAIL PROTECTED] wrote:

 I'd like to invoke the Flex2b2 compiler from ColdFusion using the Java
 class, if possible.
 
 I looked at the file MANIFEST.MF in mxmlc.jar, and saw: 
 
 Main-Class: flex2.tools.Compiler
 
 So, I tried this in CF:
 
 Application.com.MXMLc =
 Application.com.URLClassLoader.LoadJarClass(CompilerPath,
 flex2.tools.Compiler);
 
 That works, and I can CFDUMP the object to see a list of its methods
 and properties, but:
 
 - I can't set the property FILE_SPECS: I get an
 java.lang.IllegalAccessException with the message: field is final
 
 - I can't invoke the compile method. My code is:
 Application.com.MXMLc.compile(JavaCast(String, MxmlPath));
 I get the CF message The selected method compile was not found.
 
 Can anyone shed some light on this? Is it documented anywhere?
 
 I apologize if this is silly; I'm expert with CFML but not experienced
 with Java interaction.
 
 I did try to just use CFEXECUTE at first, with mxmlc.exe, but had
 trouble with it. I've always found CFEXECUTE frustrating, so I thought
 I'd give this approach a try.
 
 Thanks!
 Avi Flax
 Flex Newbie
 Arc90, New York
 http://www.arc90.com/








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Possible to invoke Flex2b2 compiler as a Java class?

2006-04-11 Thread Dave Wolf
In any Java JAR there can be a main-class which is the class called
when no classname is specified.  That main-class will also have a
main() method which si the default entry point of the class.  That
method has the following signature

public static void main(String[] args);

Where the String[] are the command line arguments.

Call the main() method passing in whatever command line arguments
there would be as the String[].

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY

--- In flexcoders@yahoogroups.com, Avi Flax [EMAIL PROTECTED] wrote:

 I'd like to invoke the Flex2b2 compiler from ColdFusion using the Java
 class, if possible.
 
 I looked at the file MANIFEST.MF in mxmlc.jar, and saw: 
 
 Main-Class: flex2.tools.Compiler
 
 So, I tried this in CF:
 
 Application.com.MXMLc =
 Application.com.URLClassLoader.LoadJarClass(CompilerPath,
 flex2.tools.Compiler);
 
 That works, and I can CFDUMP the object to see a list of its methods
 and properties, but:
 
 - I can't set the property FILE_SPECS: I get an
 java.lang.IllegalAccessException with the message: field is final
 
 - I can't invoke the compile method. My code is:
 Application.com.MXMLc.compile(JavaCast(String, MxmlPath));
 I get the CF message The selected method compile was not found.
 
 Can anyone shed some light on this? Is it documented anywhere?
 
 I apologize if this is silly; I'm expert with CFML but not experienced
 with Java interaction.
 
 I did try to just use CFEXECUTE at first, with mxmlc.exe, but had
 trouble with it. I've always found CFEXECUTE frustrating, so I thought
 I'd give this approach a try.
 
 Thanks!
 Avi Flax
 Flex Newbie
 Arc90, New York
 http://www.arc90.com/








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/