Linux JRE and /lib/ext directory

I know this topic is fairly well discussed, but after reading many, many forum posts I have not found an answer. I've tried JRE 1.3.1_03 as well as a completely different JRE, from Blackdown.
If I run java from /jre/bin, on Linux, how does java know where the /lib/ext directory is?
Do I have to have an environment setup, such as java_home or should it find it by relative paths?
What environment variables must be setup for the JRE to operate correctly on Linux(in this case Redhat 7.2)
I have an application and the vendor just says to put these jar's in ext and the JRE will find them. Unfortunately, the JRE does not find them. I just want to make sure my environment is setup correctly.
Thanks,
James

I'll assume the wording of your response was not meant to be arrogant. lib/etx IS relative and the jars are NOT being found. I'm trying to figure out why.
It looks as though java's bin directory is in your path. Did you have to set that up or did the install set it up for you?
Again, what environment variables on Linux should be setup for the JRE to work properly? Any?
If I run something from the jre/bin directory, like: ./java TestClass, should the runtime be able to find jar's in the jre/lib/ext directory just by relative paths?
Thanks,
James

Similar Messages

  • Jar file with JRE and lib's

    I'd like to create a jar file that also contains the JRE that I want to use as well as some libraries I'm using. Is that possible?
    I have created in the past a batch file that points to an specific JRE that I package with my classes in a directory. But this time I'd like to package it in the jar file as well.
    Thanks!

    I'd like to create a jar file that also contains the
    JRE that I want to use as well as some libraries I'm
    using. Is that possible?Not and run that JRE. You have to extract it from the jar and put it in a directory. On Windows, this will allow you to run only Java applications from the commandline (not applets or anything associated with a browser).
    I have created in the past a batch file that points
    to an specific JRE that I package with my classes in
    a directory. But this time I'd like to package it in
    the jar file as well.
    Thanks!

  • Difference between applicationdir/lib and domaindir/lib/ext

    Hello,
    In my application I use scriptura (A document generation product). The jar containing this products code uses the JAXP API.
    If I include the jar in my ear file there is no problem.
    If I don't put the jar in my ear file but put it in the lib/ext directory of my domain (i.e. c:\sun\applicationserver\domains\domain1\lib\ext) then the application throws a NoClassDefFoundError (org/apache/xml/serialize/XMLSerializer)
    However If I put the jar in the lib directory of my application directory (i.e. c:\sun\applicationserver\lib) then everything works fine again.
    I have read some of the documentation and if I understand it correctly third party jars should be in the lib/ext directory. Therefore I would like to see it work with scriptura jar in the lib/ext directory.
    I have also looked up some information on classloaders but the way I understand the documentation both directory will be loaded by the common classloader (which is situated between the bootclasspath and the application classloader)?
    Can you explain me the difference between putting a jar in the lib of the application directory or putting it in the lib/ext directory of the domain.
    Thanks in advance,
    Kind Regards,
    Niels

    domain_dir/lib/ext is an extension directory used by the Java Optional Package Mechanism. Any libraries placed in this directory are loaded just after the core JDK classes and before any application server or application libraries. Hence, the libraries placed in this directory should not refer to any classes in application server or application libraries.
    In this particular case, scriptura depends on the JAXP API which is not part of the core JDK Classes. Hence, a NoClassDefFoundError is thrown.
    However, when scriptura is placed in the appserver\lib directory, the required JAXP classes are also loaded by the same classloader and scriptura finds the required classes.
    Bottom line, if a class is loaded by a classloader, then all the classes referred to by this class (directly or indirectly) must either be loaded by this classloader or its parent classloaders.

  • Java\jdk1.6.0_02\jre\lib\ext\mysql-connector-java-5.1.16-bin.jar was unexp

    Hello, please i am new to Jdeveloper and weblogic servers and i developed an application using jdeveloper and when i try to run the application it brings up this error message
    "*** Using HTTP port 7101 ***
    *** Using SSL port 7102 ***
    C:\Users\Lucky\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    \Java\jdk1.6.0_02\jre\lib\ext\mysql-connector-java-5.1.16-bin.jar was unexpected at this time.
    Process exited."
    I tried deleting the jdk1.6.6.0_02 and tried it again but it still did not run, I also uninstalled the JDeveloper and weblogic server and reinstalled them but the error message still pops up. Please i need help to fix this.
    Thanks.
    Edited by: Chinedu on Feb 21, 2013 8:48 AM

    Andrew,
    Thanks for the lightning response... but the problem has been solved.
    I rebooted again, and installed again (didn't download again because the filesize checked out) and now it works fine, and I'm none the wiser as to the root cause of the problem, except that rt.jar has magically appeared:
    C:\Users\Administrator>dir "C:\Program Files\Java\jre6\lib\*.jar"
    Volume in drive C has no label.
    Volume Serial Number is 00AC-1BC7
    Directory of C:\Program Files\Java\jre6\lib
    08/11/2009  06:38 PM         6,685,813 charsets.jar
    08/11/2009  06:38 PM         2,989,538 deploy.jar
    08/11/2009  06:38 PM           716,841 javaws.jar
    08/11/2009  06:38 PM            88,256 jce.jar
    08/11/2009  06:38 PM           558,189 jsse.jar
    08/11/2009  06:38 PM               382 management-agent.jar
    08/11/2009  06:38 PM         1,704,664 plugin.jar
    08/11/2009  06:38 PM         1,115,985 resources.jar
    08/11/2009  06:38 PM        44,295,255 rt.jar                             <<<<<<<<<<<<<<<<<<
                   9 File(s)     58,154,923 bytes
                   0 Dir(s)  115,454,173,184 bytes freeSOOOO... I presume that the installer failed on rt.jar, probably because something (something in my start-up, I suppose) was using the JRE while the instal was running... but I didn't do anything different the second time (to the best of my knowledge).
    Thanks anyways... My hair (what's left of it) greatly appreciates your time.
    Cheers. Keith.

  • Getting the runtime environment to see packages in the jre/lib/ext dir

    I've downloaded mysql-connector-java-3.0.6-stable-bin.jar so that i can connect to a mysql database. I can use it fine from tomcat, but when I try and write stand alone stuff I get
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at WebUtils.DatabaseConnection.Query(DatabaseConnection.java:27)
    at AddToDatabase.main(AddToDatabase.java:13)
    I suspect it could be a classpath related error but I have no idea how to fix it, or even how to set the classpath or view it's current value.
    Any ideas,
    Pete

    I've downloaded
    mysql-connector-java-3.0.6-stable-bin.jar ...Can we assume you've put it on the JDK/jre/lib/ext dir ?
    I suspect it could be a classpath related error but I
    have no idea how to fix it, or even how to set the
    classpath or view it's current value.Which OS are you using ?
    Rafael

  • Problem in running a class inside java_home/jre/lib/ext

    I have a class file.
    I compiled the class and packaged it to a jar file .
    Then i place the jar file at java-home/jre/lib/ext
    Now when i try to run this file it shows a NoClassDefFoundError
    Do i need to set the path in some .properties files.???
    please help me out....

    i think its to do with setting the
    java.ext.dirs path
    if i compile it with like
    java -Djava.ext.dirs=D:\jdk\jre\lib\ext Testthen it works and shows the Classloader as "ExtClassLoader"
    But this is a run time setting.
    How can i set this property "java.ext.dirs" permanently.

  • Can't find orasql9.lib in redhat linux es3 and oracle10g

    my system environment is redhat linux es3 and oracle10g
    i can use the pro*c/c++ ,but not find the orasql9.lib,
    how can i do !!!!

    pacman -Ql linux | grep usbnet
    linux /usr/lib/modules/3.6.10-1-ARCH/kernel/drivers/net/usb/usbnet.ko.gz
    Edit: oops, I see you said you checked the file list.  Sorry, I typed faster than I read.  If you do not get similar output to this, then the linux package isn't properly installed.
    Last edited by Trilby (2012-12-29 14:31:32)

  • Using extensions without having write permission to ext directory

    I'm trying to deploy a servlet and I need to use a Java extension so that I can get a dll required by one of my libraries into the Java path (the dll is packed in a jar). The problem, however, is that the user of the client machine is not guaranteed to have write permission to <jre>/lib/ext. Is there a way that I can specify an alternate directory for the jar to be placed in that the client user's permission will allow (e.g. Temporary Internet Files, Temp Directory, in the home directory, etc.)? Alternatively, is way to get the dll uploaded to the client machine without using extensions? Requiring the client user to manually install the file is not an option.
    Thank you.

    I solved this Problem myself!
    It is possible to give permission on status transition. That was what i was searching for!
    Thanks!

  • Delete files in /lib/ext folder

    I have an applet that used to install and use a third-party jar in /lib/ext. The jar is recently got upgraded but I have problem deploying the new jar file. Because the file is in /lib/ext, it is always loaded and used by JRE, I can't delete the file in code (it is locked). And because it is loaded by the system classloader which has the higher priority, custom classloader does not work either. Is there any way that I can deploy the new jar file without asking all user to manually delete the old jar from /ext/lib folder before running the applet?
    Thanks in advance!!
    Jack
    Edited by: suyuchieh on Jul 5, 2008 9:11 PM
    Edited by: suyuchieh on Jul 5, 2008 9:12 PM

    suyuchieh wrote:
    Yes, I agree that the jar should not be installed in that folder from the beginning (the applet had code to copy the jar to that folder whenever it is not there). There may be some historical reason but it is a problem now~As you've already noted, you can't while the applet itself is running, and you shouldn't be able to anyway. That would be a pretty lax security policy that allowed an Applet to write anywhere in the jdk/jre directories.
    Include a notice on the site that, if they have not already done so, that they should close the site, remove the jar, and then reconnect.

  • Oracle Linux 6 and Oracle DB for ERP System

    All,
    I have a few questions about using Oracle Linux 6 and the Oracle Database for our ERP Server. We are using a System that run off of Appache httpd and Tomcat and connects to an Oracle Database. We currently are running as a hardware installed server, with Oracle Linux 5 and 10gR2. We are looking to migrate to a Virtual environment as we run VMWare for all our other Servers and services. I have started the install of a development/test system. I wanted to install Oracle Enterprise Linux 6 x86_64 along with either 10gR2 or 11gR2. I noticed that 10gR2 was not certified on OEL6 hence why the thought of moving to 11gR2. The one issue I have is the ERP system is not a x86_64 system is there any way of running 32 bit apps on a 64bit OEL install? I would need to compile a few small 32bit C code programs so would need 32bit libs to compile against. Any support would be greatly appreciated. I know that OEL has an i386 install but I also know that the x86_64 has more support for Oracle DB.
    P.S.
    Our ERP System is programmed via a small company that does not certify anything. They have taken the approach if it works it works (not happy with this but it is what it is). So the main issue is I need to get Appache Httpd, Tomcat running along with ability to compile a few small 32bit apps.
    Edited by: Rever75 on May 7, 2012 1:45 PM

    x86-64 is an extension of the x86 32-bit CISC instruction set. The 64-bit extension provides support for long mode to address larger virtual and physical address spaces.
    You can generally run 32-bit applications on a x86_64 bit CPU and a x86_64 kernel, provided you have the appropriate i386 libraries installed. When you install Oracle 11gR2 11.2.0.1 for x86_64, appropriate i386 libraries are a prerequisite.
    Since x86 on a x86_64 CPU is still hardware, there will be no performance penalty to run 32-bit application. Btw, you cannot run 64-bit applications using a i386 kernel. The only exception I know is Mac OS X.

  • JRE and EBS 12.1.2/3

    APPS - 12.1.2 (upgrade to 12.1.3 in QA testing)
    APPS Tier hardware - Linux x86_64 - SLES 10 SP2
    DB - 11.2.0.3 - zLinux - s390
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    My next question is about JRE and the recent updates/vulnerabilities published by Oracle
    Our server team is currently pushing out 7u13 to all users desktops. Our Apps tier servers are still at java version "1.6.0_20".
    Over the past couple of days, users who log in are encountering security warnings - when trying to invoke the forms engine.
    Steve Chan's blog has posted about this in his blog @
    https://blogs.oracle.com/stevenChan/entry/java_jre_1_7_02?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+OracleE-BusinessSuiteTechnology+%28Oracle+E-Business+Suite+Technology%29
    I am aware that I have to follow through with Note 437878.1 to upgrade the Forms tech stack.
    However knowing that this is a long drawn out process and not likely to happen tomorrow or even in the next three/four weeks, is there another way to upgrade our JRE on the Tech Stack to a more recent version -
    Running which java returns /ds01/mclebs/SID/apps/tech_st/10.1.3/appsutil/jdk/jre/bin/java
    Is there any way to upgrade java here without the Forms Tech Stack Upgrade (assuming this is also included in the patches detailed in Note 437878.1
    Thanks

    864641 wrote:
    APPS - 12.1.2 (upgrade to 12.1.3 in QA testing)
    APPS Tier hardware - Linux x86_64 - SLES 10 SP2
    DB - 11.2.0.3 - zLinux - s390
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    My next question is about JRE and the recent updates/vulnerabilities published by Oracle
    Our server team is currently pushing out 7u13 to all users desktops. Our Apps tier servers are still at java version "1.6.0_20".
    Over the past couple of days, users who log in are encountering security warnings - when trying to invoke the forms engine.
    Steve Chan's blog has posted about this in his blog @
    https://blogs.oracle.com/stevenChan/entry/java_jre_1_7_02?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+OracleE-BusinessSuiteTechnology+%28Oracle+E-Business+Suite+Technology%29
    I am aware that I have to follow through with Note 437878.1 to upgrade the Forms tech stack.
    However knowing that this is a long drawn out process and not likely to happen tomorrow or even in the next three/four weeks, is there another way to upgrade our JRE on the Tech Stack to a more recent version -
    Running which java returns /ds01/mclebs/SID/apps/tech_st/10.1.3/appsutil/jdk/jre/bin/java
    ThanksIf you want to upgrade JRE native plug-in then you need to follow the steps in these docs.
    Deploying Sun JRE (Native Plug-in) for Windows Clients in Oracle E-Business Suite Release 12 (Note 393931.1)
    Upgrading OracleAS 10g Forms and Reports in Oracle E-Business Suite Release 12 (Note 437878.1)
    For JDK version upgrade to use on the application tier, please see:
    Overview of Using Java with Oracle E-Business Suite Release 12 [ID 418664.1]
    Using Latest Java 6.0 Update With Oracle E-Business Suite Release 12 [ID 455492.1]
    Thanks,
    Hussein

  • Can i have both Linux, Windows, and Leopard operating systems on my mac

    Can i use Bootcamp to have a Leopard OS, a Linux OS, and a Windows OS partitioned on my single Macbook?

    For Linux I much prefer having it under VMware Fusion because MacOS doesn't support ext3 and Linux doesn't support writing HFS, making it hard to share data between the two otherwise. The latest version of VMware Tools supports cut and paste between Linux and MacOS (last version of Parallels I used did not have ability to do cut and paste between Linux and MacOS and ran much slower with Linux) and Linux runs at pretty much full speed other than graphics (but I'm not running Linux for graphics, I'm running Linux for software development). Note that setting up your home directory (or a subdirectory thereof) as an NFS share, then mounting that within your Linux virtual machine, results in faster throughput than trying to do everything on the VMware virtual disk, all that lives on my VMware virtual disk is the actual operating system (I have my home directory mounted to a directory on my Mac where my source code lives). I usually use Aquamacs and p4v on the Mac side to actually edit and do source control on my source code, then pop down to the Linux window to compile it and do an initial smoke test to ensure that my fix actually fixed what I think it's supposed to fix, then pop back up to the Mac Finder to drag the result over to the open Finder window for the Engineering Test CIFS share on our corporate file server from whence the actual QA test systems in the lab can grab it and test it. It's a cool way to do Linux software development . Especially since I must develop for both 32-bit and 64-bit platforms for multiple distributions of Linux, and VMware lets me fire up a couple of them at a time (why I have 8GB of RAM? Now you know!) to do all this in a sort of overlapping manner.
    For Windows... meh. I've used both the latest Parallels and the latest VMware with Windows 7, and both of them are sluggish even after you turn off all the various GUI effects under Performance and Accessibility and if you don't give at least 2GB of memory to the virtualized Windows 7 it gets really slow if you try to do anything sizable at all (such as run Microsoft Office to edit things that for some reason don't edit correctly in OpenOffice/NeoOffice). So Boot Camp it is, especially for playing games, which simply is not acceptable at all under virtualized Windows 7. Oddly enough, Windows XP runs acceptably fast under both Parallels and VMware, so I'm not sure what Windows 7 is doing that makes it work so poorly under virtualization. But that's Microsoft for ya, I guess...

  • Wrong JRE Runtime Lib Path on Win2K--Admin Server Won't Start

    Running Sun One Web Server 6.0 SP6 on a Windows 2000 server, I inadvertently entered a typo in the iPlanet Administration Server's Global Settings, "Configure JRE/JDK Paths" link.
    In the "JRE Runtime Lib Path" field I typed "jjk1.3.1_03" instead of "jdk1.3.1_03". Now the Sun One web server won't start, so I can't go into the Administrative Server to fix the Jre Runtime Lib Path. I havent' been able to find any file where I can change that erroneous setting either. Is it a Registry entry?
    I also tried adding the correct JRE Runtime Lib Path at the end of the Windows PATH environment variable on the server, but that didn't help.

    Yes we checked the Registry settings and fixed the typo in the path associated with the key NSES_JRE_RUNTIME_LIBPATH. That should have fixed the problem, but the Sun One web server still wouldn't start.
    Moved to plan B and removed then reinstalled the Sun One web server. Now it starts and all is well.
    Thanks for helping everyone. This also raised the issue for us of whether or not we are entitled to individual support from Sun since we paid for the Sun One web server. According to the web site, the answer is NO - unless we pay $3,000 for a support contract. Other vendors who recommended using Sun One with their products say YES. We're still tracking that down.

  • JAVA_HOME, JRE and JDK

    Does anyone know what JAVA_HOME should be pointing to if only the JRE in installed? What it should be pointing to if the JDK is installed?
    On Windows, I notice that c:\program files\JavaSoft gets created after install. For which install does that happen? For the JRE and JDK install? Should JAVA_HOME be pointing to that directory?
    I couldn't find any java.sun documentation about the role of the JAVA_HOME env var. If anyone can piont me to some, that would be appreciated. :-)
    Version: 1.3.1
    Thanks in advance.

    Dear dinogg
    Does anyone know what JAVA_HOME should be pointing to
    if only the JRE in installed? What it should be
    pointing to if the JDK is installed?
    set JAVA_HOME=C:\jdk1.3.1\bin
    On Windows, I notice that c:\program files\JavaSoft
    gets created after install. For which install does
    that happen? For the JRE and JDK install? Should
    JAVA_HOME be pointing to that directory?
    actually it is for jre but when u install jdk it also install jre if you notice there is a part setting up java runtime environment
    I couldn't find any java.sun documentation about the
    role of the JAVA_HOME env var. If anyone can piont me
    to some, that would be appreciated. :-)
    not sure where you can find it
    Version: 1.3.1
    Thanks in advance.
    version 1.4.0 is out and it is nice
    new stuff like scroll mouse, undecorated dialogs, xml transformer better focus management and etc
    Thanks
    Joey

  • Linux jre swing without X11

    I am looking for a linux jre (swing) environment that can draw into a display without the use of X11.
    The java JRE will be the only user of the display and is the sole manager of the resource.
    The reason for it is to keep the disk and memory footprint small (it is for embedded).
    If nothing is available around, does anybody have a feeling if this is something that can reasonably be done without ending up with something that is equivalent in size and complexity to a X11 environment ?
    Thanks
    Any hints on work being done in this area are welcome.

    I am looking for a linux jre (swing) environment that
    can draw into a display without the use of X11.Certainly not off the shelf. The work will be in porting AWT to a different GUI library (say some sort of embedded library like SVGAlib). Maybe start with a base like "Biss-AWT" (check Google).
    The alternative is to use a small-footprint X server like "Tiny-X".

Maybe you are looking for

  • Possible to capture an image if the button on the cam is clicked?

    Hi! Im testing JMF and wonder if anybody knows if it is possible to capture click events from the web camera? The web camera itself has a button made to capture images and I'd like this feature in my application. All I wonder is if it's possible to c

  • JTextArea will not display string with carriage return

    Hello, I am trying to display an XML file which i have converted into a string in a JTextArea to no avail. Any ideas how i can display the string in the JTextArea including the carriage return such that it still displays in the correct format? Your p

  • Why can't I save a week long event on my iPhone calendar

    I tried to save an event that lasts for a week (vacation) on my iPhone calendar. I get an error message: "Cannot Save Event.. That event does not belong to that event store."  What does that mean and how do I resolve this so that I can put my week lo

  • Debuggin in CAF

    Hi , usually we debug the caf application services operations as a remote application,but unfortunately this doesnt support hot code replace.ie if you want to fix something you code ,redeploy and debug again. Isnt there a debugging option available t

  • External HD, Photoshop and Aperture

    So I need your help. I have Aperture on my Mac but have also got Photoshop on a netbook. I am running an airport extreme wireless network and am trying to figure out how I can make both the PC(with Photoshop) and the Mac (with Aperture) read wireless