How can I add jar files into the namespace in code?

My friends:
I need to add jar files into my namespace dynamicly in my code.But the jar files might be repeated, I am not sure.so, i wonder how can I add them into my namespace, ignoring the repeated files?
This is my code:
URL[] urlArrayA = new URL[5];
urlArray[0] = sample1;
urlArray[1] = sample2;
URL[] urlArrayB = new URL[5];
urlArrayB[0] = sample3;
urlArrayB[1] = sample4;
URLClassLoader urlClassLoaderA = URLClassLoader.newInstance(urlArrayA);
URLClassLoader urlClassLoaderB = URLClassLoader.newInstance(urlArrayB);
how can i visit classes in urlClassLoaderA from classes in urlClassLoaderB?

could anyone please answer the question for me ? thank you...

Similar Messages

  • How can i add Custom fields into the

    Dear Experts
    We have Ecc6.0 system,
    How can i add Custom fields into the Infotype Screen(PA30),i heard that we do it by PM01 Tcode.
    But in PM01 i am unable to find the enhance infotype tab.
    How can i do it ....pls help.....
    Regards
    Sajid

    Hi,
    Do it thru the third tab : Single Screen.
    There write down the infotype number (e.g. 0022) and say generate objects.
    Regards,
    Dilek

  • How can i add an image into the header

    When printing a webpage i would like to ad an image into the header? Is this possible?

    Thanks. The triangle was buried in the image. If you hadn’t told me where to look, I would never have found it!
    Michelle
    Michelle Lancto
    Jewish Endowment Foundation
    a division of the Jewish Federation of Western Massachusetts
    Phone: 413-732-9994                Fax: 413-737-4348
    <mailto:[email protected]> [email protected]
    <http://www.jefwesternmass.org/> www.jefwesternmass.org 
    <http://www.jewishwesternmass.org/> www.jewishwesternmass.org
    JEF_Logos_1101_JFWM for email LOW RES
    Confidentiality Notice
    The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy any copies.

  • How can i add a file name(the text of the file name) as a child node to existing node in a treeView1 ?

    bool exists = false;
    TreeNode newNodeParsed = null;
    TreeNode rootNode = treeViewMS1.Nodes[0];
    TreeNode nextNode = rootNode;
    string f = Path.GetFileName(txtUploadFile.Text);
    TreeNode subnode = new TreeNode(txtDir.Text);
    TreeNode filename = new TreeNode(f);
    if (!txtDir.Text.Contains("/"))
    foreach (TreeNode node in rootNode.Nodes)
    if (node.Text == txtDir.Text)
    exists = true;
    break;
    if (exists == true)
    subnode.Nodes.Add(f);
    else
    rootNode.Nodes.Add(subnode);
    subnode.Nodes.Add(f);
    The rootNode is the root directory in the treeView1
    subnode is a node inside the root. For example the subnode name is manuelisback
    I'm checking if the subnode exist i want to add the file for example (lightning1.jpg) to be under subnode.
    If the subnode is not existing add the subnode to the root and then add the file name lightning1.jpg under the subnode.
    But the file name is never added under the subnode:
    I added manualy the lightning1.jpg under test.
    But the lightning1.jpg also should be added to be under manuelisback. There should be two lightning1.jpg here.
    One under manuelisback and one under test. The one under test i added manualy from my ftp server.
    But the one i want to be under manuelisback i'm trying to add from my program and it dosen't add it to there.
    And when i'm using a breakpoint i see on subnode the text manuelisback and i see on f the text lightning1.jpg

    If I understand your question correctly, you might want to try changing:
    if (!txtDir.Text.Contains("/"))
    foreach (TreeNode node in rootNode.Nodes)
    if (node.Text == txtDir.Text)
    exists = true;
    break;
    if (exists == true)
    subnode.Nodes.Add(f);
    else
    rootNode.Nodes.Add(subnode);
    subnode.Nodes.Add(f);
    to something like:
    if (!txtDir.Text.Contains("/"))
    foreach (TreeNode node in rootNode.Nodes)
    if (node.Text == txtDir.Text)
    subnode = node;
    exists = true;
    break;
    if (exists == true)
    subnode.Nodes.Add(f);
    else
    rootNode.Nodes.Add(subnode);
    subnode.Nodes.Add(f);
    rootNode.Nodes.Add(f);
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • How do I add a jar file into the build path of the compiler?

    Hey,
    I'm trying to import a jar file into the build path of the compilation process, but it does not find the packages or the classes that are in it.
    I think I don't add it right...
              ArrayList<String> options=new ArrayList<String>();
              options.add("-d");
              options.add(targetDirectory);
              options.add("-classpath");
              for(String str:includeDirectory)
                   options.add(str);
              if (!compiler.getTask(writer, fileManager, diagnostics, options, classes, compilationUnits).call());
                    ....and I've tried this way:
         public void setTargetDirectory(String targetDirectory) {
              this.targetDirectory = "-d " + targetDirectory;
         private void compile(Iterable<? extends JavaFileObject> compilationUnits) throws Exception {
              ArrayList<String> options = new ArrayList<String>();
              options.add(targetDirectory);
              String classPath="-cp ";// tried this also with "-classpath"
              for (String str : includeDirectory)
                   classPath+=str+":";
              options.add(classPath);
         if (!compiler.getTask(writer, fileManager, diagnostics, options, classes, compilationUnits).call())
              // throw new Exception("Compilation Error");
         }Thanks in advance,
    Adam.
    Edited by: Adam-Z. on Feb 24, 2010 5:41 AM
    Edited by: Adam-Z. on Feb 24, 2010 5:42 AM

    Thank you for your reply,
    Q: Are there .class files in that directory in that jar file? (the compiler doesn't ( can't )) look for directories, it can just look for specific files , and scan to get a list of all files matching certain criteria. So if there are no class files, it will say the package doesn't exist, even if there is a directory, possibly containing other files.yes there are class files in the jar, the tree structure:
    j2MeDataChunkGenerator_Plugin\(lots of class files)
    META-INF\manifest.mf
    and thats it.
    , your code will only work on windows because other platforms use a different path separator. You should use java.io.File.pathSeparator not explicit ';" when building your classpath. (this is unrelated to your problem, but you should correct it)will do, thanks.
    Q: Is that error in your post formatted by your own diagnostics? (we could possibly help you better if we didn't have to guess!!)I would not post my own error code, this text is generated by the compiler diagnostic.
    {code}
         System.err.println(" Error details: " + diagnostic.getMessage(null));
    {code}
    Q: Is line 3 of ImageCroper_Editor.java (sic) an import statement? (we could possibly help you better if we didn't have to guess!!)it is an import error... didn't the error message stated that it is an import problem? wired, I'm sure before it did. anyway it is an import error.
    Also you don't show us what the variable includeDirectory is in terms of type, and contents, that might be helpful. (we could possibly help you better if we didn't have to guess!!)It has only one String object: "D:\%Important Documents\WorkSpaces\PacMan\ApplicationManager\Plug-in\Data Chunk Designer.jar"
    the last file on the classpath list.
    Q: Have you proven this? that i did post, in this long line of text.
    Q: Is the compiler finding other classes (in other packages) in that same jar file?No. all the class files are in the jar, they all have entries that start with "j2MeDataChunkGenerator_Plugin\*.class", and since I get 47 errors I guess it does not load any other class.
    thank you for you comments, the problem with having these errors, is that I can't even get a piece of information where this error is coming from, only that it is an import loading error package not found, what does that mean? that the jar was not loaded in compilation(no error about this), that the jar is corrupted(no error about this), that the path is incorrect(it is correct I made sure), that there is no such package in the jar(There is), that the compiler does not load the package(does it even do that?), really I can't even guess why this happens, I've been at this on and of all day today, really annoying.
    Thanks,
    Adam.

  • How can I add image files to a executable jar file ?

    Could you tell me how can I add image files to executable jar file ?
    package structure:
    ../com/Main.class
    ../images/..

    Please don't cross post, and read this
    http://forum.java.sun.com/thread.jsp?forum=31&thread=271751
    I've answered the question in the New To Java thread.

  • How can I add .m4r files (thatI have shortened to 30 seconds or less) to iTunes 11.0.1? I cannot find a ringtones folder in Itunes ans it won't let me drag the files to the sidebar...

    How can I add .m4r files (that I have shortened to 30 seconds or less) to iTunes 11.0.1? I cannot find a ringtones folder in Itunes and it won't let me drag the files to the sidebar...thanks!

    How can I add .m4r files (that I have shortened to 30 seconds or less) to iTunes 11.0.1? I cannot find a ringtones folder in Itunes and it won't let me drag the files to the sidebar...thanks!

  • I shot video on a Panasonic P2 and I'm trying to import the MXF files to Final Cut Pro but when I try to import, the only thing that imports is a blurry image of each clip. There's no audio and no video...how can I import MXF files into Final Cut Pro?

    I shot video on a Panasonic P2 and I'm trying to import the MXF files to Final Cut Pro but when I try to import, the only thing that imports is a blurry image of each clip. There's no audio and no video...how can I import MXF files into Final Cut Pro?

    at the end, you say "import preferences", which program are you describing?
    So im safer using footage that is remotely being pulled from iphoto...
    vs
    using footage that is imported into FCP from imovie?
    Is there anything i can do in fcp to make this footage more reliable or safer or more stable as i pull remotely from iphoto?
    All the footage, and all the libraries to all programs, or on a new pegasus 12tb raid 5 setup fyi.

  • How can i add new files to my ipod from a different computer  without losing the added files on my ipod?

    how can i add new files to my ipod touch from a diferent computer without losing the added files already on my ipod?

    Email them? Use DropBox?  What type of files?

  • How to package other jar files into one jar?

    How to package other jar files into one jar? How can i get the class in the inner jar file?

    Generally not a good idea. The Java runtime won't be able to load classes from those "inner" jars, you'd have to write your own classloader to do that. It's not a brilliant idea, generally, anyway, since the point of having lots of jars is to keep your application modular. Bundling them all together like that means you have to re-deploy the whole thing to fix, for instance, one small bug in one small library
    If you really want to do this, there's an Eclipse plugin called FatJar, but I urge you to consider whether you really want to do it first.

  • How can i put Jar Files in Java Runtime.?

    HI,
    how can i put jar files in JRE so that they are accessible every where.? is there some way.?
    Regards,
    AA

    Closest you could get to this I think is to explode all your jars into the same parent directory. Then if you put that directory on the classpath, you should be able to access all classes in all jar files

  • How to open a .JAR file on the Z30

    Hi,
    Would anyine know how to open a .JAR file on the Z30?
    I get a message saying "Unable to open" when I click on the .jar file i want to open in my blackberry & install.
    Cheers
    Mario

    JAR files are for older java phones, they dont work on BB10
    maybe you should look into using SNAP to get some apps yoru looking for
    http://supportforums.blackberry.com/t5/Downloaded-Applications-for/You-Upgraded-to-OS-10-2-1-and-wan...
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • How to refer a .jar file in the code.

    How to refer a .jar file in the code.
    I want to use a library dnsjava.jar, which I download from the internet. I want to know how to refer it
         If I am compiling the code on Solaris
         If I compiling the code on windows using eclipse.
    I added the following line in my code to refer to this library. But it always complains of not found the class
    import org.xbill.DNS.*;
    I tried the following to add this library but did not work
    On eclipse/windows: Went to window-> preferences -> BuildPath _> class path Variable.
    On Solaris: Could not add this library /opt/java_reference/v1.6.0_04/jre/lib. Although I am logged in as root, but not able to add the library there. Complains of Permission denied.

    Set the classpath option when compiling.
    javac -classpath /path/to/lib/dnsjava.jar YourProgram.java
    I don't use Eclipse, but it probably has a library list on your project preferences. Add it there.
    Regards,
    Henrique Abreu

  • How do I get my file into the time line in Premiere Pro CC?

    How do I get my file into the time line in Premiere Pro CC? I am use to Premier Pro CS6 and unfortunately my labtop took a crash and I lost all of my adobe products. I wanted to check out a trial version and I cannot seem to find one for CS6! Please Help Me! My project is due tonight!!!!!

    Hi Aneumann,
    Welcome to the Forums.
    You have to just right click on the clip imported, in the project panel and select new sequence from clip. You can also go to file menu>new>sequence and create a sequence and then drag the clips after importing them , into the timeline.
    Regards,
    Vinay

  • How can I sync text files into iPhone?

    How can I sync text files into iPhone? like doc. txt. for reading or editing

    The native iPhone OS doesn't allow that. I think there are several solutions to this, some of which may be against the AT&T or Apple rules. One legitimate solution is The Missing Sync for iPhone by mark/space (http://www.markspace.com).
    Before I had an iPhone, I owned a copy of The Missing Sync for Windows Mobile. It was a pretty decent app. In my opinion, though, their app for the iPhone is NOT worth the price ($40 new, $25 for a cross-grade).
    Also, check the App Store (if you have 2.0 software)--there may be an app that does this, probably for a lot less $.

Maybe you are looking for

  • To find total in blocked alv

    hi experts, i have created blocked ALV program. in the o/p , it displays list of recors for open items,then list of records for cleared items. now i want it  to display sum of both open and cleared items of particular column. in grid display it is di

  • Address Book Sync is gunking up my MacBook Pro!

    Everytime I first start up my MacBook from either sleep or first turning it on, it's ridiculously slow - everything I type takes about 30 seconds to show up on the screen while the little rainbow pinwheel does its thing. I took a look at the Activity

  • CAE - Integrated Configuration Trace file location?

    Hi, I am tracing some debug information inside an User Defined Function in a graphical mapping. This mapping is used in an Integrated Configuration, so running only in the adapter engine. I usually see my debug trace in SXMB_MONI. Can you tell how to

  • Warehouse Door & Staging bay determination in inbound delivery

    Hi All I have maintained below configurations but system is not able to determine door & staging bay automatically. 1. Storage types, storage sections and bins for door, staging area 2. Staging area/door determination group 3. defined warehouse doors

  • Safari could not download the file because there is not enough free disk

    I'm trying to download to the desktop and there is 257GB of space available. It will allow me to download to a folder in my documents. The finder keeps asking for my password when trying to trash items, I type it and then get a message that I don't h