Java Jar Loading

Hi all,
I am having a jar file which has all the class files to be loaded into the database.
But while loading, the classes are not loaded because the referenced classes are not loaded first. Is there any way that i can make the classes to load in a sequence in the jar file.
Thanks,
Ramesh.R

I found this Metalink that solved my problem.
Note:171159.1

Similar Messages

  • How to import custom java jar/class into oracle to be used in java proc ?

    Hi
    I would like to know how to import custom java jar/class files into oracle to be used in java stored procedure.
    I am developing a oracle pl/sql procedure to call java program. The java program will be created as procedure and will be published.
    But, my question is that I do have a other external jar/class file that need to be imported into this java program.
    example
    raise_sal.java
    import java.util.*;
    import oracle.sql.*;
    <<reference other java programs >>
    import cmpmsgsvc.xxxx.* ;
    import cmpmsgsvc.yyyy.* ;
    import cmpmsgsvc.zzzz.* ;
    how do I import the cmpmsgsvc jar/class file into oracle so that I don't have any
    compilation errros on raise_sal.java program ??
    what are the steps to import/compile and validate to do this?
    thanks for your help in advance.
    Thanks
    rrb.

    Kuassi
    Problem is that, I have 6 jar files that are needed to be included in the main java program. And, there are more than 50+ classes, propertiers in those 6 jar files.
    It might be not good idea to have all those 50+ classes in the production database.
    Is there anyway that I keep all those 6 jar files in unix box (our's is oracle erp installation with oracle being installed on unix box) and just refer them in the main java program. I mean database will be loaded with main java program and it should able to refer other 6 jar files from unix.
    if we create a directory and keep all jar files in there and include that directory in classpath variable, does this works? or what is other method?
    Please let me know.
    Thanks

  • Java -jar application.jar not finding file?

    I have an application program that contains the
    following two lines of code:
    FileInputStream sf = new FileInputStream "CustomWorld.ini");
    settings.load(sf);
    and when I run it as:
    java application
    it runs fine but if I run it as:
    java -jar -classpath .;application.jar application.jar
    it can't find the "CustomWorld.ini" file. Why is that
    and how can I fix it?
    Many thanks for your help.
    PS: to create the jar file I used:
    jar -cvfm application.jar application.mf application.class CustomWorld.ini

    Once your CustomWorld.ini file is in the jar, you can no longer access it directly with a FileReader. JDK 1.1 included resource locators to java.lang.Class...
    URL url = application.class.getResource("/CustomWorld.ini");
    if (url != null) { // resource was found
       InputStream in = url.openStream();
       settings.load(in);
    } else {
       // fail gracefully or use defaults
    }Note that the CustomWorld.ini file will need to be in the classpath or the root folder of the jar file for this to work.
    Regards,
    -Troy

  • Java -jar OrgFormatter.jar

    Hi All,
    I'm very new to Java. I'm trying to run this jar file and getting following error.
    java -jar OrgFormatter.jar VarshaTest060404.txt varshatest
    Failed to load Main-Class manifest attribute from OrgFormatter.jar
    OrgFormatter file takes two arguments <input file> and <output file>
    Please help me here.
    Thanks much
    Var

    if it doesn't work( the think is about the creating manifest file) you should study on the manifest files. I am wathching this topic

  • The Java JAR file "minecraft.jar" could not be launched.

    I just downloaded a new version of this game called Minecraft and it says: The Java JAR file "minecraft.jara" could not be launched. Check the console for possible error messages. I have checked the Console and it says: 
    15/10/2011 23:11:08 [0x0-0x1d01d].com.apple.JarLauncher[191] Failed to load Main-Class manifest attribute from
    15/10/2011 23:11:08 [0x0-0x1d01d].com.apple.JarLauncher[191] /Users/sabi1110/Desktop/minecraft.jar/minecraft.jar
    Help?

    How to Diagnose Jar File Problems
    Open Applications > Utilities > Terminal.app, and then type in the following:
    java -version
    java -jar <drag the minecraft.jar file here>
    Then press Enter. Copy and paste whatever error message appears.

  • JavaMail error with "java -jar" on 1.6

    The following code sends an email. The following ant build script compiles the code, creates a jar, runs the program using "java Test", and runs the program using "java -jar test.jar". Both runs work with Sun's 1.5 JRE. With Sun's 1.6 JRE, it does not work when using "java -jar" (my output is following the code). I am not sure why. I thought it might be conflicting versions of JavaMail and the JAF in Java6, but I have the latest JavaMail. I guess it is an issue with how libraries are loaded when using "java -jar", but I am not sure how to resolve this.
    If you want to run this, simply drop mail-1.4.1.jar and activation-1.1.1.jar into the same directory as these two files, set your.mail.server.here and [email protected], and run ant.
    Test.java
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class Test {
        public static void main( String[] args )
            throws Exception {
            String host = "your.mail.server.here";
            String from = "[email protected]";
            String to = from;
            String subject = "Test JavaMail";
            Address[] toRecipients = new Address[1];
            toRecipients[0] = new InternetAddress( to );
            Properties properties = System.getProperties();
            properties.put( "mail.smtp.host" , host );
            Session session = Session.getDefaultInstance( properties, null );
            MimeMessage message = new MimeMessage( session );
            Address fromAddress = new InternetAddress( from );
            message.setFrom( fromAddress );
            message.setRecipients( Message.RecipientType.TO, toRecipients );
            message.setSubject( subject );
            message.setText( "this is the body" );
            Transport.send( message );
    build.xml
    <project name="test" basedir="." default="all">
        <property name="jar.path" value="test.jar" />
        <path id="classpath">
            <pathelement location="mail-1.4.1.jar" />
            <pathelement location="activation-1.1.1.jar" />
        </path>
        <target name="clean">
            <delete>
                <fileset dir=".">
                    <include name="${jar.path}" />
                    <include name="Test.class" />
                </fileset>
            </delete>
        </target>
        <target name="build">
            <javac destdir="." srcdir=".">
                <classpath refid="classpath" />
                <include name="Test.java" />
            </javac>
        </target>
        <target name="jar">
            <manifestclasspath property="mf.classpath" jarfile="${jar.path}">
                <classpath refid="classpath" />
            </manifestclasspath>
            <jar destfile="${jar.path}" basedir="." update="no" index="true">
                <include name="Test.class" />
                <manifest>
                    <attribute name="Manifest-Version" value="1" />
                    <attribute name="Class-Path" value="${mf.classpath}" />
                    <attribute name="Main-Class" value="Test" />
                </manifest>
                <indexjars>
                    <path refid="classpath" />
                </indexjars>
            </jar>
        </target>
        <target name="run">
            <echo message="This will work in 1.5 and 1.6" />
            <java classname="Test">
                <classpath refid="classpath" />
                <classpath location="${jar.path}" />
            </java>
        </target>
        <target name="runjar">
            <echo message="This will not work in 1.6" />
            <java jar="${jar.path}" fork="true" />
        </target>
        <target name="all" depends="clean,build,jar,run,runjar" />
    </project>
    output (with 1.6)
         [java] Exception in thread "main" javax.mail.MessagingException: IOException while sending message;
         [java]   nested exception is:
         [java]     javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=us-ascii
         [java]     at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:676)
         [java]     at javax.mail.Transport.send0(Transport.java:189)
         [java]     at javax.mail.Transport.send(Transport.java:118)
         [java]     at Test.main(Unknown Source)
         [java] Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=us-ascii
         [java]     at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:870)
         [java]     at javax.activation.DataHandler.writeTo(DataHandler.java:301)
         [java]     at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1403)
         [java]     at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1745)
         [java]     at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:636)
         [java]     ... 3 more

    I spent quite a bit of time looking into this. Thanks for the reproducible test
    case, it was essential to figuring out the problem!
    The problem appears to be a bug in the jar file index. The jar file index doesn't
    include the META-INF directory, which means JavaMail can't find the config
    files it's looking for in mail.jar. If you change the ant build file to set index="false",
    it will work as expected. If you really need the index, you can fix it by using
    the jar command explicitly - "jar i test.jar".
    It looks like this is a bug in ant.

  • Java not loading up in firefox 15.0.1 but says is installed

    I had to re-install Firefox 15.01 because I some issues with new fire Fox 16.01. When I re-installed Firefox and kept my currents profile, I had to re-install Java.
    I installed both the 32 bits and 64 versions, Java show it is installed but none of the test are working.
    Somebody else from here a few months ago had me go into the Firefox config for the plugin and had me turn something on.. I wish I made notes or took screen shot at least of what I had to do, But I forget what I had to do to get Java to work again with Firefox.
    I do not remember what it was but currently Java is not loading up,
    Even though I have UN-installed -reinstalled twice now and with no success.
    Could somebody please help me please. I have browse forms and searched goggle but so far I have not found a solution to this problem.. I think it was known bug/issue with firefox 15.x
    http://www.cis.upenn.edu/~matuszek/General/JavaVersionTests/JavaTests.html
    none these are working.
    Even basic Java test from there home page is not working..
    <pre><nowiki>-----------------------
    Java Deployment Toolkit 7.0.70.11
    NPRuntime Script Plug-in Library for Java(TM) Deploy 1.7.0.7 Up to Date
    Plugin Icon
    Java(TM) Platform SE 7 U7
    Next Generation Java Plug-in 10.7.2 for Mozilla browsers 1.7.0.7 Up to Date
    Java(TM) Platform SE 7 U7
    File: C:\Program Files (x86)\Java\jre7\bin\plugin2\npjp2.dll
    Version: 10.7.2.11
    Next Generation Java Plug-in 10.7.2 for Mozilla browsers
    MIME Type Description Suffixes
    application/x-java-applet Java Applet
    application/x-java-bean JavaBeans
    application/x-java-vm
    application/x-java-applet;version=1.1.1
    application/x-java-bean;version=1.1.1
    application/x-java-applet;version=1.1
    application/x-java-bean;version=1.1
    application/x-java-applet;version=1.2
    application/x-java-bean;version=1.2
    application/x-java-applet;version=1.1.3
    application/x-java-bean;version=1.1.3
    application/x-java-applet;version=1.1.2
    application/x-java-bean;version=1.1.2
    application/x-java-applet;version=1.3
    application/x-java-bean;version=1.3
    application/x-java-applet;version=1.2.2
    application/x-java-bean;version=1.2.2
    application/x-java-applet;version=1.2.1
    application/x-java-bean;version=1.2.1
    application/x-java-applet;version=1.3.1
    application/x-java-bean;version=1.3.1
    application/x-java-applet;version=1.4
    application/x-java-bean;version=1.4
    application/x-java-applet;version=1.4.1
    application/x-java-bean;version=1.4.1
    application/x-java-applet;version=1.4.2
    application/x-java-bean;version=1.4.2
    application/x-java-applet;version=1.5
    application/x-java-bean;version=1.5
    application/x-java-applet;version=1.6
    application/x-java-bean;version=1.6
    application/x-java-applet;version=1.7
    application/x-java-bean;version=1.7
    application/x-java-applet;jpi-version=1.7.0_07
    application/x-java-bean;jpi-version=1.7.0_07
    application/x-java-applet;deploy=10.7.2
    application/x-java-applet;javafx=2.2.1
    Java Deployment Toolkit 7.0.70.11
    File: C:\Windows\SysWOW64\npDeployJava1.dll
    Version: 10.7.2.11
    NPRuntime Script Plug-in Library for Java(TM) Deploy
    MIME Type Description Suffixes
    application/java-deployment-toolkit</nowiki></pre>

    No only other I have is Adblock plus and I have tried it with off and on..
    I set back to "plugins.click_to_play is false" and now I'm still getting
    the error ' classnotfoundexception' window with error of
    " Java12Tes.class" "
    it seems to be same error I had several months ago when I was using FF 14.xx...
    I have looked at the other old post and I still can not get Java to work..
    Yet Java console is loading up.
    updated:
    Java not loading up in Safe mode either... I just tested, Closed all browser down and tried loading FF in Safe Mode, holding Shift key..
    Still no luck..

  • BPM 11G : Business Catalog : Java JAR Files

    Folks,
    We have invested a lot of effort & time in developing Business Processes in ALBPM 6.5. One of the critical features in ALBPM 6.5 was the Business Catalog - if I had a set of Java Utility Classes bundled in a JAR Archive, I could " catalog " it & reference & reuse the classes via the PBL Code.
    We are now evaluating our Migration Approach to Oracle SOA 11G & we have a few questions :-
    1. Does Oracle BPM 11G also have the facility of directly " cataloging " Java JAR Archives ?
    2. If no, what is the best approach, in your viewpoint, to migrate business logic that is present in many such JAR archives.
    We are looking at abstracting the business logic in Web Services - however, the ideal path we are looking at is to retain our investment in the Business Catalog JAR Files.
    Please do let me know your thoughts & opinions.
    Thanks in advance,
    Sandeep Seshan

    There are 2 options you have:
    1. If you access the java code from within a BPEL process instead you can use the java embedding activity to call these classes directly.
    2. You expose your java classes through a spring context and use the spring component to expose the required classes as services within your composite which you can wire directly to your BPMN process.
    Thanks,
    Adam DesJardin

  • Error while running (java -jar orion.jar -install)  Need yr help ?

    Hi,
    I have
    Win 2000 Professional
    Oracle 9i release 1and have the Pre-Requisites of MapViewer as follows.
    OC4J_extended (Pre-Requisite for MapViewer)
    XML Parser (Built-in OC4J)
    Oracle 9iI don't know whether I have Oracle Client or not which is also pre-requisite for MapViewer ? I think it is built-in with any of the above... most probably with Oracle 9i !!!
    I have JDK1.3 as wellI have Oracle9iAS release 1.0.2.2.2a, but I don't want to use it, as I have OC4J standalone...
    I want to have the configuration, for using Oracle Spatial/MapViewer.... How can I do that ? I need steps/procedure...
    I am having problems in configuring OC4J which I have downloaded. I have unzipped OC4J_Extended in Oracle 9i Database home directory (not in Oracle 9iAS home directory... because I dont have installed iAS)
    Its installation guide asks for installation through the following command
    java -jar orion.jar -installbut after unzip, I don't get any file named "orion.jar"
    What should I do ? Where am wrong ? Should I have to use 9iAS for using MapViewer in any case, if so which version ? I need the heirarchy of steps ?
    I m really stucked !!!
    Any help would be highly appreciated.
    Thanx
    Zaaf.

    Hi,
    If you are just using OC4J, you should only need to do:
    java -jar oc4j.jar -install
    Also note that you should not install oc4j in the oracle_home
    directory. If/when you upgrade oracle to apply patches, etc
    it will overwrite/cause problems with your oc4j install if you
    put it in the oracle_home directory. Put it in any other directory.
    The only part of Oracle9iAS needed to run mapviewer is oc4j.
    After that is installed, then follow the instructions in the MapViewer
    User's Guide (available on OTN).

  • Getting error while running command java -jar oc4j.jar -install

    java -jar oc4j.jar -install
    ON RUNNING The above command getting below error , is it because Java home is not set?
    Warning: -jar not understood. Ignoring.
    Exception in thread "main" java.lang.NoClassDefFoundError: oc4j.jar
    at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
    at JvThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
    at JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
    at __gcj_personality_v0 (/oracle/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/home/java.version=1.4.2)
    at __libc_start_main (/lib/tls/libc-2.3.4.so)
    at JvRegisterClasses (/oracle/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/home/java.version=1.4.2)
    navisdb.igglobal.com(express)$ javac
    ksh: javac: not found
    ENVIORNMENT DETAIL : RED HAT LINUX ENTERPRISE EDITION
    Extracted OC4J_extended.zip file at oracle 10g installation location.

    does this command work?
    /home/oracle:MCSE>gij --showversion
    gij (GNU libgcj) version 3.4.6 20060404 (Red Hat 3.4.6-11)

  • Java -jar -myApp.jar works but ....

    Hi there,
    I have a problem : using ant, I have exported my application into an executable jar file.
    When in the console, I type "java -jar myApp.jar" . Everything works well.
    But if, I do double click on the jar file, nothing happens. In fact, I can see a new Instance of javaw.exe in the "task manager" but nothing happens.
    It's kind of weird ...
    Has anybody an idea about that ??
    thanks in advance
    sylvain_2020

    I am having a similar problem.
    java -jar foo.jar works great, but double clicking seems to hang the app at a certain point.
    Unable to figure out what's going on, I've been putting some "JOptionPane.showMessageDialog()" calls to see how far it's getting. It appears to be hanging up when it tries to instantiate one of my classes that extends JPanel. I have a dialog appear right before calling the constructor (and I see that one), but I don't see the dialog that's in the constructor as the first executed line (so that it must hang up somewhere before that). I've also removed all constructors from the attribute declarations. That made me think it had something to do with the constructor of JPanel, over which I have no control.
    However, I can instantiate JPanel no problem.
    What the heck is going on???

  • Java -jar Test.jar  option is not identifing the CLASSPATH on UNIX BOX

    Hi All,
    java -jar Test.jar
    I am trying to execute Test.jar file using -jar option. I am able to excute the Test.jar file but it is not identifing the CLASSPATH set for other JAR files which is used in part of Test.jar. Saying java.lang.NoClassDefFoundError: for the class which are set in CLASSPATH.
    The same is able to identify the CLASSPATH if i excute the Test.class file directly with out -jar option like
    java Test. In this case everything is working fine.
    Can any one tell me why it is not identifying the classpath if i use or execute with java -jar Test.jar option.
    Thanks,
    sha

    When you use the -jar option, the only classpath that is used is the Class-Path in the manifest file of the jar. If there is no Class-Path, then only the jar is searched for classes. If there is a Class-Path, the paths must be relative to the jar file.

  • Java -jar NewOW.jar

    Hello!
    I get an error when trying to run my apps jar ...
    Directory of F:\Documents and Settings\Richard\NewOW\dist
    01/17/2006  07:38 PM    <DIR>          .
    01/17/2006  07:38 PM    <DIR>          ..
    01/17/2006  07:38 PM           595,646 NewOW.jar
                   1 File(s)        595,646 bytes
                   2 Dir(s)  46,755,405,824 bytes free
    F:\Documents and Settings\Richard\NewOW\dist>java -jar NewOW.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/layout/G
    roupLayout$Group
    F:\Documents and Settings\Richard\NewOW\dist>I dont know what I need to check from this error
    runs fine in the IDE
    Thanks!

    Just as reported, Java can't find
    org/jdesktop/layout/GroupLayout$Group because
    you aren't providing it. You must place a copy in
    your NewOW.jar and create a Class-Path: entry in the
    manifest file.
    If your're going to use NetBeans, you really need a
    good understanding of classpath and jars, and what
    the IDE will do, and what you have to do.
    If you replace your NB beta version with the RC1
    version, it will do more for you.Running RC1 now ..... and jar run just great without me changing anything!

  • Java -jar oc4j.jar -properties

    hi,
    I run following this one. i got a error please rectify that
    java -jar oc4j.jar -properties
    *09/05/13 16:11:11 Invalid jsp taglib location: C:\Documents and Settings\nvinodh*
    *\Desktop\oc4j\j2ee\home\%s_javapOracleHome%\j2ee\home\jsp\lib\taglib does not ex*
    ist or is not a directory
    09/05/13 16:11:11 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    initialized
    thanks
    with regards

    Greetings,
    From the error listed it appears that you have a path that is specific to your development machine which does not exist on your server. It is good practice to avoid placing jars and libraries that your application is dependent upon in directory structures which only exist on your development machine. So if you have oc4j on your dev box, put the taglib in a path relative to an ORACLE_HOME environment variable and deploy taglibs to same on the server.
    -Michael

  • Java Jar compilation

    Hi all ,
    I have been busy with my work so could not enter into this forum,
    I am building a jar file of my project.
    I am using NetBeans IDE. My files uses an external Jar File a JCalendar bean.
    In NetBeans I was able to include it in the editor path.
    But now i want to run this jar from command prompt using java -jar option.
    But it is not recognising the external jar file JCalendar Bean. I have even included this in class path of system variables.
    Please tell me how to do this, my project is going to client side on sunday and i have to implememnt this tommorrow.
    Thanks in advance.

    Hi!
    Sorry, this weekend I was with my girlfriend.
    Above some links:
    http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
    http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
    But basically you have to create a subdirectory called "META-INF" in the root of your application and put the MANIFEST.MF inside this subdirectory. You�ll have to define the property "Class-Path" in the MANIFEST.MF, putting the JAR files that your application need. Try to get some available and free JAR file, like struts.jar, open it, analise the MANIFEST.MF of this jar, and try to do similarly.

Maybe you are looking for

  • Convergence 2.1 displaying image attachments - honoring Content-Disposition

    Is it reasonable to assume that when displaying a message from within Convergence 2.1 that images (jpg for example) should be displayed based on the Content-Disposition header value? That is to say that if Content-Disposition is "inline" that the ima

  • 12 hours and counting to convert a file to pdf?

    the file is a .doc word 1997 and has lots of images that are either .tiff or .jpgs it's 103.8 MB, I uploaded the file yesterday - at least I think i did, the site just spun and spun until I finally clicked off of it and then when I went back to my ac

  • Exceuting SQL Script through java

    Hi All I am making an installer for my application. How do i execute a SQL script through java. Its a sepeate file that has the SQL script for DB creation. Regards Abhinav

  • AE error: CT generic: not ascii (83 :: 2)

    Hi all, I am using AE CC and I find this error on start:  AE error: CT generic: not ascii (83 :: 2) I close the alert and AE works correctly, but I want to know what is going on. I am using AE CC 12.1.0.168 on a Windows 7 SP1. Thanks

  • Offsite backup storeage

    Hi, what is offsite backup storeage?