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.

Similar Messages

  • How do you convert a jar file into a java file,  ?

    how do you convert a jar file into a java file ?
    I am new to Java ,but have a little experience in C++ and Visual Basic.
    I want to edit and maybe create my own mobile games that are written or converted into jar files.
    At the moment I am using Java NetBeans , and Easy Java( the java pad).
    However the only solution I tried was to open the JAR file in winrar and see that its made up of png picture files,
    midi music files and class files. Unfortunately when I uncompressed the JAR file , there was NO java file to be seen and the JAVA editors Do not show the class file like a Java file. So why is there no extension Java file in the mobile JAR game ?

    801283 wrote:
    how do you convert a jar file into a java file ?You generally don't. There exist decompilers, but if you're meant to have the source, you should either have it because you are the author, or you should be able to get it from the author.
    I am new to Java ,but have a little experience in C++ and Visual Basic.Does that experience include turning .exe files into C++ code? Because that's the equivalent of what you're asking
    I want to edit and maybe create my own mobile games that are written or converted into jar files.Eh?
    Are you saying you want to take existing games and modify them? If the creators allow you to modify their source, then they'll provide you with that source (the .java files). If you're allowed to add things but not modify, you don't need .java files. Just documentation, which, again, the creators should be providing.
    Or are you saying you want to create your own games and distribute them in jar files? If so, there's no need to turn jars into .java.
    However the only solution I tried was to open the JAR file in winrar and see that its made up of png picture files,
    midi music files and class files. Unfortunately when I uncompressed the JAR file , there was NO java file to be seen and the JAVA editors Do not show the class file like a Java file. So why is there no extension Java file in the mobile JAR game ?Why would you expect there to be one?

  • How to include third party .jar files into my jar file

    Hi,
    how do i include a open source third party jar file into an executable jar?
    i have a class called BlogBox.java and it uses org.apache.commons.net.ftp.FTPClient, i want to create an executable file, where do i put the .jar file containing FTPClient aka Apache Commons Net?
    currently i'm getting the following error from when executing my BlogBox.jar
    C:\MyJava\BlogBox>java -jar BlogBox.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
    at blogbox.BlogBox.<init>(BlogBox.java:27)
    at blogbox.BlogBox.main(BlogBox.java:103)
    Any suggestions? i have searched google and this forum but could not find the solution to my problem, thanks
    [edited msg] do i need to add the classpath at execution or something of the apache commons net library?
    Message was edited by:
    gekkokid

    When you use an executable jar the normal class path
    is ignored, but you can put a classpath inside the
    jar. The usual trick is to place the library jar
    files in a directory inside the application directory
    and direct the manifest file to it. The manifest file
    live in the jar inside the META-INF directory and
    it's called manifest.mf
    The two heavilly used entries are Main-class: and
    Class-path: lines. Class-path just has a
    comma-separated list of library paths.
    The jar utility has a special option to load it up.Thanks :) I created a "/lib" directory, placed in the packages in there and redirected the Class-Path: lib/commons-net-1.4.1.jar
    and it works,
    thank you everyone :)

  • Help can't add new jar files into BDK beanbox(plz see details)

    I am unable to load new jar files into bdk beanbox inspite of
    packaging bean class file and manifest file in a jar file and
    placing it in bdk jars directory. On trying to load it says(THE JAR
    FILE DOES NOT HAVA ANY BEANS).
    SEE THE EXAMPLE BELOW:
    I made a manifest file BeanTest.mf as
    Name: BeanTest.class
    Java-Bean: True
    Then the BeanTest Class comprises of
    import java.awt.Point;
    public class BrokenProperties extends Point
         public void setSpot(Point point)
              this.x = point.x;
              this.y = point.y;
         public Point getSpot()
              return this;
    Please help....

    you have many little errors in program. try as below and let me know..
    public class BrokenProperties extends Point implements serializable
    private Point xy;
    public BrokenProperties()
    public void setSpot(Point point)
    xy=point;
    public Point getSpot()
    return xy;

  • How to add a jar file into resource catalog in webcenter spaces

    Hi All,
    i am new to webcenter spaces. my requirement is like, i have created one adf taskflow and deployed it as a shared library.now i want to register this jar file as a resource catalog into webcenter spaces (i.e. already deployed). How to achieve this task.
    Thanks,
    Monika

    Pls do the foll actions:
    Step 1:
    File -> Import -> Selct radiobutton - "Jar file" -> Next
    -> Select the file name(ur jar file) - > click on the java button and ensure that u have selected all the file or what evre files u want " -> Finish
    If at all u r not getting any errors but the files are not apperaring in ur Project means go to
    Step 2:
    From the work bench click
    Window -> Reposiroy Explorer -> Select the Project,edition,package or type and right click and from the pop up menu click "Add to Workspace"
    This 'd work
    All the best for a successful completion of ur work
    Pramod

  • How do i add multiple Audio files into an Interactive PDF

    I am making a band EPK (Electronic Press Kit) and one one page there are 3 songs the band wants to put in a play and stop feature so the client can hear the music. I have not been able to get the audio files to export in the document in either MP3 or WAV format. Please help.

    Not really,
    but I am happy to report that I found the solution:
    AVOID Logic's "Audio>Import Audio File..." window, if you need to import 54 tracks.
    Make sure you have enough Audio Tracks available in Logic's arrange window.
    Select Audio Track 1 in Logic.
    Highlight (select all) tracks) from your source DVD or disk.
    Drag all of them to Audio track 1 in Logic and the position you determined in transport.
    Beautiful.
    Why don't we get this within the Logic application?
    Thanks everyone.

  • Add a jar file to Java load path at run time

    Hi
    I loaded my file successfully , but when I tried to use the driver to connect to the DB , I get
    java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
    Here is my class
    import java.net.URL;
    import java.io.IOException;
    import java.net.URLClassLoader;
    import java.net.MalformedURLException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.io.*;
    public class JarFileLoader1 extends URLClassLoader
    public JarFileLoader1 (URL[] urls)
    super (urls);
    public void addFile (String path) throws MalformedURLException
    String urlPath = "jar:file://" + path + "!/";
    addURL (new URL (urlPath));
    public static void main (String args[])
    try
    File f = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc.jar");
    System.out.println("%%%% " + f.exists());
    File f1 = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc_license_cu.jar");
    System.out.println("%%%% " + f1.exists());
    File f2 = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc4.jar");
    System.out.println("%%%% " + f2.exists());
    URL urls [] = {};
    JarFileLoader1 cl = new JarFileLoader1 (urls);
    cl.addFile ("E:\\db2_v9_5 FP5_drivers\\db2jcc.jar");
    cl.addFile ("E:\\db2_v9_5 FP5_drivers\\db2jcc_license_cu.jar");
    cl.addFile ("E:\\db2_v9_5 FP5_drivers\\db2jcc4.jar");
    URL url = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc.jar").toURL();
    URLClassLoader clazzLoader = new URLClassLoader(new URL[]url);
    Class clazz = clazzLoader.loadClass("com.ibm.db2.jcc.DB2Driver");
    System.out.println ("Success! --> " + clazz.newInstance().toString());
    String connectString = "jdbc:db2://dummy:34000/dev1";
    System.out.println("BEFORE CONNECTION");
    Connection conn =
    DriverManager.getConnection(connectString,"mario","123123");
    System.out.println("after CONNECTION");
    System.out.println("Driver Version - " + conn.getMetaData().getDriverVersion() + "
    catch (Exception ex)
    System.out.println ("In Exception Block -- Failed.");
    ex.printStackTrace (System.out);
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Here are the logging messages
    %%%% true
    %%%% true
    %%%% true
    Success! --> com.ibm.db2.jcc.DB2Driver@24442444
    BEFORE CONNECTION
    In Exception Block -- Failed.
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:186)
    at com.tdbfg.tdsecurities.kasper.admin.aboutkasper.JarFileLoader1.main(JarFileLoader1.java:61)

    kasper123 wrote:
    Hi
    I loaded my file successfully , but when I tried to use the driver to connect to the DB , I get
    java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
    Here is my class
    import java.net.URL;
    import java.io.IOException;
    import java.net.URLClassLoader;
    import java.net.MalformedURLException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.io.*;
    public class JarFileLoader1 extends URLClassLoader
    public JarFileLoader1 (URL[] urls)
    super (urls);
    public void addFile (String path) throws MalformedURLException
    String urlPath = "jar:file://" + path + "!/";
    addURL (new URL (urlPath));
    public static void main (String args[])
    try
    File f = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc.jar");
    System.out.println("%%%% " + f.exists());
    File f1 = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc_license_cu.jar");
    System.out.println("%%%% " + f1.exists());
    File f2 = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc4.jar");
    System.out.println("%%%% " + f2.exists());
    URL urls [] = {};
    JarFileLoader1 cl = new JarFileLoader1 (urls);
    cl.addFile ("E:\\db2_v9_5 FP5_drivers\\db2jcc.jar");
    cl.addFile ("E:\\db2_v9_5 FP5_drivers\\db2jcc_license_cu.jar");
    cl.addFile ("E:\\db2_v9_5 FP5_drivers\\db2jcc4.jar");
    URL url = new File("E:\\db2_v9_5 FP5_drivers\\db2jcc.jar").toURL();
    URLClassLoader clazzLoader = new URLClassLoader(new URL[]{url});
    Class clazz = clazzLoader.loadClass("com.ibm.db2.jcc.DB2Driver");
    System.out.println ("Success! --> " + clazz.newInstance().toString());
    String connectString = "jdbc:db2://dummy:34000/dev1";
    System.out.println("BEFORE CONNECTION");
    Connection conn =
    DriverManager.getConnection(connectString,"mario","123123");
    System.out.println("after CONNECTION");
    System.out.println("Driver Version - " + conn.getMetaData().getDriverVersion() + " ");
    catch (Exception ex)
    System.out.println ("In Exception Block -- Failed.");
    ex.printStackTrace (System.out);
    }================================================
    ====================================================
    Here are the logging messages
    %%%% true
    %%%% true
    %%%% true
    Success! --> com.ibm.db2.jcc.DB2Driver@24442444
    BEFORE CONNECTION
    In Exception Block -- Failed.
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:186)
    at com.tdbfg.tdsecurities.kasper.admin.aboutkasper.JarFileLoader1.main(JarFileLoader1.java:61)
    For debugging purposes you could use [DriverManager.getDrivers()|http://download.oracle.com/javase/6/docs/api/java/sql/DriverManager.html#getDrivers%28%29] to get an enumeration of all drivers
    and then output their names.
    Maybe, with the classloader malarkey you are doing
    you need to use [DriverManager.registerDriver(Driver driver)|http://download.oracle.com/javase/6/docs/api/java/sql/DriverManager.html#registerDriver%28java.sql.Driver%29]

  • Compress two .jar file into a new .jar file

    Hi all, i would like to ask it there anyone know how to compress two or more .jar file into one new .jar file?
    because i'm currently need to engage with one big project which have to add 34 .jar file into JCreator, so that the relevant classes can be found when compile the code.
    another question is, what is the maximum archive can be add into JCreator? is it limited or unlimited?
    So, any idea from you all?
    Regards,
    poh_cc

    You should probably ask the authors of JCreator about the limitations of it.
    The classloader can't read jars from jars and I would advice against extracting all jars and jar all classes into one big fat jar.
    Kaj

  • Problem in configuring jar file into a j2me polish project

    look guys i know it might look noobie question but it is realy urgent !!
    i want to add a jar file into a j2me polish project--: i added it as a jar into the resources , put it in a liberary .
    and when i wanted to import it into my classes it was shown in the auto-complete and it showd no error but while i try to comile my project i got this error:
    clean:
    Deleting directory G:\MyWOrk\Polish Projects\NamesMeanings\build
    pre-init:
    pre-load-properties:
    exists.config.active:
    exists.netbeans.user:
    exists.user.properties.file:
    load-properties:
    exists.platform.active:
    exists.platform.configuration:
    exists.platform.profile:
    basic-init:
    cldc-pre-init:
    cldc-init:
    cdc-init:
    ricoh-pre-init:
    ricoh-init:
    semc-pre-init:
    semc-init:
    savaje-pre-init:
    savaje-init:
    sjmc-pre-init:
    sjmc-init:
    nokiaS80-pre-init:
    nokiaS80-init:
    nsicom-pre-init:
    nsicom-init:
    bdj-init:
    post-init:
    init:
    j2mepolish-init:
    j2mepolish:
    J2ME Polish 2.0.7 (2008-11-24) (GPL License)
    Loading device database...
    Processing [2] devices...
    building application for [Nokia/N70] (1/2):
    using locale [en_US]...
    assembling resources for device [Nokia/N70].
    preprocessing for device [Nokia/N70].
    Warning: CSS-Style [focused] not found, now using the default style instead. If you use Forms or Lists, you should define the style [focused].
    Warning: CSS style [title] not found, you should define it for designing the titles of screens.
    processing locale code...
    Warning: unable to resolve path to API "videocontrolbeforeplayer". When this leads to problems, please register this API in [apis.xml].
    compiling for device [Nokia/N70].
    Compiling 320 source files to G:\MyWOrk\Polish Projects\NamesMeanings\build\real\nokia240X320\Nokia\N70\en_US\classes
    G:\MyWOrk\Polish Projects\NamesMeanings\source\src\namesmeanings\main\DirectSearch.java:7: package nmsearch does not exist
    import nmsearch.*;
    G:\MyWOrk\Polish Projects\NamesMeanings\source\src\namesmeanings\main\DirectSearch.java:74: cannot find symbol
    symbol : variable NMSearch
    location: class namesmeanings.main.DirectSearch
    searched=NMSearch.Search(message);
    2 errors
    When an API-class was not found, you might need to define where to find the device-APIs. Following classpath has been used: [C:\Users\Asmaa\J2ME-Polish2.0.7\import\mmapi.jar;C:\Users\Asmaa\J2ME-Polish2.0.7\import\midp-2.0.jar;C:\Users\Asmaa\J2ME-Polish2.0.7\import\cldc-1.1.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/nokia-ui.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/wmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/mmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/mmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/btapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/m3g.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/pdaapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/m3g.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/pdaapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/jsr172.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/wmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/m3g.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/pdaapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/btapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/jsr172.jar].
    G:\MyWOrk\Polish Projects\NamesMeanings\build.xml:39: Unable to compile source code for device [Nokia/N70]: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 9 seconds)pleez i'll be more than thankful if anybody here could help in this.....

    look guys i know it might look noobie question but it is realy NOT* urgent !!
    i want to add a jar file into a j2me polish project--: i added it as a jar into the resources , put it in a liberary .
    and when i wanted to import it into my classes it was shown in the auto-complete and it showd no error but while i try to comile my project i got this error:
    clean:
    Deleting directory G:\MyWOrk\Polish Projects\NamesMeanings\build
    pre-init:
    pre-load-properties:
    exists.config.active:
    exists.netbeans.user:
    exists.user.properties.file:
    load-properties:
    exists.platform.active:
    exists.platform.configuration:
    exists.platform.profile:
    basic-init:
    cldc-pre-init:
    cldc-init:
    cdc-init:
    ricoh-pre-init:
    ricoh-init:
    semc-pre-init:
    semc-init:
    savaje-pre-init:
    savaje-init:
    sjmc-pre-init:
    sjmc-init:
    nokiaS80-pre-init:
    nokiaS80-init:
    nsicom-pre-init:
    nsicom-init:
    bdj-init:
    post-init:
    init:
    j2mepolish-init:
    j2mepolish:
    J2ME Polish 2.0.7 (2008-11-24) (GPL License)
    Loading device database...
    Processing [2] devices...
    building application for [Nokia/N70] (1/2):
    using locale [en_US]...
    assembling resources for device [Nokia/N70].
    preprocessing for device [Nokia/N70].
    Warning: CSS-Style [focused] not found, now using the default style instead. If you use Forms or Lists, you should define the style [focused].
    Warning: CSS style [title] not found, you should define it for designing the titles of screens.
    processing locale code...
    Warning: unable to resolve path to API "videocontrolbeforeplayer". When this leads to problems, please register this API in [apis.xml].
    compiling for device [Nokia/N70].
    Compiling 320 source files to G:\MyWOrk\Polish Projects\NamesMeanings\build\real\nokia240X320\Nokia\N70\en_US\classes
    G:\MyWOrk\Polish Projects\NamesMeanings\source\src\namesmeanings\main\DirectSearch.java:7: package nmsearch does not exist
    import nmsearch.*;
    G:\MyWOrk\Polish Projects\NamesMeanings\source\src\namesmeanings\main\DirectSearch.java:74: cannot find symbol
    symbol : variable NMSearch
    location: class namesmeanings.main.DirectSearch
    searched=NMSearch.Search(message);
    2 errors
    When an API-class was not found, you might need to define where to find the device-APIs. Following classpath has been used: [C:\Users\Asmaa\J2ME-Polish2.0.7\import\mmapi.jar;C:\Users\Asmaa\J2ME-Polish2.0.7\import\midp-2.0.jar;C:\Users\Asmaa\J2ME-Polish2.0.7\import\cldc-1.1.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/nokia-ui.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/wmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/mmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/mmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/btapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/m3g.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/pdaapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/m3g.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/pdaapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/jsr172.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/wmapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/m3g.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/pdaapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/btapi.jar;C:/Users/Asmaa/J2ME-Polish2.0.7/import/jsr172.jar].
    G:\MyWOrk\Polish Projects\NamesMeanings\build.xml:39: Unable to compile source code for device [Nokia/N70]: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 9 seconds)pleez i'll be more than thankful if anybody here could help in this.....

  • How do you add a combo box into a Jfilechooser?

    how do you add a combo box into a Jfilechooser?
    thanks

    See the API For JFileChooser
    public void setAccessory(JComponent newAccessory)Extend a JPanel or Such like, put your Combo Box on it, fiddle around with event handling code for the ComboBox..
    Set an Instance of that as The Accessory for the JFileChooser.
    Look In Your Docs:-
    <JAVA_HOME>/Demo/jfc/SwingSet2/src , unpack SwingSet2.jar if neccessary
    In there is a demo of using A JFileChooser with an accessory Panel, and Source code that is adaptable...

  • 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...

  • How to add one poi jar file into webdynpro project

    Hi all:
        We would like to add one poi jar file into one webdynpro project, however, what should we do ?
        Its one external 3rd party jar file.

    Hi,
    To add a jar file you need to have an external library DC.
    Hope the below link will help you:
    [http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm]
    thanks & regards,
    Manoj

  • How to call the methods of JAR file into webDynpro Environment

    Hi All ,
             I have a requirement to call the methods of a JAR file into
             WebDynpro Environment. can anybody suggest me How this can be achieved. I Have a JAR file named FastTrack.API
    which contains few methods and i want these methods to be accessable into WebDynpro as other methods.
    Plz Somebody help me to sort this out.
    Regards,
    Deepak.

    Deepak,
    Please follow these 2 steps:
    1. Add jar into webdynpro project
            Right Click on ur project -> Select properties -> Java Buil path -> Choose Libraries Tab -> Add External Jars -> add the file from ur computer
    2. Use the jar
          write the import statement in your webdynpro code to utilize the properties of added jar.
    Thanks & Regards,
    Ram

  • How TO DEPLOY JAR FILES INTO XI Server using SDM

    Hi XI Gurus,
       im working on adapter development. we have created jar file in NWDS.
       now going ahead to deploy into XI server through SDM.
       can we deploy jar files directly into xiserver through SDM. or it needs to convert to any other formate like EAR, SDA. then how would i convert to SDA.
      i any have clear idea on this... pls throw the ways how to convert........
               JAR File to EAR format
               JAR file to SDA format
               EAR file to SDA format         
       can any one explain the procedure step by step how to convert jar file into deployment archive file in order to succesfully into XI server.
              thanks  i advance. points will be rewarded.
      Regards
      Rajesh

    Hi Rajesh,
    JAR file in itself in not deployable.
    So v need to envelop this jar file into an EAR file and then v deploy this EAR file on SDM.
    Creating Jar
    Inside NWDS --> Windows --> Open perspective --> J2EE Development --> right click on ur proj --> Build EJB Archive
    Converting .EAR file to .SDA
    Converting .EAR file to .SDA
    Regards,
    Prateek

  • How to extract jar files into  a folder in the local disk and then import?

    hai forum,
    will any one tell me how should i extract jar files into a location in my project folder and then how to import the class files for further usage?
    Thank you .

    I will be graeateful if u could explain this a bit.
    Do you want to say that i should craete instance of
    ZipEntry like this
    InputStream is =
    jarFile.getInputStream(entry);
    File inputFile = new
    File("C:\\myclasses.data");
    FileInputStream fis=
    new FileInputStream(inputFile);No! You need to write the entry using FileOutputStream copying all the bytes of the ZipEntry InputStream to the FileOutputStream.
    >
    What about adding into a directory?Do i have to
    create on dynamically?Yes! You can use File.mkdirs(). For example
                        File ofile = new File("your directory where you will place the zip entries" + zipEntry.getName());
                        ofile.getParentFile().mkdirs();

Maybe you are looking for

  • Older Sony mini DV cam (Sony DCR-PC5) & imovie hd "no camera attached"

    My imovie hd does not appear to be compatible with my Sony DCR-PC5 using a mini dv tape. When I plug my fire-wire cable from the camera into my computer my imovie does not recognize the camera. (although my camera recognizes with "DV IN). How can I g

  • Different JCombobox items in JTable for the same column

    Hello Everyone, I am reading from a file and displaying in a JTable. I want all cells in a specific column to be JComboBoxes but the items in the JComboBox differ from one cell to another, how can this be achieved? The following is a snippet from the

  • How to call a void bean method in a jsp ?

    I want to call a bean method from the jsp page. The method is void i.e it returns nothing. Lets say the bean id is mybean and the method name is beanmethod( ). I want to know in what type of jsp tags should I put mybean.beanmethod( ). Using jsp expre

  • I updated to iso7 and ipod screen goes black and shuts off

    Updated to iso7 and ipod touch shuts down

  • Rman backup with no archivelog mode

    Hi Friend, I did this backup many times before, to backup a test db which is not in archivelog mode. My procedure are the following: $ rman target / rman> run { shutdown immediate; startup mount; backup format '/u02/RMAN/%d_LVL0_%T_%u_s%s_p%p' databa