Compiling (in memory) and Loading classes on fly

Hiya,
I have following classes:
public class Vehicle {Protected Sting reg;}
public class Car extends Vehicle
(public void print(){System.out.println(reg);}}
These classes (or different ones) are stored in one text file. The program must read these files then compile and load them dynamically in memory.
The link below authored by DCHSW deals with one class only (compile and loading) however it fails with more then one class particularly when it is subclassed.
http://forum.java.sun.com/thread.jsp?thread=347467&forum=4&message=1439418
How can we get the code mentioned at link above to compile (in memory) and load subclasses like the ones mentioned above.
Thanks
Derik

Hiya,
I have following classes:
public class Vehicle {Protected Sting reg;}
public class Car extends Vehicle
(public void print(){System.out.println(reg);}}
These classes (or different ones) are stored in one
text file. The program must read these files then
compile and load them dynamically in memory.
The link below authored by DCHSW deals with one class
only (compile and loading) however it fails with more
then one class particularly when it is subclassed.
Read the following post for full description of the problem
http://forum.java.sun.com/thread.jsp?forum=4&thread=417724
Any ideas?
Thanks
Derik
http://forum.java.sun.com/thread.jsp?thread=347467&foru
=4&message=1439418
How can we get the code mentioned at link above to
compile (in memory) and load subclasses like the ones
mentioned above.
Thanks
Derik

Similar Messages

  • An XJC compilation error - Could not load class (..) for type cvsversion

    I've got a strange compilation error using NetBeans 4.0 (I'd guess the version does not matter here) and Ant 1.6.2. When the following task is executed,
    <target name="compile_ofx_schema">
    <antcall target="clean-ofx"/>
    <delete dir="${ofx-jaxb-src.dir}"/>
    <mkdir dir="${ofx-jaxb-src.dir}" />
    <xjc schema="${schema.dir}/ofx102.xsd" package="com.xxx.ofx102" target="${ofx-jaxb-src.dir}">
    <arg value="-nv" />
    <arg value="-extension" />
    </xjc>
    </target>
    I get the error from NetBeans console,
    Class org.xml.sax.SAXException loaded from parent loader (parentFirst)
    Class java.io.IOException loaded from parent loader (parentFirst)
    D:\appserver\build.xml:797: unable to parse the schema. Error messages should have been provided
    at com.sun.tools.xjc.XJCTask._doXJC(XJCTask.java:334)
    at com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:283)
    at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:227)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:217)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:236)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
    BUILD FAILED (total time: 4 seconds)
    Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
    Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
    And when I run the Ant task from the command line, I don't get the error at all.
    Any help is greatly appreciated.

    That was a great finding from you. Thank you.
    I followed your alternative approach and updated the ant.jar file. The "Could not load class..." error went away but the stack trace still remains. Now I am clueless again since I have ant on the debug mode and can't find any more useful info.
    Class com.sun.tools.xjc.reader.internalizer.LocatorTable loaded from ant loader (parentFirst)
    Class java.util.HashSet loaded from parent loader (parentFirst)
    Class javax.xml.parsers.DocumentBuilderFactory loaded from parent loader (parentFirst)
    Couldn't load Resource org/netbeans/core/xml/DOMFactoryImpl.class
    Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.DocumentBuilderFactory
    Class org.apache.crimson.jaxp.DocumentBuilderFactoryImpl loaded from parent loader (parentFirst)
    Class javax.xml.parsers.SAXParserFactory loaded from parent loader (parentFirst)
    Couldn't load Resource org/netbeans/core/xml/SAXFactoryImpl.class
    Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.SAXParserFactory
    Class org.apache.crimson.jaxp.SAXParserFactoryImpl loaded from parent loader (parentFirst)
    Class javax.xml.parsers.DocumentBuilder loaded from parent loader (parentFirst)
    Class java.util.Map loaded from parent loader (parentFirst)
    Class javax.xml.parsers.SAXParser loaded from parent loader (parentFirst)
    Finding class com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic$ReferenceFinder
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic$ReferenceFinder.class
    Finding class com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/internalizer/AbstractReferenceFinderImpl.class
    Class org.xml.sax.helpers.XMLFilterImpl loaded from parent loader (parentFirst)
    Class com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl loaded from ant loader (parentFirst)
    Class com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic$ReferenceFinder loaded from ant loader (parentFirst)
    Class org.xml.sax.XMLFilter loaded from parent loader (parentFirst)
    Finding class com.sun.tools.xjc.reader.internalizer.VersionChecker
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/internalizer/VersionChecker.class
    Class com.sun.tools.xjc.reader.internalizer.VersionChecker loaded from ant loader (parentFirst)
    Finding class com.sun.tools.xjc.reader.internalizer.DOMBuilder
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-xjc.jar com/sun/tools/xjc/reader/internalizer/DOMBuilder.class
    Finding class com.sun.xml.bind.marshaller.SAX2DOMEx
    Loaded from D:\bbw\build\Common_3.6\Packaged\appserver\lib\jaxb\jaxb-impl.jar com/sun/xml/bind/marshaller/SAX2DOMEx.class
    Class org.xml.sax.ContentHandler loaded from parent loader (parentFirst)
    Class com.sun.xml.bind.marshaller.SAX2DOMEx loaded from ant loader (parentFirst)
    Class com.sun.tools.xjc.reader.internalizer.DOMBuilder loaded from ant loader (parentFirst)
    Class java.util.Stack loaded from parent loader (parentFirst)
    Class org.w3c.dom.Document loaded from parent loader (parentFirst)
    Class org.xml.sax.XMLReader loaded from parent loader (parentFirst)
    Class org.w3c.dom.Node loaded from parent loader (parentFirst)
    Class org.w3c.dom.Element loaded from parent loader (parentFirst)
    Class javax.xml.parsers.ParserConfigurationException loaded from parent loader (parentFirst)
    Class org.xml.sax.SAXException loaded from parent loader (parentFirst)
    Class java.io.IOException loaded from parent loader (parentFirst)
    D:\bbw\build\Common_3.6\Packaged\appserver\build.xml:799: unable to parse the schema. Error messages should have been provided
    at com.sun.tools.xjc.XJCTask._doXJC(XJCTask.java:334)
    at com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:283)
    at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:227)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:217)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:236)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
    BUILD FAILED (total time: 1 second)
    Any suggestions? BTW, I did not upgrade NetBeans to v5.5 due that my code is still JDK1.4 based.

  • Compiler Error: Unable to load class

    Hi,
    I'm having trouble getting my first custom tag to work. Details of the setup follow:
    ============= Tag Handler =============
    package whichtorrent.tags;
    import java.io.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class ScoreBarTag extends TagSupport {
    private String
    info_hash,
    width,
    height,
    barWidth,
    padding,
    fontSize,
    showText,
    showBar,
    showPlug,
    showVoteLink,
    goodColour,
    badColour,
    endsColour;
    public void setInfo_hash(String info_hash)
    this.info_hash = info_hash;
    public void setWidth(String width)
    this.width = width;
    public void setHeight(String height)
    this.height = height;
    public void setBarWidth(String barWidth)
    this.barWidth = barWidth;
    public void setPadding(String padding)
    this.padding = padding;
    public void setFontSize(String fontSize)
    this.fontSize = fontSize;
    public void setShowText(String showText)
    this.showText = showText;
    public void setShowBar(String showBar)
    this.showBar = showBar;
    public void setShowPlug(String showPlug)
    this.showPlug = showPlug;
    public void setShowVoteLink(String showVoteLink)
    this.showVoteLink = showVoteLink;
    public void setGoodColour(String goodColour)
    this.goodColour = goodColour;
    public void setBadColour(String badColour)
    this.badColour = badColour;
    public void setEndsColour(String endsColour)
    this.endsColour = endsColour;
    public int doStartTag() throws JspException {
    try {
    pageContext.getOut().print("This is my first tag!");
    } catch (IOException ioe) {
    throw new JspException("Error: IOException while writing to client"
    + ioe.getMessage());
    return SKIP_BODY;
    public int doEndTag() throws JspException {
    return EVAL_PAGE;
    ============== Library Descriptor ==============
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//
    DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <!-- a tag library descriptor -->
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>wt</shortname>
    <uri>www.whichtorrent.info</uri>
    <info>WhichTorrent Tags (http://www.whichtorrent.info)</info>
    <tag>
    <name>scoreBar</name>
    <tagclass>whichtorrent.tags.ScoreBarTag</tagclass>
    <bodycontent>empty</bodycontent>
    <info>Graphically display score for a given torrent.</info>
    <attribute>
    <name>info_hash</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>width</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>height</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>barWidth</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>padding</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>fontSize</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>showText</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>showBar</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>showPlug</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>showVoteLink</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>goodColour</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>badColour</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
    <name>endsColour</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    ============== Test Page ===============
    <%@ taglib uri="/WEB-INF/jsp/whichtorrentTaglib.tld"
    prefix="wt" %>
    <HTML>
    <HEAD>
    <TITLE>Tag Test</TITLE>
    </HEAD>
    <BODY bgcolor="#ffffcc">
    <B>wt:scoreBar prints</B>:
    <wt:scoreBar info_hash="" width="" height="" barWidth="" padding="" fontSize="" showText="" showBar="" showPlug="" showVoteLink="" goodColour="" badColour="" endsColour=""/>
    </BODY>
    </HTML>
    ====================================
    The compiler gets quite far, beyond checking that all the set methods are there, but then i get the message:
    org.apache.jasper.compiler.CompileException: /whichtorrent/tagTest.jsp(12,0) Unable to load class whichtorrent.tags.ScoreBarTag
    My directory structure is:
    /WEB-INF/whichtorrent/tags/ScoreBarTag.class
    /WEB-INF/jsp/whichtorrentTaglib.tld
    /whichtorrent/tagTest.jsp
    Any help would be very much aprreciated.
    Regards
    ~felix

    they are.. sorry i made a mistake in my original post. My class file is in..
    /WEB-INF/classes/whichtorrent/tags/
    Thanks for the prompt reply
    ~felix

  • Firefox and Thunderbird are using a lot of memory and load pages very slowly!

    CPU levels are going through the roof when using Thunderbird and Firefox.
    Both programs are freshly installed on a new and also freshly installed version of windows 7!
    Loading of my pages is taking forever and most pages don't load at all.
    My email is [email protected]
    My notebook got so hot that it turned itself off!
    Memory is above 250 KB for firefox and Thunderbird above 150 kb!

    I do not have a ComObjects folder under C:\Program Files (x86)\Common Files. That is not part of Firefox.
    wscript.exe is a utility included with Windows to run scripts at the system level. It generally is not used by major programs. If update.exe is starting up with Windows, you may be able to find the script that wscript.exe is running using [http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx Autoruns].
    It definitely sounds viral. I suggest deleting the update.exe file, although Windows might prevent you from doing that until you kill all related processes. And if you have a persistent infection, the file may be restored or re-downloaded.
    It might be easiest to seek assistance from a forum more dedicated to malware cleanups such as the following:
    * [http://www.bleepingcomputer.com/forums/forum22.html Virus, Trojan, Spyware, and Malware Removal Logs - BleepingComputer.com]
    * [http://forums.majorgeeks.com/forumdisplay.php?f=35 Malware Removal - MajorGeeks Support Forums]
    Hope you get it removed.

  • Howto Unload and Load Classes to/from server?

    Hi
    Have you an idea to load/unload (when i decide it) a classe to/from a server (tcp)?
    Thank you.

    Thank you
    I want to complete the client code, to load some class, from the server side.
    Am i clear?
    ...and "unload" a class, or "finalize" all the instances of a class located remotly (server side), is it possible?
    Server:
    import java.net.*;
    import java.io.*;
    public class Serveur{
    public static void main(String[] args) throws Exception{
        ServerSocket serveur = new ServerSocket(5000);
        while(true) {
          Socket socket = serveur.accept();
          BufferedReader in = new BufferedReader(
             new InputStreamReader(socket.getInputStream()));
          String cmd = in.readLine();
    // parle !!!
          DataOutputStream out = new DataOutputStream( socket.getOutputStream());
          if(cmd.equals("parle")){
            out.write("bonjour\n".getBytes());
          }else{
            out.write("commande inconnue ?\n".getBytes());
          socket.close();
    }Client:
    import java.net.*;
    import java.io.*;
    public class Client{
      public static void main(String[] args) throws Exception{
        Socket socket = new Socket("localhost", 5000);
        DataOutputStream out= new DataOutputStream( socket.getOutputStream());
        out.write(args[0].getBytes());
        out.write("\n".getBytes());
        BufferedReader in = new BufferedReader(
           new InputStreamReader(socket.getInputStream()));
        System.out.println(in.readLine());
        socket.close();
    }

  • Can't compile and load sample plugins

    Hi, I'm currently trying to learn the Illustrator SDK in order to develop plugins. I haven't been able to successfully compile (without warnings) and load the sample plugins into Illustrator; I keep getting "Error loading plugins…" I've attached screenshots that may be helpful. Any help is greatly appreciated.
    Specs:
    OS: OS X 10.9
    Xcode Version: 6.1.1
    Illustrator Version: CC 2014
    Illustrator SDK Version: CC 2014.1

    Specs:
    Illustrator Version: CC 2014
    Illustrator SDK Version: CC 2014.1
    Looks like your SDK version is newer than your Illustrator version. The Plugin::ReloadPlugin function in common/source/Plugin.cpp will return an error if it is trying to load newer versions of the suites. Run it under the debugger or put a printf statement before the return error; line.

  • Load:Class * not found - in portal

    In the webgui /portal a link is provided.
    when you click the link , which is mapped with the transaction
    code of the ABAP program. gets displayed.
    THis program is used to download PO into the File
    server.
    so File output path is given.
    The user uses F4 help to select the directory / filename as well
    In the bottom we are getting a messge
    load: class FileName not found
    and load: class Directory Select not found
    I use cl_gui_frontend_services=> directory_browse
    and kd_get_filename_on_f4.
    wat might be the problem for this?
    Give me your valuable suggestions
    This is urgent.

    Hi,
    the abap code you use, uses java for getting a filename and for directory browsing. So first of all you have to check,
    if java is activated in your browser. Second, you have to test the frontend services in webgui with transaction se37, ws_query, enter "cd" into field query and executer this. Then you will get a security popup, which you have to accept. If all runs ok,
    you will get the current home directory as result. If you get a java exception again, you have to check the network configuration
    in the java control. It should be the same, as in the browser. If this does not help, try to request the applet ws.jar from the mimerepository .../sap/its/mimes/webgui/2002/applets/ws.jar
    directly. Do you get the security dialog? The error you wrote above means, that the java applet ws.jar could not be loaded.
    Is this an inhouse problem? external or integrated IITS. Which browser, which java version?
    Regards,
    Ralf

  • Load:Class filename not found portal

    In the webgui /portal a link is provided.
    when you click the link , which is mapped with the transaction
    code of the ABAP program. gets displayed.
    THis program is used to download PO into the File
    server.
    so File output path is given.
    The user uses F4 help to select the directory / filename as well
    In the bottom we are getting a messge
    load: class FileName not found
    and load: class Directory Select not found
    I use cl_gui_frontend_services=> directory_browse
    and kd_get_filename_on_f4.
    wat might be the problem for this?
    Give me your valuable suggestions
    This is urgent.

    Hello,
    Can you tell us if you resolve your issue and how?
    Thanks

  • What is the workflow to compile and load an external class as a runtime library?

    I have a set of classes (with some large embeds) that I only want to load one by one at runtime as needed.
    I think that I need to compile each of these classes into a separate SWF and use one of the available loaders out there to load and link to them dynamically at runtime (am I on track so far?).
    I got a little mixed up in the details though, so I'd just like someone to give me the basic rundown on doing this, get the right termonology, and if you have any reference to the right tutorial on doing it, all the better!
    I'm using flex builder, and this is to be used in a flex application.
    Thanks!
    David

    Hi, thanks for the response!
    A couple of questions arise:
    1) If I use this approach am I correct in my understanding that all classes referenced by my library will be compiled into the final SWF? That will create a lot of duplicated classes since those classes are already being used and loaded in the main SWF. Is there a way to avoid this duplication problem?
    2) In trying to play with this approach I ran into a problem. When I create the SWF it fails to find a class Vector ("Type was not found or was not a compile-time constant: Vector"), I think I understand that this is because I am targeting flash player 9, but the code I am using require 10. I can't seem to find an option to change the target in a flex library project as I can in a regular actionscript or MXML project.
    Dave

  • Custom class loader and local class accessing local variable

    I have written my own class loader to solve a specific problem. It
    seemed to work very well, but then I started noticing strange errors in
    the log output. Here is an example. Some of the names are in Norwegian,
    but they are not important to this discussion. JavaNotis.Oppstart is the
    name of my class loader class.
    java.lang.ClassFormatError: JavaNotis/SendMeldingDialog$1 (Illegal
    variable name " val$indeks")
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:431)
    at JavaNotis.Oppstart.findClass(Oppstart.java:193)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at JavaNotis.SendMeldingDialog.init(SendMeldingDialog.java:78)
    at JavaNotis.SendMeldingDialog.<init>(SendMeldingDialog.java:54)
    at JavaNotis.Notistavle.sendMelding(Notistavle.java:542)
    at JavaNotis.Notistavle.access$900(Notistavle.java:59)
    at JavaNotis.Notistavle$27.actionPerformed(Notistavle.java:427)
    JavaNotis/SendMeldingDialog$1 is a local class in the method
    JavaNotis.SendMeldingDialog.init, and it's accessing a final local
    variable named indeks. The compiler automatically turns this into a
    variable in the inner class called val$indeks. But look at the error
    message, there is an extra space in front of the variable name.
    This error doesn't occur when I don't use my custom class loader and
    instead load the classes through the default class loader in the JVM.
    Here is my class loading code. Is there something wrong with it?
    Again some Norwegian words, but it should still be understandable I hope.
         protected Class findClass(String name) throws ClassNotFoundException
             byte[] b = loadClassData(name);
             return defineClass(name, b, 0, b.length);
         private byte[] loadClassData(String name) throws ClassNotFoundException
             ByteArrayOutputStream ut = null;
             InputStream inn = null;
             try
                 JarEntry klasse = arkiv.getJarEntry(name.replace('.', '/')
    + ".class");
                 if (klasse == null)
                    throw new ClassNotFoundException("Finner ikke klassen "
    + NOTISKLASSE);
                 inn = arkiv.getInputStream(klasse);
                 ut = new ByteArrayOutputStream(inn.available());
                 byte[] kode = new byte[4096];
                 int antall = inn.read(kode);
                 while (antall > 0)
                     ut.write(kode, 0, antall);
                     antall = inn.read(kode);
                 return ut.toByteArray();
             catch (IOException ioe)
                 throw new RuntimeException(ioe.getMessage());
             finally
                 try
                    if (inn != null)
                       inn.close();
                    if (ut != null)
                       ut.close();
                 catch (IOException ioe)
         }I hope somebody can help. :-)
    Regards,
    Knut St�re

    I'm not quite sure how Java handles local classes defined within a method, but from this example it seems as if the local class isn't loaded until it is actually needed, that is when the method is called, which seems like a good thing to me.
    The parent class is already loaded as you can see. It is the loading of the inner class that fails.
    But maybe there is something I've forgotten in my loading code? I know in the "early days" you had to do a lot more to load a class, but I think all that is taken care of by the superclass of my classloader now. All I have to do is provide the raw data of the class. Isn't it so?

  • How do I find out the exact path of each and every file that LabVIEW finds and loads into memory for a given top level vi?

    How do I find out the exact path of each and every file that LabVIEW finds and loads into memory for a given top level vi? There is probably a trivial, easy way to get this info, but I have not yet found it!  Thanks..

    Or if you want to grab all the paths programatically, try the attached VI.
    Open the top level that you want all the paths from and close all others, then open the
    attached and run it. It will return an array of all the VIs that the VI
    in question uses, including vi.lib VIs. You can filter these as well if
    you like.
    Ed
    Message Edited by Ed Dickens on 08-01-2005 07:01 PM
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    Get all paths.vi ‏29 KB

  • When I tried to load some mp3 files on to my samsung brightside I looked under card memory and my songs were there but when I clicked on my music it said no memory available remove files and I have an 8 gb micro sd card in and there is nothing else on it

    When I tried to load some mp3 files on to my samsung brightside I looked under card memory and my songs were there but when I clicked on my music it said no memory available remove files and I have an 8 gb micro sd card in and there is nothing else on it

    Whew.... got it to work after days of trying to figure.
    Got answer here:  http://forums.macrumors.com/showthread.php?t=1450821 from zblaze.
    Wiped phone completely, restored as NEW iphone through itunes.  Checked 'Sync all Music'.
    After that happens you can restore from backup.

  • Remove / unload external swf file(s) from the main flash file and load a new swf file and garbage collection from memory.

    I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
    This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/Down3()"
    import nl.demonsters.debugger.MonsterDebugger;
    var d:MonsterDebugger=new MonsterDebugger(this);
    stage.scaleMode=StageScaleMode.NO_SCALE;
    stage.align=StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, resizeHandler);
    // loader is the loader for portfolio page swf
    var loader:Loader;
    var loader2:Loader;
    var loader3:Loader;
    var loader1:Loader;
    //  resize content
    function resizeHandler(event:Event):void {
        // resizes portfolio page to center
    loader.x = (stage.stageWidth - loader.width) * .5;
    loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    /*loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;*/
    addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
    function onEnterFrame(ev:Event):void {
    var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
    loader = null;
    loader = new Loader();
    loader.name ="carousel1"
    //adds gallery.swf to stage at begining of movie
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requesterb);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    // stop gallery.swf from duplication over and over again on enter frame
    removeEventListener(Event.ENTER_FRAME, onEnterFrame);
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent):void {
    // re adds listener for contact.swf and about.swf
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
    var requester:URLRequest=new URLRequest("carouselLoader.swf");
        loader = null;
    loader = new Loader();
    loader.name ="carousel"
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    removeChild( getChildByName("about") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of gallery.swf
    MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    function Down1(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    var requester:URLRequest=new URLRequest("contactLoader.swf");
    loader2 = null;
    loader2 = new Loader();
    loader2.name ="contact"
    loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader2.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader2);
    loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    function Down3(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    var requester:URLRequest=new URLRequest("aboutLoader.swf");
    loader3 = null;
    loader3 = new Loader();
    loader3.name ="about"
    loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader3.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader3);
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    removeChild( getChildByName("carousel") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
    stop();

    Andrei1,
    Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
         loader.unload();
         loader2.unload();
         loader3.unload();
    I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
         function killLoad():void{
         try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
         loader.unload(); loader2.unload(); loader3.unload();
    I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly?  Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
    ---- Here is my updated code ----
    // variable for external loaders
    var loader:Loader;
    var loader1:Loader;
    var loader2:Loader;
    var loader3:Loader;
    // makes borders resize with browser size
    function resizeHandler(event:Event):void {
    // resizes portfolio page to center
         loader.x = (stage.stageWidth - loader.width) * .5;
         loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
    //adds gallery.swf to stage at begining of moviie
         Down();
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent = null):void {
    // re adds listener for contact.swf and about.swf
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
         var requester:URLRequest=new URLRequest("carouselLoader.swf");
         loader = new Loader();
         loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader.load(requester);
         } catch (error:SecurityError) {
         trace(error);
         this.addChild(loader);
         loader.x = (stage.stageWidth - 739) * .5;
         loader.y = (stage.stageHeight - 500) * .5;
    // sure this is not the best way to do this - but it is unload external swfs
         loader.unload();
         loader2.unload();
         loader3.unload();
    // remove eventlistner and prevents duplication of gallery.swf
         MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         function Down1(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         var requester:URLRequest=new URLRequest("contactLoader.swf");
         loader2 = null;
         loader2 = new Loader();
         loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);    
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader2.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader2);
         loader2.x = (stage.stageWidth - 658.65) * .5;
         loader2.y = (stage.stageHeight - 551.45) * .5;
    loader.unload();
    loader2.unload();
    loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         function Down3(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         var requester:URLRequest=new URLRequest("aboutLoader.swf");
         loader3 = null;
         loader3 = new Loader();
         loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader3.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader3);
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
         loader.unload();
         loader2.unload();
         loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
         stop();

  • Failed to load class properties and qualifiers for class BDD_UsePackage in task sequence. 0x80041002

    Following situation. In SCCM we have one Standalone Primray Site Server and two Site Server. The two site server are also SMS Provider. MDT 2012 was installed on all three Servers and the Config Manager Integration was run. When starting the Console
    on any of this server and editing an MDT Task Sequence, it occasionally pops up an error "An error occured when loading the task sequence". TaskSequenceProvider.log File throws a lot of errors:
    [PID: 2824] Invoking method SMS_TaskSequence.LoadFromXml TaskSequenceProvider 20.06.2012 10:28:50 4916 (0x1334)
    Failed to load class properties and qualifiers for class BDD_UsePackage in task sequence. 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:28:50 4916 (0x1334)
    Failed to load node Use Toolkit Package from XML into WMI 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:28:50 4916 (0x1334)
    Failed to load children steps for node "Applikation" from XML 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:28:50 4916 (0x1334)
    Failed to load children steps for node "" from XML 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:28:50 4916 (0x1334)
    Failed to load XML for the task sequence into WMI 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:28:50 4916 (0x1334)
    [PID: 2824] Done with method SMS_TaskSequence.LoadFromXml TaskSequenceProvider 20.06.2012 10:28:50 4916 (0x1334)
    Tried removing the integration on all SMS Provider Machines and readded them. It does not make a differenence. Does anyone know if MDT supports the use of multiple SMS Providers? When I only use one Provider and deinstall the other two, it works ok.

    Some more info from the log files:
    TaskSequenceProvider.log
    [1680680 PID:5228] Initializing provider for namespace root\sms\site_P01 TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    [1680680  PID:5228] Initialization of provider for namespace root\sms\site_P01 succeeded TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    [PID: 5228] Invoking method SMS_TaskSequence.ExportXml TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Failed to load class properties and qualifiers for class BDD_UsePackage in task sequence. 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Failed to export task sequence to XML 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    [PID: 5228] Done with method SMS_TaskSequence.ExportXml TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Setting status complete:  status code = 0x80041002; Failed to load class properties and qualifiers for class BDD_UsePackage in task sequence. TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    [PID: 5228] Invoking method SMS_TaskSequence.LoadFromXml TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Failed to load class properties and qualifiers for class BDD_UsePackage in task sequence. 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Failed to load node Use Toolkit Package from XML into WMI 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Failed to load children steps for node "Applikation" from XML 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Failed to load children steps for node "" from XML 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Failed to load XML for the task sequence into WMI 0x80041002 (2147749890) TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    [PID: 5228] Done with method SMS_TaskSequence.LoadFromXml TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    Setting status complete:  status code = 0x80041002; Failed to load class properties and qualifiers for class BDD_UsePackage in task sequence. TaskSequenceProvider 20.06.2012 10:51:38 4424 (0x1148)
    SMS Provider logs the following:
    CExtUserContext::EnterThread : User=A2\trth1 Sid=0x0105000000000005150000001BB949E9D7F6AADBC3309AA56BAB0000 Caching IWbemContextPtr=0000000005777900 in Process 0x9f8 (2552) SMS Provider 20.06.2012 10:51:47 3008
    (0x0BC0)
    Context: SMSAppName=SMS Administrator Console SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: MachineName=vswlieca2146.A2.loc SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: UserName=A2\trth1 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: ObjectLockContext=fdf8ab87-cf50-43bd-a48a-d5bb99c8034f SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: ApplicationName=Microsoft.ConfigurationManagement.exe SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: ApplicationVersion=5.0.0.0 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: LocaleID=MS\0x409 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: __ProviderArchitecture=32 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: __RequiredArchitecture=0 (Bool) SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: __ClientPreferredLanguages=en-US,en SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: __GroupOperationId=590802 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Context: __WBEM_CLIENT_AUTHENTICATION_LEVEL=6 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    CExtUserContext : Set ThreadLocaleID OK to: 1033 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    CSspClassManager::PreCallAction, dbname=CM_P01 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    ExecMethodAsync : SMS_ObjectLock::ReleaseLocks SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Requested class =SMS_ObjectLock SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    Requested num keys =0 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    CExtProviderClassObject::DoExecuteMethod ReleaseLocks SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    CSspSEDO::ReleaseLocks: ********** Releasing SEDO Lock for object SMS_TaskSequencePackage.PackageID="P010013A" for user A2\trth1. ********** SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)
    CExtUserContext::LeaveThread : Releasing IWbemContextPtr=91715840 SMS Provider 20.06.2012 10:51:47 3008 (0x0BC0)

  • Firefox wont load. Task mgr says 104k memory, and nothing else. FF Safe mode is 100k memory, but still nothing

    Cant get any response form FF. I click the icon, and it loads in Taskmanager with 104k memory. If I hold down shift to trigger safe mode, it loads 100k memory and hangs there.
    Theres no GUI visible.
    I thought I'll download FF again, and try and install it, after downloading FF4, the setup program does exactly the same thing! 104k memory!
    I've no idea what to do next! :-) Any ideas?

    I had recently installed windows update KB2467174 and began getting exactly the problem described here. I uninstalled the update (from Programs and Features), rebooted, and the problem went away.
    Here are the extensions I have installed:
    - Adblock Plus 1.3.7
    - ChatZilla 0.9.86.1
    - Flashblock 1.5.14.2
    - Java Console 6.0.25
    And Plugins:
    - Adobe Acrobat 10.0.1.434
    - Java Deployment Toolkit 6.0.250.6
    - Java Platform SE 6 U25 6.0.250.6
    - Shockwave Flash 10.3.181.14
    - Shockwave for Director 11.5.9.620
    - Silverlight Plug-In 4.0.60310.0

Maybe you are looking for

  • Unable to Find "Oracle BI Publisher" menu in MS-WORD

    Hi, I have de-installed oracle bi publisher desktop and re-installed it, i could find the "Insert,Data,Preview" toolbar but couldnot get Oracle BI Publisher menu near help menu in MS-WORD. I am using MS-WORD 2003 and have tried re-installing but no l

  • Office Web Apps deploy certificate error

    IIS Using Domain Certificate, when access "https://fqdn/hosting/discovery"  with certificate error.  Office web apps using same CA with Front End Server. new web farm with this new certificate name. Any suggest? Thanks.

  • Opatch lsinventory not showing correct information

    Hi Gurus, I have just applied april 2013 PSU on Grid and Database home. But when I check opatch lsinventory from grid and ora11g user both shows different information. If anyone could please help me understand if anything went wrong. Our environment

  • Error in mru internal routine ORA-20001  Error in MRU

    Hi, In my APEX application, tabular form is used. Add row and Submit buttons are all present. When a user enter all the details and click Add row or Submit, the values are stored in the DB. But once in a while, when the user clicks the Submit button,

  • Unable to control brightness in target display mode

    I use my 27" mid2010 iMac as a display for my MacPro. However after the Mac OS X recent update to 10.6.8, I noticed I am unable to control the screen brightness. Usually, I was able to do so using the iMac keyboard to adjust brightness etc. but now t