How to set JAVA_HOME in REDHAT 9.0 Linux?

I was trying to set JAVA_HOME in profile file, but unable to decide where to put the java_home path. Can anyone guide me?
J2sdk and JRE are in /USR/JAVA

It is sufficient to set PATH.
In Unix (including Linux) most file systems are case-sensitive regarding the file and directory names. So /USR/JAVA is different from /usr/java.

Similar Messages

  • How to set JAVA_HOME in solaris9

    hello all,
    Do some one give me some url's or information how to set JAVA_HOME, CLASSPATH and related environmental setting for SOLARIS 9 operating system.
    thanQ,
    Han.

    solaris is the unix-like OS
    so try to find the same info about linux, freebsd or other unix os
    in general try export or set command

  • How to set JAVA_HOME programatically

    Hi Friends,
    Is there anyway to set JAVA_HOME environment property using a batch script.Actually,I am trying to check if the user system has java installed or not. If not,I make him run the JRE installer but the problem is when I try to start Tomcat, it expects JAVA_HOME to be set. So, I want to set JAVA_HOME programatically, is there anyway to do so???
    This is the script i am using to check if java is already installed or not:
    @echo off
    ::This batch file only tested under Windows 2000
    ::It will detect the short path of the current version
    ::of the Java runtime executable
    ::First test to see if we are on NT or similar OS by seeing
    ::if the ampersand is interpreted as a command separator
    reg1.txt echo 1234&remtype reg1.txt | find "rem"
    if not errorlevel 1 goto WIN9X
    ::Find the current (most recent) Java version
    start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
    type reg1.txt | find "CurrentVersion" > reg2.txt
    if errorlevel 1 goto ERROR
    for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
    if errorlevel 1 goto ERROR
    echo Java Version = %JavaTemp%
    del reg1.txt
    del reg2.txt
    ::Get the home directory of the most recent Java
    start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\%JavaTemp%"
    type reg1.txt | find "JavaHome" > reg2.txt
    if errorlevel 1 goto ERROR
    for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
    if errorlevel 1 goto ERROR
    echo Java home path (per registry) = %JavaTemp%
    del reg1.txt
    del reg2.txt
    ::Convert double backslashes to single backslashes
    set JavaHome=
    :WHILE
      if "%JavaTemp%"=="" goto WEND
      if not "%JavaHome%"=="" set JavaHome=%JavaHome%\
      for /f "delims=\" %%x in ("%JavaTemp%") do set JavaHome=%JavaHome%%%x
      for /f "tokens=1,* delims=\" %%x in ("%JavaTemp%") do set JavaTemp=%%y
      goto WHILE
    :WEND
    set JavaTemp=
    echo Java home path (long, with spaces) = %JavaHome%
    ::Convert long path (with spaces) into a short path
    for %%x in ("%JavaHome%") do set JavaHome=%%~dpsx
    echo Java home path (short path, no spaces) = %JavaHome%
    ::Test the java path to see if there really is a java.exe
    if not exist %JavaHome%\bin\java.exe goto ERROR
    ::Make changes to the PATH
    echo Insert code here that needs to know the short path to Java.
    set path=%JavaHome%\bin;%path%
    goto DONE
    :WIN9X
    echo Insert code here for Windows 9x
    goto DONE
    :ERROR
    echo Insert code here for conditions where Java.exe can't be found
    goto DONE
    :DONEThanks

    You are asking questions about Windows batch scripting in a Java forum?
    When you get right down to it, the question is "How do I set an environment variable in a batch script", isn't it? Free your mind from useless distractions: the batch script and the operating system don't care at all what you're going to use that environment variable for.
    Oh yeah, I almost forgot: you use the SET command to set an environment variable.

  • How to set JAVA_HOME

    Hi,
    can any body tell how to set the JAVA_HOME variable for the
    windows 95/98 operating system. Iam using the "jakarta-tomcat-3.2.1"
    server for running the jsp files. I could do it in window NT os by setting up in the environment option of the mycomputer properties. I
    couldn't know how to set it in the window 95/98 os
    phani

    To set the JAVA_HOME variable in Windows 95/98 you have to edit the file autoexec.bat located on your hard drive and add a line similar to this one.
    SET JAVA_HOME=C:\J2SDK1.4.1
    Where c:\j2sdk1.4.1 is the directory where java is installed.
    Hope this helps.

  • How to set JAVA_HOME and ANT_HOME in OSX 10.9.5

    Hi
    recently we moved to 10.9.5 and i dnt see .profile file at home. can you please let me know how to set up JAVA_HOME and ANT_HOME
    when ever i set those at termanil with export commands . those are getting vanished after closing the terminal. pls let me know how to set up PATHs at 10.9.5.
    since i dnt see the profile file.
    Thanks
    Pasunoori

    Modify .bash_profile.

  • How to set the permission of RMAN in Linux?

    I have installed oracle XE in Centos, however, when I try to access to RMAN by
    rman target /
    it shows the error message
    [root@localhost bin]# rman target /
    Recovery Manager: Release 10.2.0.1.0 - Production on Wed Oct 11 17:50:34 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    RMAN-00571: ================================================
    RMAN-00569: ========== ERROR MESSAGE STACK FOLLOWS ========
    RMAN-00571: ================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-09925: Unable to create audit trail file
    Linux Error: 13: Permission denied
    Additional information: 9925
    ORA-01031: insufficient privileges
    I would like to ask how to set the permission for root to use rman ?
    Thank you very much ~!!

    Check first if the directory where you save the auditing information is owned by oracle:dba.
    Regards
    Aron

  • Linux: how to set JAVA_HOME in startup script?

    My Linux box cannot find JDK classpath.
    How do I set CLASSPATH and JAVA_HOME in a script file that is loaded at startup?
    Thanks!

    What are you trying to do? If you are executing a script that runs a java process in cron, or something, then simpl place these lines in that script before the call to java.
    All environment variables are set when the shell starts. Every process is run under a shell, and that shell is what has the environment variables. Which environment variables it has, depends on which shell is started, and how that shell is started.
    Cron, and some users, have a very limited shell environment. Even these shell environments are configurable though. How this is done, however, is not a topic for this forum.

  • How to set classpath in WinXP Home edition

    Hello everyone,
    Recently I have try to run the HelloWorld java code, but it come up with a error. (Exception in thread �main� java.lang.NoClassDefFoundError: HelloWorld)
    Java programming Code:
    public class HelloWorld {
    public static void main (String args[]) {
    System.out.println("Hello World!");
    I also try to compile another simple program, and it come up with the simpler error, (Exception in thread �main� java.lang.NoClassDefFoundError: Add16And23)
    Java programming Code:
    public class Add16And23
         public static void main (String[] args)
              int sum;
              sum=16+23;
              System.out.println("The sum of 16 and 23 is " + sum);
    HOW CAN I FIX THIS, I read other threads before, it say some about class path.
    Do anyone know how to set it, in winXP?
    Do anyone know the whole path that I should put in, in winXP?
    What should I type in the (User variables for windows) and (System variables).
    I have :
    * (j2eesdk-1_4-dr-windows-eval) downloaded and installed;
    *WinXP Home edition Version 2002 Service Pack 1
    * My current Java path are (C:\Sun\AppServer\jdk\bin) in the (User variables for windows).
    Please help!!!
    Thank you all!!!

    I'm also windows xp.
    fllowing example:
    java_home=c:\j2sdk1.4.2_03\bin
    classpath=c:\j2sdk1.4.2_03\dt.jar;c:\j2sdk1.4.2_03\tool
    .jarThis won't fix a thing.
    When you run, do it like this:
    java -classpath . HelloWorldNote the "dot" after -classpath. That tells the class loader to look in the current directory for the .class files it needs.
    Read about how to run the javac.exe and java.exe tools in your javadocs. You'll have to learn about CLASSPATH. - MOD

  • JAAS in Java StoredProcedures: How to set up LoginModule

    Hi,
    has anyone tried to use JAAS in a Java StoredProcedure on Oracle9i?
    I couldn't find out how to set up the JVM to find the login configuration. Here the error I get, whenn I run the StoredProcedure:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: Unable to locate a login configuration
    Here is what I did so far:
    1. copy jaas.jar into the $JAVA_HOME/lib/ext directory
    2. add to $JAVA_HOME/lib/security/java.security
    login.config.url.1=file:C:/my_jaas.config
    3. provide configuration file my_jaas.config
    Test {
    auth.MyLoginModule required debug=true;
    4. loadjava for jaas.jar (TEST schema)
    5. setup of the database security:
    dbms_java.grant_policy_permission( 'JAVA_ADMIN', 'TEST', 'javax.security.auth.AuthPermission', '*' );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'createLoginContext', null );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'getLoginConfiguration', null );
    dbms_java.grant_permission( 'TEST', 'SYS:java.security.SecurityPermission', '*', null );
    6. loadjava for the StoredProcedure (TEST schema)
    LoginContext lc = new LoginContext( "Test", new TestCallbackHandler() );
    lc.login();
    How can I tell the database where to look for the login configuration. Am I missing something here?
    Thanks for any help
    Regards,
    Christian

    Hi,
    has anyone tried to use JAAS in a Java StoredProcedure on Oracle9i?
    I couldn't find out how to set up the JVM to find the login configuration. Here the error I get, whenn I run the StoredProcedure:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: Unable to locate a login configuration
    Here is what I did so far:
    1. copy jaas.jar into the $JAVA_HOME/lib/ext directory
    2. add to $JAVA_HOME/lib/security/java.security
    login.config.url.1=file:C:/my_jaas.config
    3. provide configuration file my_jaas.config
    Test {
    auth.MyLoginModule required debug=true;
    4. loadjava for jaas.jar (TEST schema)
    5. setup of the database security:
    dbms_java.grant_policy_permission( 'JAVA_ADMIN', 'TEST', 'javax.security.auth.AuthPermission', '*' );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'createLoginContext', null );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'getLoginConfiguration', null );
    dbms_java.grant_permission( 'TEST', 'SYS:java.security.SecurityPermission', '*', null );
    6. loadjava for the StoredProcedure (TEST schema)
    LoginContext lc = new LoginContext( "Test", new TestCallbackHandler() );
    lc.login();
    How can I tell the database where to look for the login configuration. Am I missing something here?
    Thanks for any help
    Regards,
    Christian Hi, this is not supported yet - although some guys, on the forum, successfully implements JSSE but i am not allowed to disclose how they did it.
    we hope to provide formal support for JAAS, JSSE and JCE in upcoming major database release
    Kuassi

  • Simple question: How to set a different image to each side of a 3D cube?

    Hi all,
    I'm very new in the use of Java 3D and I would like to know how to set, in a 3D cube, for each side a different image.
    Currently I've the code to set an image as texture of the cube, but it applies the same image to all the sides. However, I would like to use different images for each side.
    This is my code: http://pastebin.com/sexBx57K
    Any clue?
    Thanks!

    I think I worked it out.
    I just have to set the JAXP parser
    Q. How do I use a different JAXP compatible implementation?
    The JAXP 1.1 API allows applications to plug in different JAXP compatible implementations of parsers or XSLT processors. For example, when an application wants to create a new JAXP DocumentBuilderFactory instance, it calls the staic method DocumentBuilderFactory.newInstance(). This causes a search for the name of a concrete subclass of DocumentBuilderFactory using the following order:
    1. The value of a system property like javax.xml.parsers.DocumentBuilderFactory if it exists and is accessible.
    2. The contents of the file $JAVA_HOME/jre/lib/jaxp.properties if it exists.
    3. The Jar Service Provider discovery mechanism specified in the Jar File Specification. A jar file can have a resource (i.e. an embedded file) such as META-INF/services/javax.xml.parsers.DocumentBuilderFactory containing the name of the concrete class to instantiate.
    4. The fallback platform default implementation.

  • Setting JAVA_HOME environment variable?

    Sorry for such a trivial question, but in Windows 2000 Server with Microsoft Visual J++ 6 and the JRK 1.1.8, can somebody tell me what the environment variables should be so that I can use this jdk? If not can you tell me what your environment variable JAVA_HOME points to?
    And one last question if it's not too much to ask. Can you tell me the NNTP server address for SUN so that I can go to the newsgroups in my News reader rather than over the web?
    Thanks.
    George Hester

    Thanks. I have a problem though. I installed the jdk 1.1.8 because I heard that was the last one supported using Visual J++. Hence I have a C:\jdk1.1.8. This folder has no JRE subfolder so I am stuck at what you said the Classpath should contain as the path\folder you say it should be does not exist.
    I have a folder C:\Program Files\JavaSoft\JRE\1.3.1 which has the lib folder containing rt.jar.
    So as you can see I'm sort of in a quandry.
    If I make JAVA_HOME as you say then it does not contain the JRE. If I make JAVA_HOME C:\Program Files\JavaSoft so that your suggestion for Classpath is correct that folder does not contain the jrk and it seems that I will not be using it.
    Any suggestions how to set this up so that it's right?
    George Hester

  • How to set userlevel permission for GFS and NFS

    hi
    how to set userlevel permission for GFS and NFS?
    regards

    hi
    http://www.redhat.com/docs/manuals/enterprise/
    AND
    http://en.tldp.org/
    probably your best bet.
    regards

  • How to start WLS in RedHat 6.2

    Hi everyone,
    Everytime when I try to start WLS in RedHat with the command -
    ./startWebLogic.sh in command line console,
    an error - "Don't know how to set the shared library for Linux" is displyed.
    Could anyone help me solve this problem at your earliest convenience sine
    it is quite urgent to me to solve this problem?
    Thanks in advance

    Open startWebLogic.sh
    look for label LINUX)
    substitute the line with
    LINUX | Linux)
    and try again.
    Marco.
    Rex Law <[email protected]> wrote in message
    news:[email protected]..
    Hi everyone,
    Everytime when I try to start WLS in RedHat with the command -
    ./startWebLogic.sh in command line console,
    an error - "Don't know how to set the shared library for Linux" isdisplyed.
    >
    Could anyone help me solve this problem at your earliest conveniencesine
    it is quite urgent to me to solve this problem?
    Thanks in advance

  • How to set Path on windows 98

    Hello!
    sorry for my bit knowledge on Java first.
    I am having a hard time to set a path in my windows 98.
    First, I did instal Java 2SDK version 1.4.0
    Then, I download j2EE RI server and documentation from sun's J2EE download site
    Then, I run the installer for both the J2EE and documentation
    then I did put these �set� command in a bat file.
    set JAVA_HOME = C:\j2sdk1.4.0
    set J2EE_HOME=C:\j2sdkee1.3.1
    set ANT_HOME=C:\ant\apache-ant-1.5.3.1
    set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%J2EE_HOME%\bin
    My last step was to check all logging output to the current shell. So I went to the command line and type j2ee -verbose. However I got the following error message.
    Microsoft(R) Windows 98
    (C)Copyright Microsoft Corp 1981-1999.
    C:\WINDOWS\Desktop>j2ee -verbose
    Bad command or file name
    can you please help me how to correct this. I don't know DOS much so I may type something wrong.
    any help is appreciated.
    Kimbra

    Yes, I ran into the same problem on my Win 98 laptop. I used the exact same set command, but the problem was, it seems than Windows 98 forgets the set command after a shutdown/reboot.
    Go into your autoexec.bat file (should be in your C:\ drive, as in C:\autoexec.bat, or I think you can type sysedit into the Run prompt (Start > Run) ) and then type in:
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\j2sdk1.4.0\bin;
    That worked for my laptop; I was able to run the javac and java programs in any directory, without referencing the full directory path each time.
    Sorry, but I can't help you on the apache problem, although I suspect all you need you do is add that directory path onto the above line.

  • How to setup JAVA_HOME or JRE_HOME for veridata, and newest Java version

    when I test veridata agent connection to source db, I got following error:
    Agent remote message (101): Unhandled exception 'java.lang.UnsupportedClassVersionError': (oracle/jdbc/pool/OracleDataSource) bad major version at offset=6
    Then I checked java home on source, it is set to $ORACLE_HOME/jdk ,and java version is 1.5.
    Since my oracle goldengate agent download is 11.2, doc says it requires 1.6 as mininum java version.
    I just wonder how I get oracle Home has 1.6 java binaries.
    Thanks in advance.

    982335 wrote:
    I just wonder how I get oracle Home has 1.6 java binaries.Java doesn't have to be installed in Oracle_Home, it can be installed anywhere on your system. You probably already have a Java 6 installed somewhere; but if not, just install it (via pkg manager or manually installing from a tarball, etc). Then just set JAVA_HOME to the directory containing "bin", and prepend $JAVA_HOME/bin to your PATH (this should be quite simple).

Maybe you are looking for

  • Pie chart legend showing digit "1" when we set "ignore blank cells"property

    All, We have pie chart in Xcelsius 2008 that shows the data with legend value and we have also set the ignore blank cells property to ignore the blank value from column. but once we set this property, it displays the digit "1" in the legend when ther

  • Emac wont start up

    I have been trying to install os9 onto my emac so as to run with the classic enviroment but machine does not seem to want to install it.I now find that the install cd is in the machine but will not start up at all. I repeatedly get the grey screen te

  • .as file

    How to add an additional .as file to the existing .fla file? The .fla file already contains 11 .as files. Now I want to add 12th one!

  • When will the delete podcast function be restored to itunes 11.1?

    It appears Apple removed the ability to individually delete podcasts from itunes 11.1. One forum I looked at indicated it was a "bug fix" the were working on. Does anyone know when this "bug fix" will be fixed?

  • My ipod nano 2nd generation stopped being recognised in itunes. using windows 8, all our other ipods are fine

    My ipod nano 2nd gen just stopped being recognised in itunes. I'm using windows 8.1..and not had any problems with ipod touch 5th generation or nano 7th gen. The ipod charges up as indicated by the battery icon but not being recognised at all in itun