About classpath!!!

Gents,
I have oracle 816 installed on my laptop.
Upon attempting to write a small code in java( thru cmd prompt), I get the "main" java.lang.NoClassDefFoundError: HelloWorldApp
OS:NT, Version: J2SDK1.4.1
Can anyone help here how to exactly update the classpath and path env variable?
Thanx much.
Tarry

Hang on guys,
apparently teh search forum here has a lot more for me to dig in.
Let me get back to ya all if I can't figure it out.

Similar Messages

  • Question about classpath on startup

    Hello,
    I need a clarification about classpath value on Weblogic startup.
    I set "Class Path" value by Administration Console.
    When I start my Weblogic Server by "startWebLogic.sh" my classpath modification is not working. It need that just restart my server by Administration Console and it's working !!
    Can you help me about it ?
    Thanks (and sorry for my english...)

    Hi Julien,
    When we set "Class Path" value by Administration Console that would only be taken when you start the managed server using the node manger and not when you are using a star-up script.
    Hence when you start the managed server using the console it picks up the class path which is set on the Admin Console and when you start he server using the start-up script that would pick up the class path which is been set in the start-up script not the console one.
    Regards,
    Ravish Mody
    http://middlewaremagic.com/weblogic/
    Come, Join Us and Experience The Magic…

  • Confused about CLASSPATH and how java handles import statements...

    Hello,
    I must admit I don't get it. I read the articles about setting CLASSPATH etc. but I still wonder:
    If you use an import statement, what does the compiler do? I.e. where does it look for the specified classes? I find it confusing because I see in different locations different .jar files:
    C:\jdk1.3.1_03\lib\dt.jar
    C:\jdk1.3.1_03\lib\htmlconvertor.jar
    C:\jdk1.3.1_03\lib\tools.jar
    and also
    C:\jdk1.3.1_03\jre\lib\i18n.jar
    C:\jdk1.3.1_03\jre\lib\rt.jar
    C:\jdk1.3.1_03\jre\lib\jaws.jar
    C:\jdk1.3.1_03\jre\lib\sunrassign.jar
    Can someone explain me what the purpose is of these files?
    And why do I have the same contents in
    C:\Program Files\JavaSoft\JRE\1.3.1_03\lib
    and in
    C:\jdk1.3.1_03\jre\lib
    Why is that?
    Thanks for answering my questions!
    -mike

    Thanx for the answers, but I still wonder, everyone
    here says I need to set the classpath, but I don't.Probably because your classes are already in the class path. The compiler/jvm also look for classes by themselves not just in jar files, when just a directory is supplied in the class path. And a period (".") is a valid directory.
    Programs importing different classes compile with no
    problem. So what's up with that?
    Presumably you are referring to your own code - because they are in the class path.
    Second, I still don't understand why the runtime needs
    the .jar files. The runtime uses classes, like String, that have to come from somewhere.
    This would also mean that end-users
    need to set the classpath to the .jar files in their
    JRE directory to be able to run programs that import
    classes from these .jars. But this is not true, right?No it is true. The end-users will have to set the class path. There are variations on this which make it seem like no class path is set. For instance applets in a browser are java but the end-user does not need to set a class path. That is because the browser knows how to download classes/jars and how to set it up so it uses them. (Actually it uses a class loader, but that is probably more information that you need.)
    Because if I make some nice classes myself and import
    them, how can I expect my end-user to install these
    classes and make a classpath for them?That would be between you and you end-user.
    First installation is not part of java. For installation you will have to find something outside of java to accomplish the goal.
    Additionally how the class path gets set is OS specific. Java does not deal with that. You will also have to find some way to deal with this (most likely part of the installation.)
    There are also variations on this. For example the browser example I gave above. Or using the ext directory. Or creating an executable jar. Or simply setting the class path.
    In my understanding it should only be needed in the JDK, not
    in the JRE. True or am I mistaken?Mistaken. The class path is needed in the JRE as well. You will need to set it.

  • Need help about classpath and packages

    I am new to jAVA and trying to learn packages.I wrote a java programme called AccountBalance.java with package MyPack;
    I set the classpath as C:\java programs\MyPack.
    My java program was compile fine BUT classes were not creating in MyPack folder.
    Cananyone suggest how java programs create the classes in ClassPath specified folder automatically.
    Thanks

    Here you want to create your class file in a separate package.
    Actually the creation of class will happen at the time of compilation.
    So you have to take care about it at the time of compilation.
    try this one to compile your source file:
    javac <java source file name> -d <targetplace>
    the java source file name is your source file name and -d is switch that is used to create the package(directory) and the target place is the location where you want to create your package. if you want to create your package in the current directory then you can simply give
    javac <java source file name> -d .
    try this one all the best. if it's not working then reply me so that i can check myself and try to find another solution for that.
    thank you
    bye

  • A question about CLASSPATH and Package

    The configuration of my computer is:
    Windows98, C:\j2sdk1.4.0
    Which in Autoexec.bat are included like this:
    path=C:\j2sdk1.4.0\bin
    set CLASSPATH=C:\j2sdk1.4.0\lib
    Then I make a new directory named t in C:\j2sdk1.4.0\lib, where there is a compiled file a.class, source code is:
    package t;
    public class a
    And another java file was in D:\t, named b.java, code like this:
    import t.*;
    class b extends a
    public static void main( String[] args )
    System.out.println("OK");
    Then I compiled like this: javac b.java, it was wrong; but when I compiled like this: javac -CLASSPATH C:\j2sdk1.4.0\lib b.java, It was OK!!! Why?? And then when I execute like this: java b, an error message was prompted(Can not find class t/a)!!! How can I do?

    First one general comment: I would not advise putting your own classes into C:\j2sdk1.4.0\lib since this suggests that the classes under this directory belong to the Java distribution. So my advice: create your own directory somewhere like D:\user\Classes or whatever.
    The directory (-ies) you specify in CLASSPATH are root entries telling the JVM where to start looking for classes. Why root entries? Well, the package structure is reflected in the directory structure relative to these roots. So a class of package t belongs into the subdirectory t of one of the directories specified in your CLASSPATH. This would be the case of your class a - by the way, the convention says that class names are capitalized. Since class b, on the other hand, is not in any package, it belongs irirectly into one of the directories of your CLASSPATH.
    Whereas the compiler is fairly forgiving about the location of your source files, the JVM is not. Invoking a class of some package requires you to provide the fully-qualified name to the java command. So if you wanted to run class a, you would have to invoke "java t.a". Starting class b, simply requires a call of "java b". But make sure the class file of class a is located in the subdirectory t of one of the directories specified in your CLASSPATH.

  • Question about classpath and jar file

    I have a jar file (actually jhall.jar, the java help jar file). How do I uses its classes if I don't want to add it to the classpath. Currently, I have the jar file in the same directory as all my other classes.

    it simply adds secondjar.jar into firstjar.jar, rather
    than extracting secondjar.jar's files and put it into
    firstjar.jar. How would I be able to do that?Don't do either of them. Distribute the two jar files separately, and in the manifest of the one which is meant to be your executable jar file, put a Class-Path: entry that refers to the other one. Look at the latter parts of the tutorial about jar files:
    http://java.sun.com/docs/books/tutorial/jar/basics/
    PC&#178;

  • Question about CLASSPATH Prefix and others...

    Hi all,
    Would someone pls give me some help about the following questions:
    1. how to set the CLASSPATH Prefix, CLASSPATH and SERVERCLASSPATH, and
    the usage of them?
    2. the default JAVA_HOME is \WebLogic\jre1_2, after I changed it to
    \jdk1.1.7, the EJB Deployer failed to start with error message: The
    windows registry is misconfigured for Weblogic Server. Even after I
    copy jre under \WebLogic\jre1_2 to \jdk1.1.7
    3. For testing purpose, I changed weblogic.class.path back, then
    restarted NT, started Weblogic Server, to my surprise, the pool was
    created as well! How do you think about this?
    Thanks in advance,
    Paul Shen
    Email: [email protected]
    WWW: shensr.8m.com

    WLS loads classes from weblogic.class.path property
    Refer this document
    http://www.weblogic.com/docs51/admindocs/classpath.html
    Kumar
    Paul Shen wrote:
    At first, thanks Jesse for the help. Sorry for my mistake that making
    question 3 out of context.
    WinNT 4.0 SP6, Weblogic 5.10, SQLServer 7.0
    I wanna create a connection pool for SQLServer. At beginning, I
    mis-add the JDBC Driver class path to weblogic.class.path. As a result
    the pool creating failed. After I add the JDBC Driver class path to
    weblogic.class.path and CLASSPATH (by wlconfig), the pool created
    succefully.
    For testing purpose, I changed weblogic.class.path back, then
    restarted NT, started Weblogic Server, to my surprise, the pool was
    created as well! How do you think about this?
    Paul
    On 22 Aug 2000 12:27:28 -0800, [email protected] (Jesse E Tilly)
    wrote:
    Comments inline...
    [email protected] (Paul Shen) wrote in <wS2iOZDX8dSgABq4nblptb+wg7Uz@
    4ax.com>:
    3. For testing purpose, I changed weblogic.class.path back, then
    restarted NT, started Weblogic Server, to my surprise, the pool was
    created as well! How do you think about this?This question seems out of context. I do not know what pool you are
    referring to, nor the actions prior to changing the classpath.
    Jesse

  • I'm confused about classpath

    Please can anyody explain it to me? I have WindowsXP and in my folder i have some program in jar and classes12.zip (oracle jdc classes for version 8i). I try to load the driver ( Class.forName("oracle.jdbc.driver.OracleDriver") ). When I run it via "java -jar someprogram.jar" it throws ClassNotFoundException, when i try "java -classpath classes12.zip -jar someprogram.jar" it is same. But whe I copy classes12.zip to %JREHOME%/lib/ext/ it works. Can anyody explain to me how this mechanism of classloading (locations) works... in books I cannot find anything :( Thx

    The keyword to google for is Extension Mechanism:
    http://java.sun.com/j2se/1.4.2/docs/guide/extensions/spec.html

  • Question about classpath

    After I set the classpath, I can run the program with importing the packages from other folder.
    However, when I run the applet with importing the packages from other folder, the errors occur and state that the class file is not found in the directory.
    It is obvious that the JVM does not follow the classpath to run the class file. I try to set J-classpath but it still fails to run the applet. Anyone know how to set the classpath?

    lighthero wrote:
    C:\Java
    |-------applet
    |           |--------------Applet.html
    |           |--------------Applet.class
    |
    |--------API
    |------------Package.classI can use -J-classpath -J<classpath> to run the applet but I don't how to set the enviroment variable in window. Furthermore, I use the appletviewer(not webstart) to run the applet. (not the applet server)The Applet.html file's <applet> tag needs to specify that the ..\API folder is to be included in the classpath (assuming that "API" is the 'parent' folder of Package's package).

  • Need info about classpath

    Hi just give me any tutorial links or any explanations regarding classpath's character
    thanks

    The Gateway to Classpath Nirvana
    Setting the class path (Windows)
    How Classes are Found

  • Dumb question about classpath

    ok I am running windows 2000 and I cannot run executables like 'javac' outside of the bin dir.
    I tried all the set classpath = c:\1234\bin; c:\temp; etc., etc. I tried going through the control panel, system and environment variables and I cannot get java to work right. I want to be able to work out of any dir in the command prompt window.
    Can anyone help me out?
    thanks in advance

    right click on my computer click advanced click environment variables
    and add c:\jdk1.x.x.\bin to the path var
    OR
    everytime you open a dos shell type path= c:\jdk1.x.x.\bin

  • Probleme about classpath

    Hi ( again i know ... lol )
    I go through the forum to understant the classpath problem but some points remain unclear to me ...
    I have an application , my main class is in a directory and i use in this main other classes that are contained in sub-directory parcours.
    So to compile and execute the only solution that i have found is to type :
    javac -classpath .;./parcours *.java
    java -classpath .;./parcours Mainclass
    Is there another solution , for exemple to specify directly in the source of my main class the path of the parcours classes ( some kinf of import or somethin ... ) or maybe somethin else ...
    Thx.

    Have you understood correctly the concept of packages? Read the Java Tutorial - http://java.sun.com/docs/books/tutorial/java/interpack/packages.html .
    But if you can run your app with so few parameters given, you are lucky.
    Real world apps usually have real big classpath strings - I use the Sun iPlanet 6.5 product and the classpath I must set in the iPlanet Registry is :
    C:\jar\xerces.jar;C:\iPlanet\ias6\ias\APPS\soap-services;C:\oracle\ora90\jdbc\lib\classes12.zip;C:\iPlanet\ias6\ias\classes\java\javax.jar;C:\iPlanet\ias6\ias\usr\java\lib\tools.jar;C:\iPlanet\ias6\ias\classes\java\activation.jar;C:\iPlanet\ias6\ias\classes\java\servlet.jar;C:\iPlanet\ias6\ias\classes\java\mail.jar;C:\iPlanet\ias6\ias\classes\java\jdbc20.jar;C:\iPlanet\ias6\ias\classes\java\iascli.jar;C:\iPlanet\ias6\ias\classes\java\kfcjdk11.jar;C:\iPlanet\ias6\ias\classes\java;C:\iPlanet\ias6\ias\classes\java\ldapjdk.jar;C:\iPlanet\ias6\ias\classes\java\ldapfit.jar;C:\iPlanet\ias6\ias\classes\java\ldapsp.jar;C:\iPlanet\ias6\ias\APPS;C:\iPlanet\ias6\ias\classes\java\ktjdk11.jar;C:\iPlanet\ias6\ias\classes\java\kadmin.jar;C:\iPlanet\ias6\ias\classes\java\tomcat\jasper.jar;C:\iPlanet\ias6\ias\classes\java\jaxp\jaxp.jar;C:\iPlanet\ias6\ias\classes\java\jaxp\parser.jar;C:\iPlanet\ias6\ias\STARTUPCLASS\startup.jar;C:\iPlanet\ias6\ias\classes\java\jts.jar;C:\iPlanet\ias6\ias\classes\java\jms.jar;C:\iPlanet\ias6\ias\classes\java\jmq.jar;C:\iPlanet\ias6\pointbase\network\lib\pbnetwork35GA.jar;C:\iPlanet\ias6\pointbase\client\lib\pbclient35GA.jar;C:\iPlanet\ias6\ias\classes\java\log4j-1.2.7.jar;C:\iPlanet\ias6\ias\classes\java\commons-logging.jar;C:\iPlanet\ias6\ias\classes\java\framework-1.1.0.jar;C:\iPlanet\ias6\ias\classes\java\tomcat\jasper_properties.jar;C:\iPlanet\ias6\ias\classes\java\jts_properties.jar;C:\iPlanet\ias6\ias\classes\java\kadmin_properties.jar;C:\iPlanet\ias6\ias\classes\java\kfcjdk11_properties.jar

  • Problem about Classpath configuration!

    I have written some EJB code and need the j2ee.jar to compile it.
    But when I compile it ,An error happened:
    javax.ejb.* doesn't existBut I have set the Classpath like below:
    .;c:\j2sdk1.4.1_01\lib;c:\Sun\AppServer\lib\j2ee.jar;c:\Sun\AppServer\libThe question is when I copy the j2ee.jar file into c:\j2sdk1.4.1_01\lib which contain the java core class.
    It can't work neither.
    But finally when I decompress it into javax/ejb/*.*
    The compilation will succeed.
    Have you encountered such a problem.
    Thanks for help!!!

    You should not unpack the contents of the j2ee.jar.
    You shouldn't be putting it in the J2SDK/lib directory, either.
    Make sure that the javax.ejb.* package does indeed come in that JAR. Maybe it's in another one. Be sure that you've got it before you panic.
    I'd recommend setting the CLASSPATH without resorting to a system environment variable:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html

  • Help:about classpath setup of axis

    i set up the classpath of axis like this : set AXIS_HOME=c:\tomcat\webapps\axis
    set AXIS_LIB=%AXIS_HOME%\lib
    set AXISCLASSPATH=%AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery.jar;
    %AXIS_LIB%\commons-logging.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;
    %AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xerces.jar
    but the result treat "." as "/". e.g. axis.jar-->axis/jar.why?

    but the result treat "." as "/". e.g.
    axis.jar-->axis/jar.why?No it doesn't; you must be doing something else wrong and have erroneously attributed the problem to that.

  • Unsure about Classpath variable

    What should the classpath variable be set to? I am working through a tutorial from the command line for the first time and running into problems with classdefnotfound errors. It's saying to run it using java -classpath, but I thought that was just a shorter way to say what folder your workspace files are in. What should this be set to?

    The environment variable CLASSPATH should not be set to anything. It should not exist.
    If you do not include a -cp (or -classpath) command-line option, then the system looks for a CLASSPATH environment variable. If it finds it, it acts the same as if you had used that for the -classpath command-line option. If it does not, then it by default acts as if you included the "current directory" only as the -classpath.
    If you do include a -cp / -classpath command-line option, then the system ignores any CLASSPATH environment variable anyway.
    All "real" systems do not rely on a CLASSPATH environment variable. IDEs don't use it; J2EE containers (weblogic, jboss, etc) don't use it; applets don't use it; etc etc etc. It's basically only there for "toy" applications and beginners to try and make their life a little easier. However it just turns out to have confused them even more.

Maybe you are looking for

  • Data not loading /updating into cube 0lc_c03

    Dear Friends, I extracted data for three data sources i.e. 2lis_03_bx, 2lis_03_bf,2lis_03_um i got data in BW PSA with out any error but that data is not updating in cube 0lc_c03 i have done settings at r/3 at t.code mcnb,SBIW and I had make NDI flag

  • EDI Invoice with multiple banks

    Hi all,        I have outbound EDI invoice 810 where there are several banks listed in the Idoc file. The bank info is listed in segment E1EDK28 in Idoc basic type  INVOIC02. I have 6 of the E1EDK28 segments and the first segment is not the correct b

  • Number of posted documents

    Hi All, Simple question. Do you know about any standard report showing number of documents per document type? Thanks! Jan

  • Tcodes & Roles for SAP GRC AC 5.3 SPM in R/3

    Hello, After installing part of the SAP GRC AC 5.3 SPM in the Tcode SAINT (R/3). I want to know what Tcodes do I need to use the Tcode /VIRSA/VFAT. Or what type of roles do I need. Is there some. I have read the PDF "SAP Governance, Risk & Compliance

  • Cannot Add or Remove Applications using the latest Blackberry Desktop Application, 700_b060_multilanguage.

    1.    I was running Blackberry Desktop BBM 610_b038_multilanguage. 2.    I, yesterday, installed 700_b060_multilanguage. 3.    It offered me an update to my device software, 5.0.0.975 that I did not apply as I wanted to take a backup first. 4.