OC4J classpath & environment variables

Hi,
What do I have to have in my classpath?
What environment variables I need to have?
Do I have to install JDK X.XX before I install OC4J or does OC4J comes packaged with a JDK?
Thanks
Nabil

I think you should install JDK1.2.2_07 or 1.3.x before you install OC4J. I am using JDK 1.3.1 now. I had used JDK 1.2.2_05 and _08, but when I start OC4J, there was a NON-FATAL error message. Although it's NON-FATAL, I still don't like it. So I moved to JDK 1.3.1. My classpath in system environment variable is ".;", nothing else.
But if you are going to use OCI8 JDBC driver,
you'd better replace the classes12.jar under OC4J\lib with classes12.zip coming with Oracle8i Client 8.1.7.3. otherwise, you will encounter an "UnsatisfiedLinkError" when you use the datasource to get connection. In addition, you should set the "path" variable in order to run Oracle8i client. You can find the information from Oracle8i'd documentation.
Good Luck!

Similar Messages

  • How to load a class , which isn't in the classpath environment variable.

    Hi, you folks.
    I have one problem. I want to load a class, which isn't in the classpath
    environment variable and I don't want to put into classpath. which method
    JVM can use to load it?
    Waitting for your sage advice.
    Regareds
    Hunter.Xiao

    You will have to write your own ClassLoader, or use something like URLClassLoader (I've never used this myself, but I've seen it mentioned elsewhere in this forum). Look here.

  • CLASSPATH Environment Variable on Win2k problem

    hi
    i am new to java, but having problems to seting the CLASSPATH Environment Variable on my Win2k professional. my university computers are alredy set and i enjoy working with java. i just cant get my head arround to this problem. it would be much appriciated if some one send me a link which provide screenshot to resolve this problem. i got my jdk1.4 kit in a folder caled jdk in c:\ root.
    thanks

    Ashwani_Saxena wrote:
    Our application is stand-alone application and we are using Applet with Object Id tag for JavaScript to Java connectivity. In our application we are displaying the value of classpath environment variable on screen.
    Applets and stand alone applications are two different animals.
    While migrating from JRE 1.5 to JRE 1.6, we are unable to retrieve the classpath variable value. After analyzing, figure out that when classpath is defined in uppercase (i.e. CLASSPATH) then only we are unable to retrieve its value. However if its defined in lower case or any character is in lower case (i.e. classpath) then its value appears correctly. We are retrieving the classpath value via the "Set" command from Java.
    That's completely unnecessary, there's a System.getevn("CLASSPATH") method.
    However the CLASSPATH environmental variable isn't much use, and certainly not in the case of Applets, which definitely don't use it.
    Futhermore I don't expect the sandbox environment of an Applet will allow you to access the environmental variables in any way, (certainly not by running a program). Applets, unless signed, have almost no access to the client machine they run on.

  • Jar file doesn't read classpath environment variable from windows xp

    I created a small program that uses javamail and jdbc driver. I program on Win XP and use java 1.6.04.
    When I compiled my classes the program works fine but when I created a jar package the jar file cannot 'see' the classpath that windows has already set.
    I have to set the classpath in the manifest file and then it works ok.
    Is this normal? I was expecting that the jar file would work just fine without any complication since the classpath is already set in the system?
    If you could point to any documentation that covers this it would be great.
    Thank you very much.
    Genti

    genti_tech wrote:
    I specified the class-path in manifest in jar file and I looked at the tutorial you are suggesting:
    http://java.sun.com/docs/books/tutorial/deployment/jar/
    which is not clear at all about the fact that jar ignores the class-path environment variable.It is specified for java. http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html#-jar

  • CLASSPATH environment variable - Pro/cons?

    I was told that its not a good idea to define CLASSPATH as a system environment variable, but was never told why. Is it correct that it should be avoided to define CLASSPATH as a system variable?
    Another thing when should a variable be defined as a system variable or an user variable?

    fedevaps wrote:
    I was told that its not a good idea to define CLASSPATH as a system environment variable, but was never told why. Is it correct that it should be avoided to define CLASSPATH as a system variable?For one thing, it means you have no control over classpaths. Say you write two apps, and they each use a different version of the same library. If you're using the one global classpath for both of them, you're stuffed. How do you allow them both to use the correct version? Then you come to deploy one of them on someone else's machine, and, say, send them a CD with it on."Right, what jars does it use again? I dunno. It always just worked, cos I've got all my dependencies in one place, and the VM picks up the lot. Goddammit. I'll have to put all of them on his machine, too .AND set up his classpath. What? There are 500 machines to roll out to? And some of them don't even +have+ that folder? Goddammit! ". See the problem? If you explicitly dictate a classpath when starting up the JVM, it can be wherever you want - typically a lib folder within that specific app - and have exactly what you need on it. Much more flexible and easier to control
    Another thing when should a variable be defined as a system variable or an user variable?I hope you're just asking cos you're already here, and not because you think this is related to Java. Cos it isn't. System variables are available to, well, all the users of the machine, including any local accounts that services might be running under. A user variable is specific to the user it's defined for, and not visible to any others. When you use which depends very much on what the variable is for

  • Setting Linux environment variable

    Is there other web site which talks about how to set the environment variable of J2EE for Linux?
    I followed this web site
    http://www.dougsparling.com/comp/howto/linux_java.html
    but after all
    when I tired to compile a servlet program... it couldn't be complied. I think the case is that the compiler couldn't find servlet.jar ...
    why is that?

    You have to verify that your CLASSPATH environment variable is set in your account's profile. I use the
    bash shell therefore my variables are set in .bashrc
    for example my CLASSPATH is set to :
    CLASSPATH=.:$J2EE_HOME/lib/j2ee.jar:$J2EE_HOME/lib/locale

  • R12, Environment Variables on Windows, and OBIEE

    Dear Experts,
    I've managed to install R12 on Windows.
    Now, in the global environment variable, Path, the user Oracle has a number of directories in its default PATH, starting with the Oracle apps middle tier.
    C:\oapps\apps\tech_st\10.1.2\bin;     
    C:\oapps\apps\tech_st\10.1.2\jdk\jre\bin\classic;     
    C:\oapps\apps\tech_st\10.1.2\jdk\jre\bin;
    C:\oapps\apps\tech_st\10.1.2\jlib;     
    C:\oapps\apps\tech_st\10.1.3\bin;     
    C:\oapps\db\tech_st\11.1.0\bin;     
    C:\Windows\system32;     
    C:\Windows;     
    I notice that there are .cmd scripts that set the Path.
    This script sets the path to look in: c:\oapps\db
    cd C:\oapps\db\tech_st\11.1.0
    VIS_black.cmd
    echo %PATH%
    C:\oapps\db\tech_st\11.1.0\perl\5.8.3\bin\MSWin32-x86-multithread\;
    C:\oapps\db\tech_st\11.1.0\bin;
    This script sets the path to look in: c:\oapps\apps
    set PATH=""
    cd c:\oapps\apps\apps_st\appl
    VIS_black.cmd
    echo %PATH%
    C:\oapps\apps\apps_st\appl\au\12.0.0\bin;
    I'd like to install OBIEE on the same server. Obviously, I don't want any path conflicts. And, OBIEE uses a different version of java.
    1)
    Do all these Apps directories need to remain in the global PATH environment variable? Or, can the directories be removed from the path, and the scripts can be relied on to set the appropriate variables?
    Thanks a lot!

    if you want global settings (always present, even after reboot), you have to edit the autoexec.bat file, e..g
    SET CLASSPATH=c:\myclasses
    you can set environment variables temporarility in a DOS shell using the same command.
    if possible, you should avoid the CLASSPATH environment variable, and use the -cp or -classpath option for java and javac. This helps a lot to solve classpath confusions.

  • Environment variables like classpath,JAVA_HOME,path

    Sir,
    I work as a java developer in a software company.I had more problems when executing servlets."could not create the java vitual machine" error comes when i try to compile java servlet file.also I do not know that how to set environment variables like classpath,path and JAVA_HOME.Also I want to know them with proper examples.
    Thanking you.
    KRamesh

    Hi Teches
    I am facing few problem in starting eclipse 3.0 ; I had gone trogh forum , 1 of the persone suggest me to upgrade the java version.For this
    I had installed java 1.5 and set the following variable
    JAVA_HOME ---> to the home dir of JAVA
    PATH ---><home dir>/bin
    CLASSPATH --><jre>/lib
    But when ever i m giving "java -version" command on console , the result is as follows:
    C:\>java -version
    java version "1.3.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
    Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
    suggestion are welcome Plz.
    ;

  • Classpath in Environment Variables

    Dear All,
    After I put " ; " in front of Environment Variables in Win XP System Properties
    so my classpath=;C:\tomcat4\common\lib\servlet.jar;C:\tomcat4\webapps\aplikasiku\WEB-INF\lib\mssqlserver.jar;C:\tomcat4\webapps\aplikasiku\WEB-INF\lib\msbase.jar;C:\tomcat4\webapps\aplikasiku\WEB-INF\lib\msutil.jar. then my problem solved. I never found NoClassDefFoundError in my java.
    Is it ok to use that classpath?
    Thanks

    Hi,
    It can be used but should really really be avoided since it makes it makes it very hard to use when you have multiple applications, and applications of different versions.
    Kaj

  • To set environment variables in OC4J stand alone server

    Hello,
    I deployed my application to OC4J standalone server. I need to set some environment variables, which will be accessed from my application.
    Could you please let me know, how to set the environment variables for the application which runs from stand alone OC4J server ?
    Thanks!

    Hello,
    Thanks for providing me the information. Here is what I am trying to accomplish...
    I have a Web service application which in turn calls a Java application and which invokes a third party application. The third party application expects some environment variables to be set.
    I set these environment on my local machine, and when I executed the Java application as a standalone application within JDeveloper - it works. But when I deployed this application to the stand alone OC4J server and when I execute the application, the third party application is not getting the environment variables correctly. (that's what I am guessing here..)
    I just put System.getenv() to get the environment variables and the value is displaying correctly.
    As Jacco suggested, I passed these env. variables thru' the startup of OC4J server.
    (i.e.) java -D<variable1>=value1 -D<variable2>=<value2> -jar oc4j.jar and still didn't work.
    Do I have to pass these values thru' any XML file within OC4J server..
    Any thoughts ? I appreciate if you can provide some input.
    Thanks!

  • Java classpath with Environment variable..

    Hi,
    I need to start an Java application with an Environment variable(EV) as class path.
    Ex:
    I have an EV APP_PATH =c:\myapp
    so i will give java -cp c:\myapp, instead of doing like this I need to give APP_PATH in the java -cp<EV>.
    I gave like this java -cp %APP_PATH% and that doesn't work...
    Is this the correct way or how to do this ?
    Thanks.

    I gave like this java -cp %APP_PATH% and that doesn't
    work...It does if APP_PATH has the correct value.
    Try echo %APP_PATH% and see if it's what you expect. They plug whatever that returns into your java command.
    Is this the correct way or how to do this ?That's the correct way. You APP_PATH must be wrong.

  • Oracle OC4J 904 and JNDI environment variable lookup up

    Hi all, we are getting this when trying to run our app in Oracle 904:
    org.springframework.beans.factory.access.BootstrapException: Define an environment variable [java:comp/env/ejb/BeanFactoryPath] containing the class path locations of XML bean definition files; nested exception is javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
    javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
    at javax.naming.InitialContext.lookup(InitialContext.java:345)
    at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)
    at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
    at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
    at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:71)
    at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:64)
    at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:117)
    at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:63)
    at MethodInvokerHome_StatelessSessionHomeWrapper1.callCreate(MethodInvokerHome_StatelessSessionHomeWrapper1.java:115)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:275)
    at MethodInvokerRemote_StatelessSessionBeanWrapper0.invoke(MethodInvokerRemote_StatelessSessionBeanWrapper0.java:77)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:103)
    at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor
    Basically the app server thinks there is no environment entry but I have it declared in ejb-jar.xml descriptor:
    <env-entry>
    <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>applicationContext.prod.xml</env-entry-value>
    </env-entry>
    Any ideas,
    J

    That depends of the shell that you use.
    If you use the bash than execute:
    EXPORT ORACLE_SID=<YOUR_SID>
    If you use csh:
    setenv ORACLE_SID <YOUR_SID>
    Bye, Aron

  • How to accces environment Variables in app

    Hi, thanks for reding my post
    I have created in the OAS Portal a variable called PORTAL_HOME that points to the home of the Oracle Portal's OC4J. I want to access this variable for logging purposes.
    I tried to access it with ${PORTAL_HOME}, but it doesn't works...
    ¿What I'm doing wrong?

    Hi,
    You can set the environmet variable in Weblogic by using the below commands
    setWLSEnv.cmd/sh ==>Set the CLASSPATH to include the WebLogic Server classes.
    Overview of WebLogic Server Domains
    or you can use to set the Environment variable along with domain specific varables using the SetDomainEnv.cmd
    To run SetDomainEnv.sh in Linux please use
    . ./setDomainEnv.sh it require two dots (Dont miss it )
    http://docs.oracle.com/cd/E28280_01/web.1111/e13749/weblogicserver.htm#ADMRF205
    Hope it helps

  • Error in setting environment variable

    hi
    Please note JKit is where my jdk1.3 is stored(i.e instead of jdk1.3 folder its JKit folder)... i have gone thru the similar threads but with no success.
    SET
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;D:\Jkit\bin;D:\Jkit\lib;D:\Oracle\bin;"C:\PROGRAMFILES\ORACLE\JRE\1.1.7\BIN";D:\JKit\Jre\Bin;
    SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
    SET CLASSPATH=c:\JavaWebServer2.0\lib\servlet.jar;c:\JKit\lib;
    SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29;
    SET JAVA_HOME=D:\Jkit;
    The error i get after running autoexec.bat and then tomcat/bin/startup is as follows..
    The CATALINA_HOME environment variable is not defined
    This environment variable is needed to run this program
    please HELP!!.THANKS

    Hi
    Very many thanks for ur solution.. i actually hadset the environment variables spacce..but when i execute the autoexec.bat file i dont get any error(out of env space)..but when i run the startup.bat file i get from the command prompt, i get the foll error.
    This is my Autoexec.bat
    SET JAVA_HOME=D:\Jkit\bin
    SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29\bin
    SET PATH=D:\Jkit\bin;C:\WINDOWS;C:\WINDOWS\COMMAND;
    SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
    THE FOLLOWING IS THE ERROR I GET WHEN I RUN STARTUP.BAT UNDER TOMCAT'S BIN UNDER THE COMMAND PROMPT
    D:\tomcat\jakarta-tomcat-4.1.29\bin>startup
    Syntax error
    Out of environment space
    Out of environment space
    Out of environment space
    Using CATALINA_BASE: D:\tomcat\jakarta-tomcat-4.1.29
    Using CATALINA_HOME: D:\tomcat\jakarta-tomcat-4.1.29
    Using CATALINA_TMPDIR: D:\tomcat\jakarta-tomcat-4.1.29\temp
    Using JAVA_HOME: D:\Jkit
    Out of environment space
    Out of environment space
    Invalid switch - -DJAVA.ENDORSED.DIRS=D:\TOMCAT\JAKARTA-TOMCAT-4.1.29\COMMON\ENDORSED
    I even set JAVA_HOME AND CATALINE_HOME to the \bin dir respectively..
    still i get the same error
    As given under the tomcat installation documentation (RUNNING.txt), i set the space for environment space under the Memory tab, for startup and shutdown.bat files, it creates a shortcut for running the resp .bat files, running startup.bat file i get,CATALINA_HOME VAR HAS NOT BEEN SET PROPERLY, THIS OCCURS FOR BOTH TOP LEVEL DIR SETTING AND /bin DIR SETTING of CATALINE_HOME IN autoexec.bat
    PLEASE HEL, I HAVE BEEN TRYING TO CONFIGURE IT FOR THE PAST DAYS BUT WITH NO SUCCESS, DONT KNOW WHERE I AM GOING WRONG..PLEASE HELP

  • Open module for managing property file and environment variables

    Looking for an open module for managing property files and environment variables (like CLASSPATH) set in a shell script. For handeling properties (preserving comments, supporting includes, appending new entries, and more) I have looked at SuperProperties from openadaptor but find certain functionality lacking. As for interfacing with common shell scripts/files containing setting for CLASSPATH, JAVA_HOME, other system/application variables another type of object editor is needed. Maybe JFIG?
    Any ideas are greatly welcomed.

    You seem wright, you hit a brick wall here with Air to find the location
    of the command console on windows...
    So in fact I never build an exe tool, but this little problem was a nice
    case to test it and I tried it.:
    I downloaded monodevelop
    -GTK# for .NET 2.12.10*
    -MonoDevelop 2.4.2*
       from http://monodevelop.com/Download
    created a console project and had an exe in 5 minutes !
    You can download the findconsole tool and the projectfiles here:
       http://greencollective.nl/temp/dump/findconsole_monoproject.zip
    findconsole.exe will reveal the path/location of cmd.exe on a windows system.
    Cheers,
    Latcho

Maybe you are looking for

  • I purchased AppleCare if I replaced my screen do I still have it?

    I got my iPad 4 about 3 months ago from school I've been having a lot of problems with it overheating to the point it makes my palms sweaty and my son would complain that it was hot  and it freezes all the time on me while I'm doing home work or scho

  • How can I import text from Word including paragraph indents?

    I'm using Captivate 7. I need to import text from a series of documents written in Microsoft Word. When I copy and paste most of the formatting is retained. Bold, italics and underline import perfectly but I lose the indented paragraphs. They all bec

  • What would happen if I restore an iPhone with a previous backup on your PC?

    I Need help guys ! I don't want I really did something good or bad like did I just delete everything on the phone before the backup !? PLease help

  • -ve values to 0 for query

    Hi, We have a formula calculated field in the query. it is resulting -ve values in some cases. we want to set, If value of the formula is less than 0 then set to 0 else the value of the field. Is there a way to set in the query itself. I tried using

  • Class Structure

    I have two java class files which are about 1MB in size. When I decompile them I get a file of size about 30KB. When these classes are run they show an iconified frame, but there is no icon in the folder (The class has been copied to a new location).