How to include assigned .as files in MXMLC ant task ?

When i use mxmlc ant task, i found that
the tag <include-sources/> doesn't support !
( described by http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a63.html )
neither SDK version 3.x nor 4.x
Are they lying?!
How to include assigned .as files ?
Thank you !

My understanding is that mxmlc will use all available resources in the source path, as needed. Instead of giving it individual resources to include, you simply need to give it the source-path that contains those resources. This is different from a library project, which may need to include individual classes that are never used in that library.

Similar Messages

  • How can I assign image file name from Main() class

    I am trying to create library class which will be accessed and used by different applications (with different image files to be assigned). So, what image file to call should be determined by and in the Main class.
    Here is the Main class
    import org.me.lib.MyJNIWindowClass;
    public class Main {
    public Main() {
    public static void main(String[] args) {
    MyJNIWindowClass mw = new MyJNIWindowClass();
    mw.s = "clock.gif";
    And here is the library class
    package org.me.lib;
    public class MyJNIWindowClass {
    public String s;
    ImageIcon image = new ImageIcon("C:/Documents and Settings/Administrator/Desktop/" + s);
    public MyJNIWindowClass() {
    JLabel jl = new JLabel(image);
    JFrame jf = new JFrame();
    jf.add(jl);
    jf.setVisible(true);
    jf.pack();
    I do understand that when I am making reference from main() method to MyJNIWindowClass() s first initialized to null and that is why clock could not be seen but how can I assign image file name from Main() class for library class without creating reference to Main() from MyJNIWindowClass()? As I said, I want this library class being accessed from different applications (means different Main() classes).
    Thank you.

    Your problem is one of timing. Consider this simple example.
    public class Example {
        public String s;
        private String message = "Hello, " + s;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example();
            ex.s = "world";
            System.out.println(ex.toString());
    }When this code is executed, the following happens in order:
    1. new Example() is executed, causing an object to constructed. In particular:
    2. field s is given value null (since no value is explicitly assigned.
    3. field message is given value "Hello, null"
    4. Back in method main, field s is now given value "world", but that
    doesn't change message.
    5. Finally, "Hello, null" is output.
    The following fixes the above example:
    public class Example {
        private String message;
        public Example(String name) {
            message = "Hello, " + name;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example("world");
            System.out.println(ex.toString());
    }

  • How to include a dynamic file

    Hi,
    The following syntax does not work:
    <%@ include file="htmls/mydocs/<%=dynamicFileName%>.htm" %>
    could you tell me how to include a dynamic file?
    thanks,
    peterzhu

    The include directive <%@ include ... does not work with dynamic file names, because it is evaluated at compile time.
    You have to use the include standard action <jsp:include page=... This is executed during runtime, and hence a dynamic file name can be used.

  • ANT how to include NetBeans Jar  files in my script of ANT ??

    ANT how to include NetBeans Jar files in my script of ANT ??

    I mean the library say swing layout ...
    which is SwingLayOuts1.0.jar ...
    in side this there is folder org.jDesktop....
    I want this folder in my jar file ...
    also ....
    My question ... i know the path of the jar file of NetBeans .... i can copy that ...dirctly ... but if m using Netbeans editor ... can i give NetBeans class to my jar command for ANT...........

  • MXMLC ANT task not including AIR libraries

    Hi Guys,
    This is the MXMLC ant task which I am using the compile my test app. If i set the static-link-runtime-shared-libraries="true" , the AIR libraries gets merged into my output swf. But when this attribute is set to false, I dont see the AIR libraries added to my SWF file. As a result when I run the AIR version fo my project, I dont see the application launch right. I have so many RSL in my project and I wanted to have static-link-runtime-shared-libraries="false". Is there a way to have AIR libraries include in my output file and still have this static-link-runtime-shared-libraries="false".
    <mxmlc
        file="${project.name}/src/Test.mxml"
        output="${build.mxmlc.dir}/Test.swf"
        static-link-runtime-shared-libraries="true"
        >
         <load-config filename="${air.config}"/>
         <source-path path-element="${project.name}/src" />
         <source-path path-element="${flex.frameworks.dir}/libs/air"/>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
        <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
        </runtime-shared-library-path>
       </mxmlc>
    My RSL are compiled using COMPC task and the AIR libraries are included into them using the below attributes of compc task.
    <source-path path-element="${basedir}/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/airframework/src" />
    <source-path path-element="${flex.frameworks.dir}/projects/air/ServiceMonitor/src" />
    I am really stuck with this problem and not able to get my release build launch right. Again, any light on this problem will be of great help.!

        <mxmlc
             file="${project.name}/src/Test.mxml"
             output="${build.mxmlc.dir}/Test.swf"
             static-link-runtime-shared-libraries="true"
        >
              <load-config filename="${air.config}"/>
              <source-path path-element="${project.name}/src" />
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/framework.swc">
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swz"/>
                    <url rsl-url="${rsl.dir}/framework_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
             <runtime-shared-library-path path-element="${flex.frameworks.dir}/libs/datavisualization.swc">
                    <url rsl-url="${rsl.dir}/datavisualization_3.2.0.3958.swf"/>
             </runtime-shared-library-path>
        </mxmlc>
    This also seems to work. AIR libraries are included in my output SWF. It all happens right when I have static-link-runtime-shared-libraries="true" . Why? Why does that not work when i have static-link-runtime-shared-libraries="false"  ??

  • Mxmlc Ant Task Paths

    Hello,
    I'm trying to run the following mxmlc ant task from a relative path:
            <mxmlc
                file="flx/MyApp.mxml"
                output="web/MyApp.swf"
                context-root="MyApp"
                services="web/WEB-INF/flex/services-config.xml"
                compatibility-version="3">
                <source-path
                    path-element="flx"/>
            </mxmlc>
    If I run the task from within the MyApp directory it works fine, but I want to run it from a relative directory, eg:
            ant -f MyApp/build.xml
    or from an ant build file:
            <ant dir="MyApp"/>
    However, in both cases I just get the following error:
            [mxmlc] command line: Error: unable to open 'web/WEB-INF/flex/services-config.xml'
    I really need to use relative paths as it is running as a sub-project of a larger project via an ant build, and there is no concept of changing directories within ant.
    Does anybody know how I can get relative paths to works?
    Thanks

    Thanks. That's what I ended up doing in the end. I also added (prior to that)
    <property name="project.dir" value="."/>
    So that it can be run without manually specifying project.dir. (project.dir will only be set to . if it is not already set by an outer script).
    What I really wanted was for mxmlc to run relative to the ant task, eg.
    <ant dir="project"/>
    Then each task inside the ant build file should run relative to "project". This is how <javac/> works. I don't think Adobe like relative paths though.

  • How to include a .class file in a jsp page

    hi everyone,
    i know the syntax as:
    <%@ include file = "filename.class" %>
    then at run time the server could not find the class file
    if i use,
    <%@ page import = "FileName.class" %>
    then also the same problem persists
    & if i use
    <jsp:include page = "Relative address"/>
    the problem still remains as it is...
    please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
    P.S. do not suggest me to include the class file in a package & then use
    <%@ page import = "packageName.ClassFileName" %>
    i
    Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AM

    Ankit_JIITU wrote:
    i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
    if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
    "package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
    i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
    If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
    >
    i am assuming that u have a deep knowledge of developing EJB applications.

  • How to include external JavaScript files

    Hello All,
    i'm wondering haow can i include externel JavaScrip files, there is an clip-example with a function in the same JSP file
    but not how to include a file?
    <body>
    <script language='JavaScript' src="menu/menu.js'></script>
    If some one has a clip i would appreciate.
    Thanks
    Gino

    <script src="resources/myscript.js"></script>
    I did this exact thing in my jsp but it did not work, nothing popped up.
    When I tried replacing it with:
    <script language="JavaScript" type="text/javascript"><![CDATA[
    function postMessage(message) {
    alert(message);
    ]]></script>
    It worked. Can someone tell me why? Can't i refer to javascript files this way?

  • How to include a .js file into .jsp file.[.js file resides in a package]

    Hi,
    How do i include an external .js(JavaScript) file into a JSP file?My .js file is located in some package(lets say abc.jar). Below is my application structure:-
      jsp
       |
       ->MyJsp.jsp
      lib
       |
       |
    abc.jar
        |
        |
        ->com.abc.test
                     |
                     |
                     ->Test.java
                     ->abc.jsHow do i include "abc.js" file in "MyJsp.jsp" file?
    Please help.
    Thanks,
    Kiran
    Edited by: Adimulam on Jun 2, 2008 1:22 PM

    Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?

  • How to include external .js file into .ear file using NetBean 5.5.1?

    is it possible to include external .js file into .ear file using NetBean 5.5.1? if not, then where should I placed the external .js file and how to write the src="xxx" element? (that is , how to write the path of "xxx"?)
    I am using JBOSS 4.2.2 GA as server
    thx!!

    Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?

  • [SOLVED]How to include a .Changelog file in a package?

    I want to include a .Changelog file in a package I'm building. But in the wiki, it only mentions that it could exist, and not how to include it.
    Someone knows how to do it?
    Last edited by mcsilva (2010-02-21 14:39:05)

    just put a file named `ChangeLog` in the same directory as PKGBUILD and makepkg
    Edit: wonder It did take me a minute to validate my assumption.
    Last edited by lolilolicon (2010-02-21 12:46:24)

  • How to include a jsp file in servlets and javabeans

    Hi to all..I have a jsp file which contains some database connections and I would like to include in that file in my servlets and javabeans.What coding can i use?Can show me sample coding.

    Hi to all..I have created a javabean storing the
    database connections. How do i include and call that
    bean in my servlet and javabeans?Can pls show me some
    sample coding?I am new to servlets and beans.The same way you do with normal Java Classes. If you are new to Java, I suggest you go to http://java.sun.com/docs/books/tutorial/index.html and look through the first couple of tutorials.
    As a note, it is best to put all your objects into packages, especially if you use JDK 1.4 or higher.

  • How to include external javascript file in an html

    hello
    i've an html file placed in apache/webapps/test folder this html file includes an external javascript file placed at same level
    i'm includind the file as
    <script src="file1.js"></script>but the file does not gets included
    but when the sam folder "test" is paste outside apache the html file including the external file runs properly.
    Thank You

    flounder wrote:
    cotton.m wrote:
    What's really pathetic is that this is your third cross post on this same stupid off topic topic.
    You are really a dumb f&#117;ck you know that?If they knew that they were a dumb f&#117;ck then they wouldn't be a dumb f&#117;ck!That's a logical and reasonable conclusion. Therefore I very much doubt that the OP is capable of it.
    Hmmm this is interesting. It now shows the entity escapes rather than their values when you quote.

  • How to Include a ZUL file in another ZUL file

    Hi
    I need to Include a ZUL file in another ZUL file
    which is not in same JAR. Both are in different JAR.. but i want to Include that...!
    Thanks...!

    You want to include a ZUL file, whatever that is, that's in one JAR inside another ZUL file that's in another JAR? I don't even understand the question. Get it out of the first JAR and include it inside the 2nd ZUL file ???

  • How to include a property file in ear

    I have a weblogic integration application inside which I have created java control project and processes. I am packaging the entire application using ant script (wlwBuild).
    My requirement is to include a text file inside this ear and access it from any of the java classes inside the java control project.
    Is there any way to do that?

    You can add a java project in the workshop. In that java project you can have properties files, XML files or any other file.
    These files get boundled with the application EAR and you can access them as if they are available in your classpath.
    Hope that answers your question.

Maybe you are looking for