Add jar files and use those classes at the runtime

Hi All,
I need to add some jar files at the runtime depends on which the user selects where the jar file is located and i need to import those classes in other class for some functionalities . I could add jar files by using the URLClassLoader and Class.forName("myjar.myclassname") is also succeeded and i have no clue how to use those classes with in the jar file as i couldn't import those classes also in the source because the jar files are being added at the runtime(This leads to class not found exception at the compile time).
I had found a complicated way of using those classes after being added at the run time as below.
   Class clazz = Class.forName(myClass);
            final Method method = clazz.getDeclaredMethod(requiredMethod, new Class[]{URL.class});
            final Object returned = method.invoke(clazz.newInstance(), new Object[]{request}); but, its really pain to use in this way in all the places.
Does any of you have simpler suggestions on how to achieve this?
Thanks,
Venky.

Thanks jschell. Yes, you are right. I had found that using reflection API is the only way to load classes at the run time. But according to our application using reflection makes the application little complex, so while start of the application or during other modifications, i am overwriting my jar file to the latest one using FileChannel class as below
      FileChannel ic = new FileInputStream("new.jar").getChannel();
      FileChannel oc = new FileOutputStream("old.jar").getChannel();
      ic.transferTo(0, ic.size(), oc);
      ic.close();
      oc.close();After this code is executed, our application totally uses the new jar file.It is little fast than using reflection. Is this a good idea?

Similar Messages

  • To add the JNI dll to the jar file and use the dll inside the jar file

    Hi to everybody,
    I am new to java.
    I want to add the JNI dll to the jar file and use it in the java class.
    How can I achieve it.
    Please help me.
    Thanks in advance.
    Regards,
    M.Sivadhas.

    can't be done because none of the known operating systems support reading binary libraries from .jar files ... you can add the binary to the jar but then you have to extract it...
    besides, mixing platform specific and platfrom independent components is not a very good idea, i'd keep the dll out of the jar to begin with

  • How to Add JAR files and Config files to CLASSPATH at runtime?

    QUERY:
    During runtime, I need to load the JAR files and relevant config files( .cfg files and .properties file) into CLASSPATH and run a specific java program from one of the JAR which is available in CLASSPATH.
    Please advise me any relevant Java API details or a sample java program to implement the above use case.
    Thanks in advance.

    During runtime, I need to load the JAR files and relevant config files( .cfg files and .properties file) into CLASSPATH and run a specific java program from one of the JAR which is available in CLASSPATH.
    Please advise me any relevant Java API details or a sample java program to implement the above use case.
    You don't add to YOUR classpath once your app is launched.
    You create a NEW process for the app you want to run and provide the proper environment for it to run in - including any PATH or CLASSPATH environment variables.
    The Java API for the ProcessBuilder class has a simple example that shows how to create the arguments and launch an external application.
    ProcessBuilder (Java Platform SE 7 )
    There are also PLENTY of other examples of using ProcessBuilder; just search the net.

  • Decompiling jar file and then run

    Dear Members,
    I have a jar file and I have decompiled that jar file and converted into class file,
    now I want to run/edit using source code ,I am unable to run source code with out put whatever coming in jar file running,
    I am trying with class in which
    public static void main(String[] args)
    function defined,
    I am using Jcreater1.5 and from command prompt also running but unable to run and edit the programm,
    how to run these class file in complete project that output will come as running jar file
    regards
    SACHIN

    It sounds like you have unpacked the jar.
    To edit the source you need to decompile the classes to .java files.
    [http://www.google.co.uk/search?q=java+decompiler]

  • Encryption/decryption through jar file and classes

    Hi,
    My application uses tomcat as web server.
    I am doing encrytion and decyption.
    i fetch encypted data from database and then decrypt it
    If i use calsses in webapps -> WEB-INF -> classes folder, i place classes in that ,
    In other case i use jar file and place that file in WEB-INF -> lib folder in the webapps directory.
    There is huge performance difference.
    While using classes performance is great while using jar file performance is very disappointed.
    I am using a file for encryption /decryption also.

    Are you getting any error messages? Have you put debugging code in those classes to see what is happening?

  • How to add jar file in class path ?

    Hello,
    how can I add jar file in system class path.
    I am using Linux and installed java.
    Now I am creating one java package and working programs.
    I want to add commons-net-2.0.jar jar file into class path.
    how can I add in linux systems.
    Thank you.

    the same way you add anything else to the classpath.

  • Jar files and class path

    I have a small swing application which connects to an external database and queries something and creates a small report on the local machine. Running from the command line calling the == java MyClass works good. I would like to deploy this to two other machines. I dont want the use to run from the command line solution. I want to run it from a batch file using the jar file. But I am getting a a classpath issue ( ClassNotFoundException for the jdbc drivers ) . I signed my jar file using jarsigner too. I am not interesed in using the Web Start because there are no other security attached to this app. Only couple of people intends to use it. Running from the command line calling the app file explicitly works. In the batch file I added the setclass path too. Still it gives an exception. I added the jdbc driver jar file to the appication jar file too. Still the problem exists.
    Any ideas ?

    instead of including the JDBC driver inside your application's jar, have the two jars sit in a directory separatly and include both of them on your classpath. Or, you can even specify a manifest.mf Class-Path parameter for your application's jar file so that it automatically includes the driver's jar.

  • Jar files and Main-Class attribute

    Sorry, I know there are other topics regarding this argument but none of them helped me solving my problem.
    I've tried a thousand time in every possible way, but I still can't run my application from a jar file. I've got a package called client, whose main class is called Client. The package contains a sub-package called Icons. I've put everything into a jar file and added this manifest:
    Manifest version: 1.0
    Name: client/
    Sealed: True
    Main-Class: client.Client
    But it won't work. I've tried to erase the Sealed part, I've tried "Main-Class: Client" and also "client/Client", I've tried putting into the jar the client directory and I've tried omitting it, but the answer is always the same:
    Failed to load main-class header etc.
    Can anyone help me? Please, I'm almost desperate!
    Thanks

    Here's the verbose-mode description of what I did.
    jar -cfv client.jar clientaggiunto manifesto
    aggiunta in corso di: client/(in = 0) (out= 0)(archiviato 0%)
    aggiunta in corso di: client/.nbattrs(in = 767) (out= 310)(compresso 59%)
    aggiunta in corso di: client/Client.class(in = 533) (out= 340)(compresso 36%)
    aggiunta in corso di: client/Client.java(in = 288) (out= 140)(compresso 51%)
    aggiunta in corso di: client/ClientForm$1.class(in = 691) (out= 383)(compresso 44%)
    aggiunta in corso di: client/ClientForm$10.class(in = 678) (out= 380)(compresso 43%)
    aggiunta in corso di: client/ClientForm$11.class(in = 689) (out= 385)(compresso 44%)
    aggiunta in corso di: client/ClientForm$2.class(in = 686) (out= 379)(compresso 44%)
    aggiunta in corso di: client/ClientForm$3.class(in = 686) (out= 381)(compresso 44%)
    aggiunta in corso di: client/ClientForm$4.class(in = 686) (out= 380)(compresso 44%)
    aggiunta in corso di: client/ClientForm$5.class(in = 686) (out= 383)(compresso 44%)
    aggiunta in corso di: client/ClientForm$6.class(in = 718) (out= 399)(compresso 44%)
    aggiunta in corso di: client/ClientForm$7.class(in = 718) (out= 400)(compresso 44%)
    aggiunta in corso di: client/ClientForm$8.class(in = 718) (out= 399)(compresso 44%)
    aggiunta in corso di: client/ClientForm$9.class(in = 718) (out= 398)(compresso 44%)
    aggiunta in corso di: client/ClientForm.class(in = 33070) (out= 13510)(compresso 59%)
    aggiunta in corso di: client/ClientForm.form(in = 131398) (out= 4521)(compresso96%)
    aggiunta in corso di: client/ClientForm.java(in = 73435) (out= 6863)(compresso 90%)
    aggiunta in corso di: client/Icons/(in = 0) (out= 0)(archiviato 0%)
    aggiunta in corso di: client/Icons/brick.gif(in = 1044) (out= 1049)(compresso 0%)
    aggiunta in corso di: client/Icons/corpo.gif(in = 4011) (out= 3400)(compresso 15%)
    aggiunta in corso di: client/Icons/door.gif(in = 1092) (out= 1097)(compresso 0%)
    aggiunta in corso di: client/Icons/floor.gif(in = 1102) (out= 1107)(compresso 0%)
    aggiunta in corso di: client/Icons/mappa.gif(in = 20901) (out= 20575)(compresso 1%)
    aggiunta in corso di: client/Icons/paesaggio.gif(in = 18962) (out= 18603)(compresso 1%)
    aggiunta in corso di: client/Icons/sole.gif(in = 7063) (out= 6546)(compresso 7%)
    aggiunta in corso di: client/Icons/trap.gif(in = 1062) (out= 1067)(compresso 0%)
    aggiunta in corso di: client/Icons/void.gif(in = 842) (out= 847)(compresso 0%)
    aggiunta in corso di: client/Listener.class(in = 1869) (out= 1136)(compresso 39%)
    aggiunta in corso di: client/Listener.java(in = 2296) (out= 708)(compresso 69%)
    aggiunta in corso di: client/manifesto.txt(in = 62) (out= 58)(compresso 6%)
    aggiunta in corso di: client/ScorciatoieDialog$1.class(in = 740) (out= 391)(compresso 47%)
    aggiunta in corso di: client/ScorciatoieDialog$PopupListener.class(in = 1579) (out= 773)(compresso 51%)
    aggiunta in corso di: client/ScorciatoieDialog.class(in = 3524) (out= 1638)(compresso 53%)
    aggiunta in corso di: client/ScorciatoieDialog.form(in = 8500) (out= 910)(compresso 89%)
    aggiunta in corso di: client/ScorciatoieDialog.java(in = 5676) (out= 1222)(compresso 78%)
    jar umf mainclass.txt client.jar[NOTE: mainclass.txt only contains the line "Main-Class: client.Client"]
    java -jar client.jarFailed to load Main-Class manifest attribute from
    client.jar
    I've also tried to manually create a MANIFEST.MF file that only contained the following lines:
    Manifest Version: 1.0
    Main-Class: client.Client
    guess what was the result?
    java -jar client.jarException in thread "main" java.io.IOException: invalid manifest format
    at java.util.jar.Manifest.read(Manifest.java:193)
    at java.util.jar.Manifest.<init>(Manifest.java:52)
    at java.util.jar.JarFile.getManifest(JarFile.java:158)
    >
    the same procedure with the addition of "Name: client/" before the main-class attribute generated the usual "Failed to load Main-Class manifest attribute" result. So now what?!? I'm getting crazy....

  • Access jar file from in-memory classes...

    I have some classes that I compile to memory and everything works fine until one class that must access some external jar files. I have been unable to access those jar files from disk after trying every suggestion using URLClassLoader. I even tried someone's example to hack the SystemClassLoader which properly adds the jar file paths, but still they can't be seen. The only way it works is if I put the files in the jdk/jre/lib/ext directory. Then everything works fine. There must be a way to load the jar files in memory as well as the class files so they can be accessible. Has anyone done anything like this? Is it possible? Even though the class files are in memory, why would the jar files not be seen even when they are added to the same URLClassLoader's URL's. Thanks.

    Sorry that wasn't clear. What I mean is that the classes are compiled to byte code directly to memory and no physical .class file is created. Yes, I'm using my own ClassLoader that extends URLClassLoader and I'm setting the parent to ClassLoader.getSystemClassLoader(). I also should mention that I'm doing this inside a Netbeans module that is part of a Netbeans Platform application. I don't know why that should matter though, since I'm trying to do everything in memory without creating the physical files. Thanks.

  • Add jar file to forms application standard java library

    Overall Problem
    I created a jar file using JDeveloper to be loaded as a bean in forms builder. But the jar file ended up being really large because I had to add some standard libraries that JDeveloper knew about but Forms didn't to this jar file, it takes forever to load in my forms application.
    Background
    Jdeveloper has a drop down list of standard libraries that aren't commonly used that a developer can have included/referenced into their java project.
    Oracle Forms Library
    One of the standard libraries in JDeveloper that can be referenced when compiling a project is the Oracle Forms library. I have to reference this library in my compilation of my java project in JDeveloper because some of the java code in this project requires the Oracle Forms library. When the jar file is created in JDeveloper the Oracle Forms Library isn't actuaally physically located anywhere in the jar file that is produced for deployment. But the jar file runs perfectly in my forms application. Forms builder and the forms application server seems to already know about the Oracle Forms library.
    Java Media Framework Library
    There is another standard library listed in JDevelopers drop down list that I recently chose to use in my Java Application, the Java Media Framework library. But my forms application couldn't find any of the Java Media Framework classes when it launched the jar file that was deployed from JDeveloper. Obviously the classes wern't physically located in the jar file I created, because I figured that the forms application server/forms builder would already know about about this standard library that JDeveloper knew about.
    Not very effective Solution
    So I physically put/included the whole Java Media Framework Library into my jar file and then my form launched fine. But it now takes forever to load. How can I add the Java Media Frame work library jar files as one of the standard libraries that the forms builder and application server already sees (Like the Oracle Forms Library) without having to put the library in the forms/java folder and wait for the this jar file to download to the user's cache?
    Side note: The Java Media Framework Library is allowing the ability to launch video from my form. Very useful tool!!! So it would be good if forms had this already added as a standard library like it is in JDeveloper. But I only see the ability to reference this library in DS 10gR2 for JDeveloper.
    Thanks,
    Michelle

    Yes I have successfully been able to run a javabean application that uses the Java Media Framework methods within a forms module. The video seems to play and interact normally in the forms environment (launched from a DS or the AS).
    Basic Requirements
    Develop the java application functionality look and feel, including adding funtionality calls to the JMF library where needed.
    Develop an Oracle Forms Interface wrapper that will be the initial class called from the bean area, to hande any communication between the bean and the form.
    Configure the deployment of the jar to physically include all the needed classes from the JMF library.
    Sign the jar file and make sure it is placed in the forms/java folder and referenced in the appropriate forms configuration files.
    Depending on the type of video that the will be played certain .dll files might need to be added to the users system folder. Using H264 (.mov) should work fine without any extra .dlls.
    Thanks,
    Michelle
    Message was edited by:
    mpoore

  • Is there a way to add jar file in my program

    sorry to botter you, but i really need help for this, i really dont know how to do it. i have my prog taht i want to put in jar file, that cause no problem, but my program isnt fully functionnal because he use a jar file (my driver to acces my database) taht i had mount in forte. but i cant put in in my class file, because i want my jar to be able to run everuwhere on any computer taht have the jre installed. so in resume, i want to add jar file in my program... can i have to add it in my jar file, or decomrpesse it and put the folder like org.postgre.mfileshere... ????? i really dont know
    thx to help me

    ok If I understood, you need to add a third part Jar
    file to your own Jar File App so...
    Yes, you can decompress it in a directory tree and
    merge it with your application (i.e) if you have a jar
    file like this:
    br.com.yourApp.util
    and a third part jar file like this:
    br.com.thirdPart.tools
    br.com.thirdPart.util
    you will have these directory trees:
    br/com/yourApp/util/
    br/com/thirdPart/tools/
    br/com/thirdPart/util/
    then you can marge it in a unique tree:
    br/com/yourApp/util/
    ....../thirdPart/tools/
    ................/util/
    then you can make a new jar file with it...
    .....OR YOU CAN ADD THE PATH where your JDBCDrive is
    placed to the classpath of your application just using
    the -classpath option execution string of you
    application, like this:
    C:\jreHome\bin\java.exe -jar -classpath
    .;C:\someDir\thirdPart.jar yourApp.jar
    That's the better way to do it and then everything
    will work! :-)
    []'s Igor
    Brazil * * * * *k thx, ill give a try, and give you result later. but can you answer me another question, why when i double click on any jar file executable, sometimes javawa start but do nothing, sometimes they start and said no main class find, sometimes dotn start anymore, and sometimes work perfectly...?? is the jdk taht is not good? i use the last one
    or problem with my instalation, or the prog i try to run?
    thx

  • Execution from JAR files and Classpaths -- Help

    I am confused about how classes are resolved when running from within a JAR file, and why this is different than running a class that is not inside a JAR file.
    I have an application that uses classes from a third party library stored in a JAR file (biojava.jar) . If I run the app from the class file it works as expected and is capable of finding the external classes when the path to the biojava.jar is on my classpath. It also works if biojava.jar is instead placed in the extensions folder jre/lib/ext folder without an explicit path entry in my classpath.
    However when I package all my application classes up in a JAR file and try to execute the application from the JAR file it will ONLY work if I add a manifest entry to myApp.jar ... Class-Path: biojava.jar AND I place the file biojava.jar in the SAME directory as the Packaged JAR application. I would like to find a way to make this JAR file work for anyone who has biojava.jar in their classpath or ext directory. In other words I don't want my user community to have to copy the biojava.jar file when I email them myApp.jar. This community will already have biojava.jar on their CLASSPATH.
    How can I make my app within a JAR recognize either the user's CLASSPATH or ext folder? I have tried reading the documentation and many experiments but the only way it works is as described above.
    I am running Running Windows 2000.
    java version "1.4.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
    Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
    Here are the results of my experimentations:
    The following Works:
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: biojava.jar
    Place biojava.jar in the same directory as SequenceSpiral.jar
    java -jar SequenceSpiral.jar
    This works perfectly
    NONE of the following work
    0) Placing biojava.jar in my jre/lib/ext directory instead of the same dir as SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    (this is the first class referenced from biojava.jar)
    1) Just see if it will find the proper jar on my classpath
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    I have biojava.jar on my classpath but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    2) Specify the name if the jar in the Manifest Classpath and see if it will find the proper jar on my classpath
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: biojava.jar
    I have biojava.jar on my classpath but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    3) Specify the path of the jar in the Manifest Classpath
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: d:/biojava/biojava.jar
    I have biojava.jar on my classpath (D;\biojava\biojava.jar) but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    (note that in this case it is not fnding my main even though the Main-Class is specified)
    4) Specify current directory and biojava.jar in the Manifest Class-Path
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: .;biojava.jar
    I have biojava.jar on my classpath (D;\biojava\biojava.jar) but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    5)Specify current directory and the URL of biojava.jar in the Manifest Class-Path
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: . d:/biojava/biojava.jar
    I have biojava.jar on my classpath (D;\biojava\biojava.jar) but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter.
    Thank you very much for any help or suggestions,
    David Maynard

    I did some more testing and I think I now understand what is going on.
    I don't like it, but at least I understand it.
    The problem: I have an app packaged into a JAR file, myApp.jar. It has a dependancy upon an external JAR file extern.jar.
    extern.jar is on my Classpath (and also in jre/lib/ext)
    1) For some reason (bug?) java -jar myApp.jar does NOT use the classpath or the jre/lib/ext mechanisms to find .jar files needed to resolve references to external classes. This seems to be true even if you add an explicit -classpath argument on the command line!
    thus
    java -jar -cp c:\\absolutePathToMy\extern.jar myApp.jar
    also fails as does
    java -cp c:\\absolutePathToMy\extern.jar -jar myApp.jar
    2) Inside the myApp Jar file you can specify a URL to an jar extension jar file but the URL IS RELATIVE TO THE PATH WHERE THE myApp.Jar is executed from! If I add the Manifest item Class-Path: ..\..\..\myexterndir\extern.jar then
    java -jar myApp.jar
    works correctly and resolves the external references.
    This is why several people have reported that this class-path mechanism works ONLY when the extern.jar file is in the SAME DIRECTORY as the myApp.jar file when they had added a Class-Path: extern.jar to the Manifest.
    However together these two items make it IMPOSSIBLE to distribute myApp.jar to others and have it work since the path names statically encoded inside the jar are relative to where the jar gets executed from. If I move myApp.jar to a different location on my hard drive it may also fail.
    In my case I know all my customers already have extern.jar (5MB) installed on their classpaths and I would like to just send them the myApp.jar ( .5MB ).
    However I don't see how to do this given the current specification of a JAR file, and the bug that makes all -jar file act like they have the Sealed=true property.
    I tried explicity setting Sealed=false in the manifest but this didn't seem to have any effect.
    I hope that this will save others the many hours of time it has taken be to determine that JARS are not well suited for deploying apps with dependenncies on external libs.
    I also hope that someone can show me how execute a JAR and specify a classpath that doesn't get IGNORED my the classloader used in loading the jar classes.
    This is using java version:
    java version "1.4.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
    Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
    Does any one know this bug is fixed in a later release?
    David Maynard

  • Executable jar files and manifest file

    Hi,
    I have the following files in a folder named: Test
    a.jar
    b.jar
    c.jar
    Driver.class
    Driver.mf
    Here, MainClass is the main executable class that uses a,band c.jar files. This is how my MainClass.mf file looks:
    Manifest-Version: 1.0
    Main-Class: Driver
    Class-Path: a.jar b.jar c.jar
    Now I use the following command to make one executable jar file:
    jar cmf Driver.mf DriverMain.jar *
    It creates an executable jar file named : DriverMain.jar
    Now I copy the executable jar file (DriverMain.jar) into a different folder named: RunTest
    and double click it, doesn't work.
    my question is:
    what am I doing wrong? Any special characters needed in my Driver.mf file (space/newline/etc)?
    What I am trying to get is: One execuatble jar file so I can just double click to run it, and that single executable jar file will have all the necessary jars in it (i.e. a.jar, b.jar, c.jar in this case)
    Anyone please help!
    Thanks
    -Ron

    Rony,
    Sorry to disappoint, but you can not use embeded jar/zip files within an executable jar. The JDK sadly for some reason decided this was not a useful idea, so developers like me who want to distribute plugins with thier own dependencies have one of two choices. You either have to unzip the jar file that contains the embeded jars to a directory, then run your primary exectuable jar, OR you have to write a custom classloader that your "launcher" creates then loads the embeded jar files.
    The best thing to do is either jar up a, b, c and driver into one jar, so that it works, if you can legally do this. A lot of 3rd party libraries may not allow this per their license. Otherwise, another choice is to use a free installer or buy an installer that allows you to distribute a single exectuable installer program that will properly create the dir structure you need.
    As for the way it works, if you declare:
    Class-Path: a.jar b.jar c.jar
    the JAR loader code in the JDK looks in the root dir where your application was started for a/b/c jar files. They have to be on disk.
    If you want to place them in /lib, for example, you would havd a jar file like:
    Driver.class
    Driver.mf
    lib/a.jar
    lib/b.jar
    lib/c.jar
    When unzipped, your "root" dir would look exactly like the above, and your manifest would have Class-Path using ./lib/a.jar ./lib/b.jar ./lib/c.jar
    Anyway, there thus far isn't any way around this issue of embeding jar files in an executable jar file. You MIGHT be able to not specify any classpath, then in your Driver.class, create a new custom classloader that dervies from URLClassLoader, but in the findClass(), you get a ref to the .jar file that the classloader class is inside of, and from that use it to find the lib/*.jar files and add them to the classpath. For this to work, however, your Driver.class code should ALSO be contained in an embeded jar file that is loaded by this custom loader. The only thing Driver.class would contain (and I would rename it to something like Launcher) is the code to create the custom classloader.
    It's fun stuff, but a little bit of work to make it work. You can infact make it work! I may yet one day take our plugin engine custom loader and create a way for this to work!

  • How to add jar files to a project?

    What is the correct way to add jar files to a project?
    Jdev Help has an entry "Adding Files to a Project Using the Add Files or Directories Dialog", but when I goto File->Open as it says, there is no "Add Files or Directories" dialog.
    Using JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660 on Linux.

    That's not quite what I need, as it does not copy the files into the project, but just creates references to their original location in the filesystem. We want local copies so we can check the whole project into Subversion and not have external dependencies.
    Should I just copy the files manually (outside of Jdeveloper)? And what directory should I copy to?
    Thanks.

  • How to add .jar files in my project

    Hi all,
    i am designing a application where i want to translate some words of my web page to different language
    say, i want "search" word to be translated to french language
    i have got some .jar files google-api-translate-java-0.4.jar to do this work...
    can anyone tell in which folder to put .jar files ,so that it works in my project..
    i am using Eclipse SDK 3.3
    Thanks

    how to add .jar files in my project In your eclipse goto,
    Project --> Properties --> Java Buil Path --> Add External Jar
    By that u can select your JAR and click OK..........

Maybe you are looking for

  • Authorization in BPS

    Hi Everybody. We have Multi-Planning Area ZMPA that consists of standard planning areas ZSPA1 (infoProvider ZICPA1) and ZSPA2 (infoProvider ZICPA2). ZICPA1 infoProvider has: - characteristics      0BUS_AREA;      0CALQUART1      0CALYEAR;      0CMMT_

  • Calendar not working after 10.8.2 update

    I am not saving my Calendar to iCloud.  All my subscriptions disappeared when I updated to 10.8.2 except birthdays and I am unable to add them back to my calendar.  What a pain.  How can I fix this?

  • Recently wiped HD and reinstalled everything; cannot find my apps in iTunes

    After a terribly unpleasant mishap with my old OS; I was forced to wipe my harddrive and start from scratch. So, I repartitioned my drive, set up a dual-boot system with Ubuntu Linux and XP (XP pretty much purely to use iTunes to manage my iPhone 3G)

  • Payment Terms: 50% advance, 50% after 30 days

    Hi, How to create a payment term for vendor? Payment Term: 50% advance, 50% after 30 days Regards,

  • Sharing in System Preference keeps freezing

    Hi there, This is my first ever thread. I'm having some issues with System Preference for Sharing panel. Everytime I enter into it, the pane freezes and can't select/deselect any items. I've even gone to the trouble of Restoring the whole OS Mountain