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

Similar Messages

  • 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 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.

  • 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 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).

  • How to find JAVA_HOME ?

    Hello All,
    if i dont know the path of jdk maens (at whcih drive and on which path jdk installed)
    And i want to run my java programe then how i set path of java home.
    i try that in my batch file path =JAVA_HOME\bin; java Test
    but that does not work,
    please and body help me.
    i m thanksfull.
    Arif.

    Setting environment variables is not the problem.
    the problem is that the person who has bought the
    application does not know how to set the environment
    variables.
    you dont want to go to all of them and set their
    environment variables.Almost every java application that I use from Ant to Tomcat to OpenJMS to Weblogic and many more require that JAVA_HOME be defined. All you have to do is add this information to your readme file. Some add support in the install anywhere application to find the JRE and set it in your config file. This isn't really a big deal.
    You can always bundle the JRE with your application but this will add about 6MB to your distribution size.

  • Set JAVA_HOME before running cloudscape -start

    Hi
    after i installed J2EE , i have made the following steps through DOS :
    1- set J2EE_HOME=C:\j2sdkee1.2.1
    2- set PATH=%PATH%;C:\j2sdkee1.2.1\bin
    3- cloudscape -start ---- in this step i have got an error saying "set JAVA_HOME before running this script" how can i solve this error
    with best regards

    Hi
    after i installed J2EE , i have made the following
    steps through DOS :
    1- set J2EE_HOME=C:\j2sdkee1.2.1
    2- set PATH=%PATH%;C:\j2sdkee1.2.1\bin
    3- cloudscape -start ---- in this step i have got an
    error saying "set JAVA_HOME before running this
    script" how can i solve this error
    with best regardshello,
    You did not set the variable JAVA_HOME. Set it to the home directory where the jdk is installed. For that give the command like set JAVA_HOME=C:\jdk1.3.1 in the DOS Prompt along with setting the J2EE_HOME and PATH variables...
    you may also make a new system environment variable JAVA_HOME and assign the jdk home path to it so that u need not set it everytime for a new DOS Window..
    hope that helps..
    -Jer

  • Setting java_home nd tomcat_home

    Why to set JAVA_HOME and TOMCAT_HOME?

    You set JAVA_HOME, i believe, so that Tomcat can access java from within its own scope. it has to launch process in the JVM since it is, itself, a java program. If the JAVA_HOME is not set, then it won't know how to access java otherwise. I think the TOMCAT_HOME is for it to know how to access its own web apps, for when it sets paths at launch, stuff like that.
    Don't ask questions, just do it! it's all voodoo anyways...

Maybe you are looking for

  • Exchange rate according to document date

    Hello all, We are creating PO and then Goods receipt. I need to change exchange rate according to document date while creating Goods Reiceipt. We have done few customizing changes for this. Translation date has been updated with the document date but

  • Problems With Video Transfer To

    It wont let me transfer .wmv files. IT says that the playback isnt supported by the player. And then i try to convert and it still doesnt work. Im running vista and have all the codecs installed. Any ideas?

  • FM derivation rule - ??? client copy

    Hi Expert, I have encountered a strange problem on FM derviation rule (TCODE FMDERIVE). I tried to client copy a "gold copy" client to a seperate client using using SAP_ALL but found that all the details derviation rule were missing.... I tried in my

  • HT4847 how to buy more storage in my icloud

    Dear Sir, I tried to buy more storage to my i cloud account but i couldnt buy. because unknown error. I have a balance in my account.  I tried somany ways to buy in ipad2, iphone, imac pro, nothing working, just giving unknown error or nothing. pleas

  • MeetingPlace/WebEx: AutoAccount Creation Failed

    We have a new MeetingPlace/WebEx node integration that went live yesterday. Most users are OK, however, this morning we have several users that are receiving an error message when trying to log in (for the first time: "Auto Account Creation Failed" m