Jar file to Java Development

Hi,
I'm using the BerkeleyDB 4.5.20, where can I find the .jar file to configure in my environment of development? In JE it's easy, but in BDB4.5.20 I can't find it.

In that case the JAR files should be at:
c:\Program Files\Oracle\Berkeley DB 4.5.20\jar
There are two JAR files, one that contains the API (db.jar) and one that contains the examples (dbexamples.jar).
In order to run anything using the Java API you need to have libdb accessible in your library path. Those libraries are installed in:
c:\Program Files\Oracle\Berkeley DB 4.5.20\bin
Information on setting up an environment to use the Berkeley DB Java API can be found here:
http://www.oracle.com/technology/documentation/berkeley-db/db/ref/java/conf.html
Regards,
Alex

Similar Messages

  • .jar file for java mock exams

    Dear all,
    please tell me where can i find the .jar file of java mock exams?
    Thanking you,
    Mitesh.

    I don't know about a .jar file, but here is a link for some
    quizzes: http://developer.java.sun.com/developer/Quizzes/
    Mark

  • Load .JAR file using SQL Developer

    Hi,
    I have couple of .JAR files on my local machine which has to be loaded on to the oracle server (11g). I tried using the load Java functionality in the SQL Developer but realised one could load a java class only if you had the source code.
    Is my understanding correct or is there a way to load a JAR file using sql developer ?
    Thanks

    K,
    Thanks for the answer.
    Do you know if you have to restart oracle after loading .jar files ? I ask this because I am not aware if oracle/jvm automatically knows that the jar files have been uploaded.
    Thanks

  • Jar files required to develop adapter module in 7.1

    Hi,
    can any one tell me whether below jar files are enough to develop the adapter modules in 7.1,
    u2022 aii_af_cci.jar
    u2022 aii_af_mp.jar
    u2022 aii_af_ms_api.jar
    u2022 aii_af_ms_spi.jar
    u2022 aii_af_trace.jar
    u2022 aii_af_svc.jar
    u2022 aii_af_cpa.jar
    if not please let me know set of jar files need to develop adapter module in 7.1.
    Thank You,
    Madhav

    Hi ,
    Below Jar files Required to develop Adapter Module in PI7.1
    com.sap.aii.af.cpa.svc.api
    com.sap.aii.af.lib.mod
    com.sap.aii.af.ms.ifc_api
    com.sap.aii.af.svc_api
    sap.comtcloggingjavaimpl
    Regards,
    Raj

  • Problem running jar files of java in Linux

    I cannot run jar files in java/jdk1.3.1_01/demo in Readhat Linux 6.2
    The command is :--
    [root@localhost Notepad]# java -jar Notepad.jar
    java.lang.NoClassDefFoundError: javax/swing/JPanel
    at java.lang.Class.forName(Class.java:33)
    at kaffe.jar.ExecJarName.main(ExecJarName.java:58)
    at kaffe.jar.ExecJar.main(ExecJar.java:61)
    [root@localhost Notepad]#
    My ~/profile setting is :---
    PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3.1_01/bin:/usr/java/jdk1.3.1_01/jre/bin:/usr/java/jre/lib"
    export JAVA_HOME=/usr/java/jdk1.3.1_01
    export NPX_PLUGIN_PATH=/usr/java/jdk1.3.1_01/jre/plugin/i386/ns4

    [root@localhost Notepad]# java -jar Notepad.jar
    java.lang.NoClassDefFoundError: javax/swing/JPanel
    at java.lang.Class.forName(Class.java:33)
    at
    at
    at kaffe.jar.ExecJarName.main(ExecJarName.java:58)
    at kaffe.jar.ExecJar.main(ExecJar.java:61)
    [root@localhost Notepad]#
    My ~/profile setting is :---
    PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3.1_01/bin:/u
    r/java/jdk1.3.1_01/jre/bin:/usr/java/jre/lib"
    export JAVA_HOME=/usr/java/jdk1.3.1_01
    export
    NPX_PLUGIN_PATH=/usr/java/jdk1.3.1_01/jre/plugin/i386/n
    4Add the line:
    export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar
    Then, run the command "source ~/.profile" and then the jar file should be able to run.
    Bhav

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • Append to jar file using java codings

    Hi,
    I have codings which could create jar file and write datas in it. but i need to append datas to existing jar file using java codings.Here i have attached my codings which will write datas to new jar file. when ever i use this my existing contents gets overritten. wat can i add to this to append.
    FileOutputStream stream = new FileOutputStream(archiveFile,true);// archive file is jar file name
         JarOutputStream out = new JarOutputStream(stream, new Manifest());
    JarEntry jarAdd = new JarEntry(tobeJar.getName()); // tobejar is a file to write in jar.
    jarAdd.setTime(tobeJar.lastModified());
                   out.putNextEntry(jarAdd);
                   // Write file to archive
                   FileInputStream in = new FileInputStream(tobeJar);
                   while (true) {
                   int nRead = in.read(buffer, 0, buffer.length);
                   if (nRead <= 0)
                   break;
                   out.write(buffer, 0, nRead);
                   out.closeEntry();
    out.close();

    JarInputStream in = new JarInputStream(new FileInputStream(oldJarName), true); // oldJarName is the JAR that contains all the files we want to keep
    JarOutputStream out = new JarOutputStream(new FileOutputStream(tempJarName)); // this is your "out" variable
    // copy the files from the old JAR to the new, but don't close the new JAR yet
    JarEntry inEnt;
    while ((inEnt = in.getNextJarEntry()) != null) {
      JarEntry outEnt = new JarEntry(inEnt); // copy size, modification time etc.
      byte[] data = inEnt.getSize();
      in.read(data); // read data for this old entry
      in.closeEntry();
      out.putNextEntry(outEnt);
      out.write(data); // copy it to the new entry
      out.closeEntry();
    // now write an entry for the file we want to append - this is the OP's code
    JarEntry jarAdd = new JarEntry(tobeJar.getName()); // tobejar is a file to write in jar.
    jarAdd.setTime(tobeJar.lastModified());
    out.putNextEntry(jarAdd);
    // Write file to archive
    FileInputStream in = new FileInputStream(tobeJar);
    while (true) {
    int nRead = in.read(buffer, 0, buffer.length);
    if (nRead <= 0)
    break;
    out.write(buffer, 0, nRead);
    out.closeEntry();
    // and *now* we close the new JAR file.
    out.close();
    // We then delete the old JAR file...
    new File(oldJarName).delete();
    // ... and rename the new JAR file to use the old one's name.
    new File(tempJarName).renameTo(new File(oldJarName));

  • Writing into a jar file through Java program

    Is there a way to get a file from a jar (for ex. a properties file) make changes to it on the fly and write the same file back to the jar through a Java program?

    I cannnot give u exact code as i am bit busy..but i am giving close to exact
    below is code for reading contents of jar file
    import java.io.*;
    import java.util.jar.*;
    public class JarRead {
    public static void main (String args[])
    throws IOException {
    if (args.length != 2) {
    System.out.println(
    "Please provide a JAR filename and file to read");
    System.exit(-1);
    JarFile jarFile = new JarFile(args[0]);
    JarEntry entry = jarFile.getJarEntry(args[1]);
    InputStream input = jarFile.getInputStream(entry);
    process(input);
    jarFile.close();
    private static void process(InputStream input)
    throws IOException {
    InputStreamReader isr =
    new InputStreamReader(input);
    BufferedReader reader = new BufferedReader(isr);
    String line;
    while ((line = reader.readLine()) != null) {
    System.out.println(line);
    reader.close();
    now here say u have test.jar which contains test.txt (file)
    then
    java JarRead test.jar test.txt
    will print content of text.txt
    now in ur case u write content of each file in some other file modify it there and then create a jar file from those files using jaroutput stream .....
    this may not be all clear ..but what to do..bit busy...u are welcomed to make changes in above stratergy....n queries if any after using above stratergy and/or your great brain...

  • JAR file for java.sql.Timestamp?

    What is the JAR file for java.sql.Timestamp?
    It would be nice to have a directory file or .sh script to find these.
    -- Ewin

    rt.jar has it. Pretty much anything java.* is in rt.jar
    Rob

  • Maintain local in-house jar files while java plug-in is upgraded

    I have some in-house developed jar files which are kept at C:\Program Files\Java\jre_xxx\lib\applet. However, starting from Jre 1.4.2, there is
    an "autoupdate" feature which allows auto-download and installation of newer version of JRE to the client PC.
    Though it is a good feature, there is problem in using the in-house developed jar files because the local jar files will not copied to the
    corresponding java jre directory automatically. I need to copied the jar files manually to the new jre\lib\applet directory.
    Besides me, there is many users at the site encounter the same problem. Are there any suggestions to improve the matter.
    Thank you.
    Newton

    This is why you should not put your files inside Java's system directories.
    Bite the bullet and make the change - move your files outside of Java's directories.
    The alternative is to develop and maintain a corporate intranet Java update functionality.

  • Importing jar files for Java mapping ?

    Hi Guys,
    I am developing a java mapping by using Eclipse. I want to know <b>where can i find the jar files of xi which i need to import into Eclipse to develop the Java Mapping</b>.
    I need to use the external jar files for this Java Mapping and once i am done with the mapping, <b>How can import the external .jar files into XI</b>
    any hep would be really appreciated
    Thanks,
    srini

    Sri,
    check <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions's XI FAQ</a> for the location of .jar of mapping API.
    <b>5. Where can I find aii_map_api.jar to create my Java mapping?</b>
    After you have created your java mapping class, export your project to a .jar file and import this .jar into Imported Archives (under Mapping node) in Integration Repository.
    Regards,
    Henrique.

  • How to load jar file using SQL Developer

    Dear All,
    I need urgent help to load mytest.jar to the database using SQL Developer. I am able to load individual java classes to the database using SQL developers, but i could not load JAR files. Please help me any one know how to do this using SQL Developer.
    Thanks and Regards
    John p

    I don't think that's possible, so load it through the OS with the loadjava utility.
    Have fun,
    K.

  • Problem in Creating a jar file using java.util.jar and deploying in jboss 4

    Dear Techies,
    I am facing this peculiar problem. I am creating a jar file programmatically using java.util.jar api. The jar file is created but Jboss AS is unable to deploy this jar file. I have also tested that my created jar file contains the same files. When I create a jar file from the command using jar -cvf command, Jboss is able to deploy. I am sending the code , please review it and let me know the problem. I badly require your help. I am unable to proceeed in this regard. Please help me.
    package com.rrs.corona.solutionsacceleratorstudio.solutionadapter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.jar.JarEntry;
    import java.util.jar.JarOutputStream;
    import java.util.jar.Manifest;
    import com.rrs.corona.solutionsacceleratorstudio.SASConstants;
    * @author Piku Mishra
    public class JarCreation
         * File object
         File file;
         * JarOutputStream object to create a jar file
         JarOutputStream jarOutput ;
         * File of the generated jar file
         String jarFileName = "rrs.jar";
         *To create a Manifest.mf file
         Manifest manifest = null;
         //Attributes atr = null;
         * Default Constructor to specify the path and
         * name of the jar file
         * @param destnPath of type String denoting the path of the generated jar file
         public JarCreation(String destnPath)
         {//This constructor initializes the destination path and file name of the jar file
              try
                   manifest = new Manifest();
                   jarOutput = new JarOutputStream(new FileOutputStream(destnPath+"/"+jarFileName),manifest);
              catch(Exception e)
                   e.printStackTrace();
         public JarCreation()
         * This method is used to obtain the list of files present in a
         * directory
         * @param path of type String specifying the path of directory containing the files
         * @return the list of files from a particular directory
         public File[] getFiles(String path)
         {//This method is used to obtain the list of files in a directory
              try
                   file = new File(path);
              catch(Exception e)
                   e.printStackTrace();
              return file.listFiles();
         * This method is used to create a jar file from a directory
         * @param path of type String specifying the directory to make jar
         public void createJar(String path)
         {//This method is used to create a jar file from
              // a directory. If the directory contains several nested directory
              //it will work.
              try
                   byte[] buff = new byte[2048];
                   File[] fileList = getFiles(path);
                   for(int i=0;i<fileList.length;i++)
                        if(fileList.isDirectory())
                             createJar(fileList[i].getAbsolutePath());//Recusive method to get the files
                        else
                             FileInputStream fin = new FileInputStream(fileList[i]);
                             String temp = fileList[i].getAbsolutePath();
                             String subTemp = temp.substring(temp.indexOf("bin")+4,temp.length());
    //                         System.out.println( subTemp+":"+fin.getChannel().size());
                             jarOutput.putNextEntry(new JarEntry(subTemp));
                             int len ;
                             while((len=fin.read(buff))>0)
                                  jarOutput.write(buff,0,len);
                             fin.close();
              catch( Exception e )
                   e.printStackTrace();
         * Method used to close the object for JarOutputStream
         public void close()
         {//This method is used to close the
              //JarOutputStream
              try
                   jarOutput.flush();
                   jarOutput.close();
              catch(Exception e)
                   e.printStackTrace();
         public static void main( String[] args )
              JarCreation jarCreate = new JarCreation("destnation path where jar file will be created /");
              jarCreate.createJar("put your source directory");
              jarCreate.close();

    Hi,
    I have gone through your code and the problem is that when you create jar it takes a complete path address (which is called using getAbsolutePath ) (when you extract you see the path; C:\..\...\..\ )
    You need to truncate this complete path and take only the path address where your files are stored and the problem must be solved.

  • Running a jar file from java code

    Hi!
    Im trying to run a jar file from my code.
    I've tried Classloader, but that doesnt work because it doesnt find the images (also embedded in the 2nd jar file).
    WHat I would like to do is actually RUN the 2nd jar file from the first jar file. There must be a way to do this right?
    any ideas?

    ok, I found some wonderful code (see below) that will try to start the jar. But it doesn't. What it does is produce the following error when my application runs...
    So it's not finding the images in the jar file that I am trying to run? Strange. I checked the URL that sending, but it seems ok....
    I think I will check the url again to make sure......
    any ideas?
    Uncaught error fetching image:
    java.lang.NullPointerException
         at sun.awt.image.URLImageSource.getConnection(Unknown Source)
         at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
         at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
         at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
         at sun.awt.image.ImageFetcher.run(Unknown Source)
    the code....
    /* From http://java.sun.com/docs/books/tutorial/index.html */
    import java.io.IOException;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.lang.reflect.Modifier;
    import java.net.JarURLConnection;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.jar.Attributes;
    * Runs a jar application from any url. Usage is 'java JarRunner url [args..]'
    * where url is the url of the jar file and args is optional arguments to be
    * passed to the application's main method.
    public class JarRunner {
      public static void main(String[] args) {
        URL url = null;
        try {
          url = new URL(args[0]);//"VideoTagger.jar");
        } catch (MalformedURLException e) {
          System.out.println("Invalid URL: ");
        // Create the class loader for the application jar file
        JarClassLoader cl = new JarClassLoader(url);
        // Get the application's main class name
        String name = null;
        try {
          name = cl.getMainClassName();
        } catch (IOException e) {
          System.err.println("I/O error while loading JAR file:");
          e.printStackTrace();
          System.exit(1);
        if (name == null) {
          fatal("Specified jar file does not contain a 'Main-Class'"
              + " manifest attribute");
        // Get arguments for the application
        String[] newArgs = new String[args.length - 1];
        System.arraycopy(args, 1, newArgs, 0, newArgs.length);
        // Invoke application's main class
        try {
          cl.invokeClass(name, newArgs);
        } catch (ClassNotFoundException e) {
          fatal("Class not found: " + name);
        } catch (NoSuchMethodException e) {
          fatal("Class does not define a 'main' method: " + name);
        } catch (InvocationTargetException e) {
          e.getTargetException().printStackTrace();
          System.exit(1);
      private static void fatal(String s) {
        System.err.println(s);
        System.exit(1);
    * A class loader for loading jar files, both local and remote.
    class JarClassLoader extends URLClassLoader {
      private URL url;
       * Creates a new JarClassLoader for the specified url.
       * @param url
       *            the url of the jar file
      public JarClassLoader(URL url) {
        super(new URL[] { url });
        this.url = url;
       * Returns the name of the jar file main class, or null if no "Main-Class"
       * manifest attributes was defined.
      public String getMainClassName() throws IOException {
        URL u = new URL("jar", "", url + "!/");
        JarURLConnection uc = (JarURLConnection) u.openConnection();
        Attributes attr = uc.getMainAttributes();
        return attr != null ? attr.getValue(Attributes.Name.MAIN_CLASS) : null;
       * Invokes the application in this jar file given the name of the main class
       * and an array of arguments. The class must define a static method "main"
       * which takes an array of String arguemtns and is of return type "void".
       * @param name
       *            the name of the main class
       * @param args
       *            the arguments for the application
       * @exception ClassNotFoundException
       *                if the specified class could not be found
       * @exception NoSuchMethodException
       *                if the specified class does not contain a "main" method
       * @exception InvocationTargetException
       *                if the application raised an exception
      public void invokeClass(String name, String[] args)
          throws ClassNotFoundException, NoSuchMethodException,
          InvocationTargetException {
        Class c = loadClass(name);
        Method m = c.getMethod("main", new Class[] { args.getClass() });
        m.setAccessible(true);
        int mods = m.getModifiers();
        if (m.getReturnType() != void.class || !Modifier.isStatic(mods)
            || !Modifier.isPublic(mods)) {
          throw new NoSuchMethodException("main");
        try {
          m.invoke(null, new Object[] { args });
        } catch (IllegalAccessException e) {
          // This should not happen, as we have disabled access checks
    }

  • How to put Chinese character in jar file by java.util.jar.Manifest?

    Now I want to develop a simple package tool which can modify some property in manifest.mf of jar files,but the Manifest class's putValue method only can correctly save English character.why?
    And how can I put Chinese character?
    the code is:
    Attributes ab = mf.getMainAttributes();
    ab.putValue("agent-Name", agent);

    Attribute values can contain any character and it will be UTF-8 encoded when written to the manifest, according to Javadoc.
    What makes you think that this mechanism fails? What do you see instead of the Chinese character? And what tool/editor/program you use to see it? I did not try myself, but according to the Javadoc there should be no problem.

Maybe you are looking for

  • Access 2 clustered instances on oracle 10g AS's - Webcache as loadbalancer

    Hi, Sorry i dont have a solution to your problem. But I have a query for you, kindly help me out. 1. I have 2 oracle application servers(10g)-without webcache installed on 2 different linux machines. 2. I have a default OC4J-instance 'home' on both m

  • [SOLVED] Long comand line input

    Hello. I have problem with my gnome-terminal. When the command line is too long, it rolls to the same row instead of the next one. Here you can see it if my explanation isn't clear enough: I don't remember since when I have this problem, but I have m

  • Portal URL's and Form Posting

    When I use the following url in a form POST method, I receive a "page cannot be found" error when I click submit, but if I go directly to the page by entering the url in my browser, it works. Why is that? http://matrix0.dynamex.com:7778/pls/portal/ur

  • Scheduling RMAN script on windows

    I want to schedule the following full database backup script to run every night at 10pm. Can anyone guide me how I can schedule it on windows OS but please don't suggest OEM as currently I have it scheduled thought OEM only. run allocate channel ch1

  • How to install wallpapers to N73 please help

    how to install wallpapers from computer to N73music using data cable and pc suite version 6.84Message Edited by vijaypaul02 on 18-Sep-200712:53 PM