NOT WORKING: Putting a jar file requiring native library in bootclasspath

Hi,
I put my own jar file into the bootclasspath like this:
java -Xbootclasspath/p:myboot.jar TestClass
Some classes in the jar require a native library. For JVM 1.3 on Solaris, I put the native library in $JAVA_HOME/jre/lib/sparc and everything works just fine.
However, when I try the same thing on JVM1.4, I got the following error when my class containing the native methods is called:
Failed to load the native library: myboot_native
java.lang.UnsatisfiedLinkError: no myboot_native in java.library.path
I tried to put that native library in several different directories in jre/lib but still had no luck.
Is there anybody know the solution? Does JVM1.4 allow me to put a custom jar file that requires a native library in the bootclasspath?
Regards,
Eman

Well is your file in a directory included in the java.library.path environement variable. I use java on windows but I have to add the directory where my native library is to the path variable (not classpath) in order to avoid the error you get.

Similar Messages

  • Little Mailprogramm works in JBuilder but do not work with a JAR File

    Hallo !
    The application works in JBuilder, but if I make an archive it dont work. If have included "JavaMail" and "JavaBeans Activation Framework". (same as in the JBuilderProject)
    The Error Message is:
    class javax.mail.MessegingException: IOException while sending message; nested exception is:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
    at javax.mail.Transport.send0
    at javax.mail.Transport.send
    I have other applications which work on JBuilder an as Jar-File, but why this application not ?
    I have JBuilderProfessional in use.
    Are there some licenceproblems with "JavaBeans Activation Framework".
    Please help me.
    Thank you !
    Wolfgang

    I think I have found a solution here:
    http://forum.java.sun.com/thread.jsp?thread=74127&forum=43&message=519108

  • Classpath is not working for executable jar file

    I have created executable jar file using following command where manifest file contains Main-Class and Class-Path entries.
    jar cvfm app.jar META-INF/* lib/* *.class
    So here app.jar contains my external jar's in lib directory
    but when I move app.jar to another directory, it's doesn't get my external files.
    I'm not getting this problem as these jar's are in app.jar
    class-path entry in manifest file:
    Class-Path: lib/abc.jar lib/xyz.jar
    Pls help me where it is getting fail?
    Thanks in advance,
    Vikas

    Java doesn't handle jars within jars. Your library jars need to be outside of the executable jar as in
    dist - main.jar
          - lib  -  lib1.jar
                 -  lib2.jar

  • Links not working in executable jar

    I have a problem with my java application
    html and images files do not work in executable jar
    though the application works normally
    I tried some suggestion but I received an exception thread indicating problem at
    ImageIcon iChing = new ImageIcon(imageURL);
    Please could you help me thank you so much
    here is the class
    public class Main extends JFrame
    * objects required for the GUI: JFrame,JLabel, JButton, ImageIcon, JPanel,
    * Dimension
    private static final long serialVersionUID = 1L;
    JButton jbEnter;
    ImageIcon iChing, logo;
    JPanel buttonPanel, ImagePanel;
    JLabel jlbIching;
    Dimension dim;
    URL imageURL;
    File fileName;
    // Class constructor to create the GUI
    public Main()
    Container container = getContentPane();
    URL imageURL = this.getClass().getClassLoader().getResource("src/myFiles/iching.gif");
    ImageIcon iChing = new ImageIcon(imageURL);
    jlbIching = new JLabel(iChing);
    // button to go to the Title class
    jbEnter = new JButton("Enter ");
    jbEnter.setBorderPainted(false);
    jbEnter.setFont(new Font("Edwardian Script ITC", Font.BOLD, 42));
    jbEnter.setBackground(new Color(0, 0, 50));
    jbEnter.setForeground(Color.YELLOW);
    jbEnter.addActionListener(new ActionListener() {
    // method to render the current frame invisible and trigger the
    // Welcome Menu
    public void actionPerformed(ActionEvent e)
    setVisible(false);
    // this line does not work...............
    new Title();
    } // close the actionPerformed(ActionEvent e) Method
    }); // close the addActionListener(new ActionListener() method
    // Panel holding the decorative image and Button
    ImagePanel = new JPanel();
    ImagePanel.add(jlbIching);
    ImagePanel.setBackground(new Color(0, 0, 50));
    buttonPanel = new JPanel();
    buttonPanel.add(jbEnter);
    buttonPanel.setBackground(new Color(0, 0, 50));
    // setting up of the panels position
    container.add(ImagePanel, BorderLayout.CENTER);
    container.add(buttonPanel, BorderLayout.SOUTH);
    dim = Toolkit.getDefaultToolkit().getScreenSize();
    dim.width = dim.width / 2 - 300;
    dim.height = dim.height / 2 - 250;
    setBounds(dim.width, dim.height, 400, 400);
    setSize(600, 500);
    setResizable(false);
    setVisible(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //To set the icon for the application. Top left hand corner.
    //this.setIconImage(Image);
    setIconImage(new ImageIcon("src/myFiles/ichingRose.gif").getImage());
    } // close the Constructor
    * the main method for the program.
    * @param args
    * The command-line arguments.
    public static void main(String[] args)
    new Main();
    } // close the main method
    } // close the Main class

    Thank you very much for your quick reply and really hope you can help me a little more
    it's so frustrating
    I do not really know about the relative path but here is my xml file
    <?xml version="1.0" encoding="UTF-8" ?>
    <project default="jar">
    <!-- Compile and zip the source code into a jar -->
    <target name="jar">
    <!-- Make the folders we'll need -->
    <mkdir dir="ant"/>
    <mkdir dir="work"/>
         <mkdir dir="ant/myFiles"/
    <!--
    Compile all the .java files into .class files
    debug = yes Include debug information in the .class files
    destdir Where to put the .class files
    source and target Use Java version 1.6.0_06
    -->
    <javac
    debug="yes"
    destdir="ant"
    source="1.6"
    target="1.6">
    <!-- Folders that have trees of .java files to compile -->
    <src path="src"/>
    </javac>
         <copy todir="ant/myFiles"><fileset dir="src/myFiles"></fileset></copy>
    <!--
    Zip files together to make a jar
    jarfile Where to make the .jar file, overwrite something there
    basedir Find the files to zip in the jar here
    -->
    <jar
                   jarfile="work/BookOfChanges.jar"
    basedir="ant"
    >
    <!-- Write a manifest inside the jar -->
    <manifest>
    <!-- The class Java will run when the user double-clicks the jar -->
    <attribute name="Main-Class" value="iChing.Main"/>
    </manifest>
    </jar>
    </target>
    </project>

  • Can Netbeans put a jar file In a jar file?

    I just went through the process of getting Eclipse to create a jar file that would execute from a command prompt using a plugin called fatjar :
    http://fjep.sourceforge.net/
    Details from other thread :http://forum.java.sun.com/thread.jspa?threadID=5219638&tstart=0
    I really would like to use netbeans but i now have the exact same problem trying to make a jar file in netbeans 5.5.1
    I am using a package from icaste.com It has a
    .dll file to put in the windows directory
    JCommSerial_3_0.jar file that contains all the classes
    I can compile and run a file in the IDE and it works fine
    The Jar file does not contain the classes so i get errors when running from command line.
    Here is the layout of my screen and result of run command in IDE
    http://www.acousticlights.com/netbeans.png
    What do I need to try?

    georgemc wrote:
    Why is everyone so obsessed with doing this? The gains are minimal and the problems numerousBecause we are new and don't understand how the java VM actually runs code and the error messages sent by the java machine are cryptic.
    My first attempt at using an external jar in a java program lead me to believe that all of the code for a java program would be in a jar file including external jar files, after all the JDK standard library has tons of jars in it so I assumed the external jar file would be linked (as most other programming compiler/linkers I have worked with in my top down programming life).
    I find out the answer is so simple that the external jar file could not be found by the VM running my jar file. Like I said, if the VM would have just gave me an error that it could not find a file on a specific directory i never would have perused the idea of jar in a jar (fatjar plugin for Eclipse for example)
    Really this is like getting into a race car and not knowing at what RPM to shift gears, sure you can press the pedal and make it go but if you don't understand how it works under the hood you are going to blow the engine if you keep it in first gear.
    I have read many posts on these errors, the reason is the error message is just not very descriptive of the original problem. If I try and open a database called xyz.dbf that has one field defined as lastname, in C for example, I would not give the error message "Lastname could not be found) when indeed the lastname could not be found but the reason it could not be found was because the database xyz.dbf could not be found. Further , adding to the error message that the system is looking for xyz.dbf on drive X- subdirectory -mydatabases would complete the error message and allow the user to fix the error. Just what is a non java programmer that is using my java program suppose to do with an Ecception Error in (main) bla bla bla... I know now I need to check for library files myself within my own java programs and give a better error message to the user before the java VM sends out it's cryptic message.
    Edited by: metron9 on Sep 25, 2007 11:00 AM

  • 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

  • Ojvmtc reports xy.jar is not a class or jar file

    Hi
    I am a little bit confuced because ojvmtc reports an error I can not imagine about:
    oracle@cikic-desktop:~/Downloads/dom4j-1.6.1$ ojvmtc /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar
    /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar is not a class or jar file
    The set is closed
    But jce.jar is a jar file and I can inflate it:
    oracle@cikic-desktop:/tmp/fo$ jar -xf /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar
    oracle@cikic-desktop:/tmp/fo$ ls -l
    total 8
    drwxr-xr-x 3 oracle oinstall 4096 2010-05-03 19:40 javax
    drwxr-xr-x 2 oracle oinstall 4096 2010-05-03 19:40 META-INF
    And if I do a ojvm on a class file everything is working like expected:
    oracle@cikic-desktop:/tmp/fo$ ojvmtc javax/crypto/Mac.class
    The set is not closed
    96 classes are missing
    So It must be a configuration mistake somewhere ...
    Can you please help me out.
    Thanks
    Christian Maier

    Coole thanks, this works pretty well!
    Chris
    oracle@cikic-desktop:~$ cp /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar /tmp/
    oracle@cikic-desktop:~$ ojvmtc /tmp/jce.jar
    The set is not closed
    131 classes are missing

  • Where put the JAR File jakarta-regexp-1.3.jar ?

    I'download jakarta-regexp-1.3.jar file from jakarta-apach site for validate a email adress..
    But i did not find any doc to telle me where put this file..
    I put it in the jre subdirectory of my sdk directory but the javac compiler
    do not recognize this part of my code import org.apache.regexp.* ..I try the lib directory of the tomcat and it was same..
    Where should i put this jar file ..
    By the way i 'm coding on linux for jakarta-tomcat server..
    Could some body help me ?

    DON'T CROSS POST:
    http://forum.java.sun.com/thread.jsp?thread=461653&foru
    =33&message=2116135
    http://forum.java.sun.com/thread.jsp?thread=461654&foru
    =45&message=2115945
    http://forum.java.sun.com/thread.jsp?thread=461653&foru
    =33&message=2115943
    http://forum.java.sun.com/thread.jsp?thread=461652&foru
    =1&message=2115941Ooops, didn't see it, ehmmmz
    I re-draw my answer, first learn some posting etiquette, then people might help.

  • Javascript is not working in the published file

    Hi ,
    I using the javascript in the captivate 5.5 to generate the text from variable in the textbox. It is working when I press the F12 button, But it is not working in the Published file.
    I called the function in the button and I written the script in the slide.
    Please let us know how to proceed..
    Thanks
    Sathish BC

    This is the Script I used in the captivate 5.5 and I called the text using variable in the text box.
    var objCP = document.Captivate;
    function valText()
    var a  = objCP.cpEIGetValue('A');
    var b  = objCP.cpEIGetValue('B');
    if (b>=5)
    objCP.cpEISetValue('B',0);
    GetAryVal(b);
    objCP.cpEISetValue('rdcmndGotoFrameAndResume', objCP.cpEIGetValue('currSlide'));
    function GetAryVal(e)
    var a1  = objCP.cpEIGetValue('Txt');
    var b1 = a1.split("#");
    var c1 = b1[e-1].split("$");
    objCP.cpEISetValue('C', c1[0]);
    objCP.cpEISetValue('D', c1[1]);
    valText();

  • What are the Jar files required,that for accessing the Type 4 Drivers.

    what are the Jar files required,that for accessing the Type 4 Drivers.
    Regards,

    Well it is Database Specific.
    Howevr there are few 3rd party .jar (Derby) which you can use it for accesing some standard databases.

  • JMS Grid, SeeBeyond IQ, Sun JMQ jar files required for JMS Clients

    I'm trying to determine the Jar files required to connect to JMS Grid, IQ, and JMQ. I am testing connectivity to each product independently and I think I may have copied over more files than necessary.

    I'm trying to determine the Jar files required to connect to JMS Grid, IQ, and JMQ. I am testing connectivity to each product independently and I think I may have copied over more files than necessary.

  • Jar files required for Java Proxies

    Hi,
    Can someone mail me the following jar files required for Java Proxies or tell me where exactly I can find them….?
    aii_proxy_xirt.jar
    aii_msg_runtime.jar
    aii_utilxi_misc.jar
    guidgenerator.jar
    Regards,
    Abhy

    Hi Abhy,
    aii_proxy_xirt.jar
    C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.aii.proxy.xiruntime
    aii_msg_runtime.jar C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.aii.messaging.runtime
    aii_utilxi_misc.jar C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.xi.util.misc
    guidgenerator.jar C:usrsapJ2EJC00j2eeclusterserver0 inextcom.sap.guid
    check this link
    http://72.14.203.104/search?q=cache:kBa_MrHu8lAJ:https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/how-to%2520guides%2520-%2520rig%2520official/xi/how%2520to%2520work%2520with%2520xi%25203.0%2520java%2520proxies.pdfjarfilesforaii_proxy_xirt.jar&hl=en&gl=in&ct=clnk&cd=1
    just copy the total path and paste in IE..
    u will find the jar files required .... with path..
    Regards,
    Sridhar
    Message was edited by: sridhar reddy kondam

  • Which jar file required

    Hi
    When i use BAPI calling from JspDyn Page in EP 6.0
    i added sapjco.jar and htmlb.jar files.
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    Getting cannot resolved message error is coming.
    more than this what r the external jars files required to run this.
    can any body tell .
    regards
    Kumar.

    Hi Kumar,
    I would advise you to use the class locator tool in your NWDS, it will do the search and the classpath adding for you. You can download it from <a href="http://sourceforge.net/projects/classlocator">here</a>
    Hope it helps,
    Roy

  • Camera raw is not working on my NEF files D600

    camera raw is not working on my NEF files D600.. I ALREADY TRIED all of the updates ( first 7.3, 7.4 even the 8.1) i have the photoshop cs6 and im not finding a way to make it read my files!!! even the DMG converter its not reading them!!

    It might be the way you are downloading them. I believe that Nikon Transfer has been updated to overcome a corruption bug which affects Adobe products.
    If you are using Nikon Transfer, it might be worth updating to the latest version, and downloading your photos again. Or use Adobe Photodownloader instead (I would).
    Also, accepted wisdom is to download photos off the memory card using a card reader, rather than via the camera USB, as it is less prone to problems. YMMV.

  • How Do I get icons image directory to work in a JAR file?

    Yes, I must admit after going through the tutorial and other stuff I am stiil stumped
    I have an application that uses the jlfgr icons for the toolbar, and it works fine as long as i actually run it from the directory that it is in.
    I would like to put in into a jAr file, and be able to execute it from other places.
    I have a Directory named PhoneBook
    in that are the classes I use
    AddressBook - the main class
    PersonEntry - The 'data class'
    and various other things like FileFilters.....
    inside that directory there are two more:
    images - contains all the icon images
    Data - where the default 'database' entries are stored.
    I use code like this:
         private void fillToolBar( JToolBar bar )
              Dummy = new JButton(new ImageIcon("images/New16.gif"));
              Dummy.setActionCommand("New");
              Dummy.addActionListener(this);
              Dummy.setToolTipText("New");
              bar.add( Dummy );
              // etc etc
    to get all the icons into the toolbar
    I have made a Jar file that has all the classes and all the directorys with the icons in it
    and so the program runs, but does not get the icons for the toolbar, I just get a whole load of 'dud' buttons.....
    AS this is the first time i've ever got the GUI to look right rather than just the code functioning properly
    I'd like to get the whole thing in a working Jar file
    So Could someone show me Step By Step, How I get my classes and images into a Jar file
    so that i can from a different directory go
    java - jar Phone.jar
    and have the GUI come up with all the images, assuming I'm totally thickheaded when it comes to Jar files.?
    I also can't get the images to show up if I merely run the 'program' from another directory than the one it is compiled in
    I can get the program to run, just not access the images with something like
    java -cp blah/blah/blah AddressBook
    {the main class is AddressBook }
    the data directory can be anywhere as I use a JFileChooser to allow the user to open and save desired files.
    I really would appreciate some clear workable help. {though I'm running out of Duke Dollars...}

    What you need is a correct path to the directory
    inside of the jar. This can be accomplished by adding
    a line to your main program like this:
    URL
    url=myProgram.class.getResource("images/New16.gif");
    Dummy = new JButton(new ImageIcon(URL));
    where myProgram.class is the name of the class
    file that contain the main method.
    Hope this helps....
    ;o)
    PS: I don't want your dukes...I got them coming out of
    my ears!
    O.K, that works thank you.
    I put something like:
    for all the 'buttons' in the toolbar
    URL url = null;
    Class ThisClass = this.getClass();
    url=ThisClass.getResource("images/New16.gif");
    Dummy = new JButton(new ImageIcon(url));
    Dummy.setActionCommand("New");
    Dummy.addActionListener(this);
    Dummy.setToolTipText("New Database");
    bar.add( Dummy );
    etc for all the rest of the 'buttons'
    After Reading the API docs on URL's etc I'm still not sure as to why it works, but it does....
    I am able now to place the class files in a jar along with the images and it all works fine
    although now I don't quite follow all my code....................
    I assume that
    url=ThisClass.getResource("images/New16.gif");
    returns some sort of 'relative url ' ???
    Thanks for the help though.

Maybe you are looking for

  • Disabling of Batch field in MIGO

    hi all,                  I added one tab in MIGO at item details. i created one program and designed one screen. here i am calculating batch code based upon screen fields and i updated batch field that is in different tab. Here i need to disable batc

  • Unable to associate PDF files to Acrobat Standard 7 after latest reader 9 patch

    I am unable to make PDF files open as Acrobat standard 7 as my default PDF viewer. I have tried to right click open with, more, browse to acrobat standard 7 folder, coose acrobat program, then open. The acorbat standard 7 program never gets listed in

  • Is this where I find answers to my iMac9,1?

    Is this where I find answers to my iMac9,1?

  • "Loading iPhoto images..."

    I tried a search, but there were simply too many mildly related uploading issues to read through them all, and none of those that I did skim seemed to match my problem exactly. I am currently running a Macbook Pro with OS X 10.9.4 and iPhoto '09 vers

  • Do you turn your computer off?

    Hi, I have had my Mac G4 Tower for about 6 or 7 years now. I leave it running 24/7 365 days a year with an exception at Christmas when I turn it off when I go away for about 3 days. Is this normal for most of you? I've heard it is harder on the compu