Weblogic and class path

Hai,
how to set a classpath from the command line.
Ram

ON NT:
set CLASSPATH=%CLASSPATH%;c:\myclasses;d:\yourclasses
ON UNIX
CLASSPATH=$CLASSPATH:/opt/myclasses:/apps/yourclasses
export CLASSPATH
where %CLASSPATH% is the classpath value in env before we set it.
(essentially we are appending classpath here)
check out the startup/setenv scripts that comes with weblogic.
"ram prabhala" <[email protected]> wrote:
>
Hai,
how to set a classpath from the command line.
Ram

Similar Messages

  • Setting path and class path help

    I am a complete beginner who is currently starting a cd based tutorial!I have downloaded jdk1.1.6 which is the nearest developement kit to the one used in the tutorial.I use windows 98.When I try to set my path or class path as instructed in the docs, I cannot find any thing in the autoexec file at all.I have opened using notepad/Run and DOS edit but all three open an empty file.Where will I need to set up the path and class paths.My system must run these from somewhere else perhaps due to an update.

    Hi,
    Put the following statements in your autoexec.bat.
    <homepath> = Path of your JDK folder on the drive. e.g. c:\jdk
    SET CLASSPATH=;.;<homepath>\lib\tools.jar; .... continue with other jar files on the same line and seperate the entries by a semicolon.
    SET PATH=C:\WINDOWS\;C:\<homepath>\BIN\;
    This autoexec.bat must be on c:\. i.e. U can open it in notepad by giving c:\autoexec.bat in the File Open Dialog. It is possible for this file to be empty. Simply add the commands on the last line.
    Regards ,
    Karan

  • WAR, MANIFEST.MF and class-path to jars

    Hello,
    I have a WAR shared library shared.mylib consisting of a series of JARs in a WAR:
    /WEB-META/
    MANIFEST.MF
    /WEB-INF/
    lib/
    lib1.jar
    lib2,jar
    in the MANIFEST.MF I don't need to specify any Class-Path, since lib/ is considered by default and classes are loaded.
    However I need a way to load classes from other directories in the WAR (without specifiying each jar if possible).
    I have tried all the possibilities with Class-Path in the MANIFEST, but nothing works. Suppose you have /mylibs/ with many jars other than the default /lib.
    What should I have to do to make weblogic load all the claasses in the jars under /mylibs ?
    Thanks.

    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html

  • Package and class path

    for two yrs i am trying to get package right but no result
    i am using window 98
    i have my jdk in d:\jdk1.2\bin; and this works fine if i do not try to use package;somtimes it works well half way with package!
    suppose i want to create a package called rubberband and put classes in it
    i created a folder called rubberband in d:\ and then
    package rubberband;
    import java.awt.*;
    public class RubberbandTest extends Frame{}
    class RubberbandTestPanel {}
    class Colorchoice{}
    this is one unit
    and there are other classes
    package rubberband;
    import java.awt.*;
    abstract class Rubberband {}
    package rubberband;
    import java.awt.*;
    class RubberbandPanel extends Rubberband {}
    and so on
    i opened executive.bat and added to class path as follows:
    path:d:\rubberband\bin;before the already existing d:\jdk1.2\bin;
    then when i come to compile and run the program i have problems
    like:class so and so not found
    please help please step by step tell me what to do

    Another sample might answer your "different location" question.
    Suppose program YourProg in package yourPkg located in directory C:\javaprogs needs to access a class file ExtraClass in package extraPkg in directory C:\differentDir.
    1) Of course the source file must exist in file
    C:\javaprogs\yourPkg\YourProg.java
    and
    C:\differentDir\extraPkg\ExtraClass.class must exist.
    2) Inside the YourProg source, you must import ExtraClass:
    import extraPkg.ExtraClass;
    3) To compile YourProg, you must include location of extraPkg.ExtraClass in the classpath (or the compiler will complain about the inport line above):
    (a -- from C:\javaprogs directory): javac -classpath C:\differentDir yourPkg\YourProg.java
    (b -- from any directory): javac -classpath C:\javaprogs;C:\differentDir yourPkg\YourProg.java
    4) To run YourProg (assuming it contains a main method), you must include all locations in classpath:
    (a -- from C:\javaprogs directory): java -classpath .;C:\differentDir yourPkg.YourProg
    (b -- from any directory): java -classpath C:\javaprogs;C:\differentDir yourPkg.YourProg
    If you get a NoClassDefFoundError, that means that the java was run without the proper location included in the classpath passed to the -classpath argument. The -classpath argument should be ';'-separated and contain no spaces (so if a long directory name contains space you should enclose in double quotes, as this example:
    java -cp "C:\Program Files\somedir;C:\anotherdir" NameOfAClass

  • Jar files and class path

    I have a small swing application which connects to an external database and queries something and creates a small report on the local machine. Running from the command line calling the == java MyClass works good. I would like to deploy this to two other machines. I dont want the use to run from the command line solution. I want to run it from a batch file using the jar file. But I am getting a a classpath issue ( ClassNotFoundException for the jdbc drivers ) . I signed my jar file using jarsigner too. I am not interesed in using the Web Start because there are no other security attached to this app. Only couple of people intends to use it. Running from the command line calling the app file explicitly works. In the batch file I added the setclass path too. Still it gives an exception. I added the jdbc driver jar file to the appication jar file too. Still the problem exists.
    Any ideas ?

    instead of including the JDBC driver inside your application's jar, have the two jars sit in a directory separatly and include both of them on your classpath. Or, you can even specify a manifest.mf Class-Path parameter for your application's jar file so that it automatically includes the driver's jar.

  • Set the path and class path in windows xp professional

    hi guys....could any one tell me step by step on how to set the path and classpath on windows xp professioanl? This is my path and classpath
    set path = %path%;C:\jdk1.3.1_02\bin;c:\JOpen672.jar;c:\
    set CLASSPATH = c:\j2sdkee1.3.1\lib\j2ee.jar;c:\JOpen672.Jar;c:\;c:\postgresql.jar;c:\jai_core.jar
    not working please help me on this thanks alot.
    novicepro

    Below is a Helloworld program, copy and paste it into your editor and save it as "HelloWorld.java" Use capitalization, Java is case-sensitive. If you're using Notepad, quote the name when saving, otherwise Notepad adds ".txt" to the name. Go to DOS and check that you've got the file where you want it and that it's named correctly.
    ----------program HelloWorld.java--------------
    public class HelloWorld {
    public static void main (String[] args) {
    System.out.println("Hello World!");
    In the same directory as HelloWorld.java, enter "javac" - the program should print out a list of options, if not, set your PATH - see below.
    In the same directory as HelloWorld.java, enter "javac HelloWorld.java" and the javac compiler will create HelloWorld.class. If it was successful it will not give any messages. Check that the file is created.
    In the same directory as HelloWorld.java, enter "java -cp . HelloWorld" with the spaces and the period. The program will run.
    Here is additional information:
    The Path is a set of pointers that Windows uses to locate programs that you execute, like javac.exe and java.exe. This setting is explained here:
    http://java.sun.com/j2se/1.4/install-windows.html
    Scroll down to: 5. Update the PATH variable
    (you should have already done this as part of the s/w installation)
    The CLASSPATH is another set of pointers that is used by Java to find the files that you create and want compiled and/or run. This setting is explained here:
    Setting the Classpath:
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/classpath.html
    [NOTE: always start your classpath with ".;" which means the current directory. See my classpath, below]
    How Classes are Found:
    http://java.sun.com/j2se/1.4/docs/tooldocs/findingclasses.html
    Examples:
    This is my path
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BATCH;C:\J2SDK1.4.0_01\BIN;C:\PROGRA~1\UTILIT~1;C:\PROGRA~1\WIN98RK
    This is my classpath
    CLASSPATH=.;C:\mjava;C:\mnrx;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.0_1\lib\tools.jar;C:\NetRexx\NrxRedBk

  • Java class libraries and class paths

    I'm using NetBeans IDE 6
    I'm trying to make a class library (which is started from another application).
    This is supposed to connect to a SQL 2005 database by first registering the SQLServerDriver from the sqljdbc.jar library.
    I've tried it in an Application with a main class and it runs fine. But when I move the built classes to the folder I want them to run from, I get a ClassNotFound exception for the ServerDriver when run.
    I'm assuming it is a problem with the classpath after I make the move, is there anything special I need to do to keep the classpath intact so it can find the driver?
    Sorry if it's too vague, I can try to clarify things if needed.

    See this NetBeans tutorial:
    http://www.netbeans.org/kb/articles/javase-deploy.html
    These forums provide support for Java programming, not NetBeans (or any other IDE.)
    This question should have been posted to the NB site mailing list.

  • Class-path manifest attribute

    Hi,
    I have a session bean, that references some external classes. I am deploying the
    application as a ear file. The session beans are stored in a jar file and the
    external classes are stored in a separate jar file. Both the jar files go into
    an ear file. The manifest of the session bean jar file defines the relative URI
    of the other jar file using the Class-path attrtibute. I use JDK 1.3.1. However,
    when I try to deploy the ear, WLS complains about not being able to find the extermal
    class. I use WLS 6.1. This is driving me nuts, any help would be highly appreciated.
    I have attached the EAR file.
    Thanks
    Meeraj

    I was wondering as to why was this constraint placed on EJB's in
    weblogic(that Class-Path can't be used in manifest). After all EJB jar is
    also a jar file, and as what java extensions mechanism dictates, any jar
    file can utilize this feature.
    and how the code would the loadClass/findClass method in the classloader
    look like of I were to disable this feature (like what weblogic currently
    behaves....)
    any thoughts!!!
    - Rajeev Dave
    "Deepak Vohra" <[email protected]> wrote in message
    news:[email protected]...
    Manifest Class-Path
    Use the manifest file to specify that a JAR file can reference another JARfile.
    Standalone EJBs cannot use the Manifest Class-Path. It is only supportedfor
    components that are deployed within an EAR file.
    To use the manifest file to reference another JAR file:
    Specify the name of the referenced JAR file in a Class-Path header in the
    referencing JAR file's Manifest file.
    The referenced JAR file is named using a URL relative to the URL of the
    referencing JAR file.
    Name the manifest file META-INF/MANIFEST.MF in the JAR file
    The Class-Path entry in the Manifest file is as follows:
    Class-Path: AAyy.jar BByy.jar CCyy.jar.
    Meeraj wrote:
    Hi,
    That is not what I want to do. I had got similar stuff working fine with
    JBoss
    by resolving dependencies using Class-path manifest attribute.
    Thanks
    Meeraj
    Deepak Vohra <[email protected]> wrote:
    Add the external classes to the Sessions Bean jar.
    Meeraj Kunnumpurath wrote:
    Hi,
    I have a session bean, that references some external classes. I amdeploying the
    application as a ear file. The session beans are stored in a jar fileand the
    external classes are stored in a separate jar file. Both the jar
    files
    go into
    an ear file. The manifest of the session bean jar file defines therelative URI
    of the other jar file using the Class-path attrtibute. I use JDK
    1.3.1.
    However,
    when I try to deploy the ear, WLS complains about not being able tofind the extermal
    class. I use WLS 6.1. This is driving me nuts, any help would be
    highly
    appreciated.
    I have attached the EAR file.
    Thanks
    Meeraj

  • Setting classpath and library path...

    hello..
    i have downloaded the jfreechart1.0.4 for adding chart in my java application...though i have gone through the installation guide...but i havent figured it out how to make the packages available to my java application....
    i am very new to java ....so pls suggest me any way to make those packages available to my java which is in my j2sdk\bin folder...and truly i dont have any idea where to set the lib path and class path....so pls post any suggestion or any url that will help me...

    Hi,
    You should not place files in the bin directory of your JDK/JRE. Just place the jar-files somewhere close to your application, e.g. in a lib folder in your project folder. Then set the classpath to point to those jars when you execute your application.
    E.g.
    java -classpath ./classes/;./lib/somejar.jar;./lib/anotherjar.jar MainClassKaj

  • Multiple Class-Path: attributes in Jar files

    Hello,
    I'm packaging a set of jar files for distribution with Class-Path: attributes in them. In the documentation I read and in one of the java trails it said that I could have a manifest file like:
    Class-Path: log4j.jar log4j-core.jar
    Class-Path: jsse.jar jcert.jar jnet.jar
    But this doesn't work. It only works when I do this:
    Class-Path: log4j.jar log4j-core.jar jsse.jar jcert.jar jnet.jar
    Here is how I'm running the jar:
    java -jar server.jar
    Is the documentation wrong? Or this is a bug?
    thanks
    charlie

    Certain attributes were only meant to be specified once. Like Main-Class and Class-Path for example. If these were listed two or more times, then the last occurance is the one that gets recognized (basically, each new instance overwrites the previous instance). Some attributes are listed as "per-entry" and are freely duplicated for each entry. For example signed jars could have a number of Name: and xxx-Digest: attributes.
    This link is to the manifest spec:
    http://java.sun.com/products/jdk/1.2/docs/guide/jar/manifest.html
    To answer the original posters question, the doc's are in error. Actually, the error was not in the docs, it was in the tutorial, but none the less its still in error. He could have done this:
    Class-Path: log4j.jar log4j-core.jar
    jsse.jar jcert.jar jnet.jar
    ^-- two spaces before the start of jsse.jar
    because the docs allow for line continuation (although it's not exactly clear if you read the docs). The docs are also apparently in error regarding the max line length of 72 bytes. I have tested this with over 100 char's on a win32 machine and it works fine for me. The limitation must therefore apply to some other operating system, or it could just be in error.
    -Ron

  • Source/class paths

    Hi,
    I'm developing a web application. i use JBuilder. I need to maintain my source files module wise . In other words I need to create a sub directory for each module in source file root folder and contain source files in those sub folders in root source folder(.java files) like.
         \com\Leave\<all the source files related to Leave module>
         \com\Medical<all the source files related to Medical module>
    According to that I need to maintain class files too. so it would look like
         \classes\com\Leave<all the class files related to Leave module>
         \classes\com\Medical<all the class files related to Medical module>
    So how do I create multile source paths/files and class paths/files respectively?

    I havent worked on Jbuilder, but setting up souce path & output path shouldnt be difficult.
    Just check your project properties.. and set the souce path to /src
    "src" should hold ur com/..blah..blah..blah
    ouput path to /classes
    During project build the class folder and files should get generated automatically.

  • Diff between CLASSPATH and weblogic.class.path in t3config

    Hi,
              My servlets which would run happily in WLS4.0.2 on NT do not run anymore
              in WLS4.5.
              In order to help me troubleshoot this problem will someone please
              explain me the difference between the path mentioned against
              weblogic.class.path in the output of t3config
              and the path mentioned against CLASSPATH in the same output.
              When I type t3config I get the following. What is the diff between the
              lines marked ---->>>>
              WebLogic startup settings are presently:
              CLASSPATH Prefix=
              .;C:\wip\java\ejb\classes;d:\weblogic\jre1_1\lib\classes.zip;d:\weblogic\jre1_1\lib\rt.jar;d:\weblogic\classes\boot;d:\Weblogic\evel\cloudscape\lib\cloudscape.jar
              ------->>>>>CLASSPATH=
              ".;C:\wip\java\ejb\classes;d:\weblogic\jre1_1\lib\classes.zip;d:\weblogic\jre1_1\lib\rt.jar;d:\weblogic\classes\boot;d:\Weblogic\evel\cloudscape\lib\cloudscape.jar;d:\Weblogic\jre1_1\lib\classes.zip;d:\Weblogic\jre1_1\lib\rt.jar;d:\Weblogic\license;d:\Weblogic\classes;d:\Weblogic\lib\weblogicaux.jar;d:\Weblogic\eval\cloudscape\lib\cloudscape.jar"
              JAVA_HOME= "d:\Weblogic\jre1_1"
              WEBLOGIC_HOME="d:\Weblogic"
              system properties:
              weblogic.system.home=d:\Weblogic
              java.compiler=symcjit
              ------->>>
              weblogic.class.path=d:\Weblogic\license;d:\Weblogic\classes;d:\Weblogic\lib\weblogicaux.jar
              INITIAL_HEAP= 32 MB
              MAX_HEAP= 32 MB
              SERVERCLASSPATH=
              ".;C:\wip\java\ejb\classes;d:\weblogic\jre1_1\lib\classes.zip;d:\weblogic\jre1_1\lib\rt.jar;d:\weblogic\classes\boot;d:\Weblogic\evel\cloudscape\lib\cloudscape.jar;d:\Weblogic\jre1_1\lib\classes.zip;d:\Weblogic\jre1_1\lib\rt.jar;d:\Weblogic\classes\boot;d:\Weblogic\eval\cloudscape\lib\cloudscape.jar"
              

    Pankaj,
              It all depends on whether you want to do reload on modify feature or not. If you don't need reload on modify they you can have servlets in weblogic.class.path.
              Two things to remember if you can't invoke servlets.
              1. Do you have the servlet registered.
              2. If not, do you have ServletServlet property uncommented. If this property is not commented out then you have to give the complete path to make servlets work.
              Good luck,
              Prasad
              Pankaj Tandon wrote:
              > Hi,
              > My servlets which would run happily in WLS4.0.2 on NT do not run anymore
              > in WLS4.5.
              > In order to help me troubleshoot this problem will someone please
              > explain me the difference between the path mentioned against
              > weblogic.class.path in the output of t3config
              > and the path mentioned against CLASSPATH in the same output.
              >
              > When I type t3config I get the following. What is the diff between the
              > lines marked ---->>>>
              > WebLogic startup settings are presently:
              >
              > CLASSPATH Prefix=
              > .;C:\wip\java\ejb\classes;d:\weblogic\jre1_1\lib\classes.zip;d:\weblogic\jre1_1\lib\rt.jar;d:\weblogic\classes\boot;d:\Weblogic\evel\cloudscape\lib\cloudscape.jar
              >
              > ------->>>>>CLASSPATH=
              > ".;C:\wip\java\ejb\classes;d:\weblogic\jre1_1\lib\classes.zip;d:\weblogic\jre1_1\lib\rt.jar;d:\weblogic\classes\boot;d:\Weblogic\evel\cloudscape\lib\cloudscape.jar;d:\Weblogic\jre1_1\lib\classes.zip;d:\Weblogic\jre1_1\lib\rt.jar;d:\Weblogic\license;d:\Weblogic\classes;d:\Weblogic\lib\weblogicaux.jar;d:\Weblogic\eval\cloudscape\lib\cloudscape.jar"
              >
              > JAVA_HOME= "d:\Weblogic\jre1_1"
              > WEBLOGIC_HOME="d:\Weblogic"
              > system properties:
              > weblogic.system.home=d:\Weblogic
              > java.compiler=symcjit
              >
              > ------->>>
              > weblogic.class.path=d:\Weblogic\license;d:\Weblogic\classes;d:\Weblogic\lib\weblogicaux.jar
              >
              > INITIAL_HEAP= 32 MB
              > MAX_HEAP= 32 MB
              > SERVERCLASSPATH=
              > ".;C:\wip\java\ejb\classes;d:\weblogic\jre1_1\lib\classes.zip;d:\weblogic\jre1_1\lib\rt.jar;d:\weblogic\classes\boot;d:\Weblogic\evel\cloudscape\lib\cloudscape.jar;d:\Weblogic\jre1_1\lib\classes.zip;d:\Weblogic\jre1_1\lib\rt.jar;d:\Weblogic\classes\boot;d:\Weblogic\eval\cloudscape\lib\cloudscape.jar"
              

  • Classpath, weblogic.class.path, server's class path, javaclasspath, serverclasspath ?? confused

    When I type t3config , I see a couple of class paths and I'm confused which
    one is which and
    what are the diffrences between them, there is classpath, javaclasspath,
    serverclasspath, weblogic.class.path
    and JVM class path, Server's class path on the weblogic console window.
    any clearification is appreciated.
    thanks,
    CLASSPATH Prefix
    CLASSPATH
    JAVA_HOME
    WEBLOGIC_LICENSEDIR
    WEBLOGIC_HOME
    system properties
    weblogic.class.path
    INITIAL HEAP
    MAX HEAP
    SERVERCLASSPATH

    Why would you do that - same class in both class paths? Don't.
    Don't put any application classes in the system
    classpath (JAVACLASSPATH).
    Mike
    Dimitri Rakitine <[email protected]> wrote:
    http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_deployover.html#1056256
    Tony Lu <[email protected]> wrote:
    Can someone tell me how does weblogic use the weblogic.class.path? what's
    the relation between weblogic.class.path and systemclasspth ? if I have 2
    different classes ( same name but different ) on bothpath, which one would
    be loaded ? the one in classpath or the one in weblogic.class.path?
    Dimitri

  • Weblogic.class.path

    I am using WL 5.1, SP12, on Solaris ...
              I am running jsp code that accesses a bean class specified in the weblogic.class.path in my startscript.
              I got a "ClassNotFound" error when I run the jsp code.
              Are all classes in weblogic.class.path of a given WL server visible to JSPs running in that server - regardless web-applications?
              I appreciate any help. Thanks
              

    Look at startWeblogic.{cmd/sh}.
    WLCLASSPATH should include the weblogic classes and any of your classes.
    JAVACLASSPATH include the JDK classes, the weblogic/classes/boot and DB
    access classes
    (Cloudscape.jar, JConnect classes, etc.) and NOTHING else.
    "Shoaib" <[email protected]> wrote in message news:[email protected]..
    The documentation on setting up the environment mentions this property
    but doesn't give any information on where it should be set.
    How is this system property specified and what is it used for ?
    Should it be specified via wlconfig.exe or is included in
    weblogic.properties ?
    I'm currently using the latest beta for WLS.

  • J2EE Packaging and manifest Class-Path:

    Does anyone know if Weblogic 6.0 supports the redefined deployment extension mechanism
    that makes use of the 'Class-Path:' entry in the manifest files?
    In our project we have one single .ear file containing a couple of EJB's (.jar
    files) and a Web Application (.war file).
    We are using log4j as logging mechanism and we would like to keep everything in
    the .ear file so that we can make hot-deploys. So we are trying not to make use
    of the classpath in startWebLogic.sh. All of our EJB's and the Web Application
    makes use of log4j.jar. My question is; can I do the following and make it work
    in Weblogic 6.0?
    1. In every EJB .jar file I add the follwing to the manifest file - "Class-Path:
    log4j.jar"
    2. I place the log4j.jar in the root directory of the .ear file.
    By doing this I expect that the ear classloader loads the log4j.jar classes. Am
    I right or do I do something wrong. At least it does not seem to work.
    Using Weblogic 6.0 without service pack.
    Thanks,
    Steen

    This does not work in WebLogic 6.0. It's supposed to be supported in 6.1
    Daniel
    -----Original Message-----
    From: Steen Laursen [mailto:[email protected]]
    Posted At: Wednesday, August 08, 2001 1:32 PM
    Posted To: environment
    Conversation: J2EE Packaging and manifest Class-Path:
    Subject: J2EE Packaging and manifest Class-Path:
    Does anyone know if Weblogic 6.0 supports the redefined
    deployment extension mechanism
    that makes use of the 'Class-Path:' entry in the manifest files?
    In our project we have one single .ear file containing a
    couple of EJB's (.jar
    files) and a Web Application (.war file).
    We are using log4j as logging mechanism and we would like to
    keep everything in
    the .ear file so that we can make hot-deploys. So we are
    trying not to make use
    of the classpath in startWebLogic.sh. All of our EJB's and
    the Web Application
    makes use of log4j.jar. My question is; can I do the
    following and make it work
    in Weblogic 6.0?
    1. In every EJB .jar file I add the follwing to the manifest
    file - "Class-Path:
    log4j.jar"
    2. I place the log4j.jar in the root directory of the .ear file.
    By doing this I expect that the ear classloader loads the
    log4j.jar classes. Am
    I right or do I do something wrong. At least it does not seem
    to work.
    Using Weblogic 6.0 without service pack.
    Thanks,
    Steen

Maybe you are looking for