Java CLASSPATH

What is reason have below error ?
C:\Example\javaux\notes>java -version
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
C:\Example\javaux\notes>
C:\Example\javaux\notes>echo %CLASSPATH%
c:\j2sdk1.4.2_08\jre\lib\rt.jar;c:\program Files\notes\Notes.jar
C:\Example\javaux\notes>javac eric.java
C:\Example\javaux\notes>java eric
Exception in thread "main" java.lang.NoClassDefFoundError: eric
C:\Example\javaux\notes>
When remove CLASSPATH without error
C:\Example\javaux\notes>set CLASSPATH=
C:\Example\javaux\notes>java eric
eric
C:\Example\javaux\notes>

In Java 1.4, if the CLASSPATH is empty, Java assumes that the current directory (".") is in the classpath. So if you clear the CLASSPATH environment variable, it will look in the current directory for eric.class.
If you explicitly set the CLASSPATH variable to something that does not include the current directory ".", it will not look in the current directory and it won't find your class.

Similar Messages

  • Java classpath error while crawling sample user defined datasource (SampleA

    Hi All,
    I am trying to run the sample crawler agent provided by ultra search "SampleAgent.java". For this
    I have created and configured the user defined datasource type and the user defined data source (for the NEWS TABLE) as per the readme file of the Sample Crawler agent.
    I have also created a schedule for this user defined type.
    However, while executing the schedule I am getting the following error:
    WKG-30116: Can not find agent class "SampleAgent" from the java class path
    Please let me know the reason for the error. Am I right in creating and executing a schedule for user defined data source? (the doucmentation never says that, for user defined datasource, I need to create a schedule and execute it!!)
    Also, after going through some of the postings in this discussion forum I understood that I need to check my java classpath from the WK$CRAWLER_DEFAULT_CONFIG table.
    In this table my the value for
    CC_JAVA_EXEC_PATH is "C:\oracle\ora92\jdk\bin\java.exe -ms16m -mx256m"
    and
    CC_JAVA_CLASS_PATH is
    "-classpath
    C:\oracle\ora92\jdbc\lib\classes12.zip;
    C:\oracle\ora92\jdbc\lib\nls_charset12.zip;
    C:\oracle\ora92/ultrasearch/lib/ultrasearch.jar;
    C:\oracle\ora92/ultrasearch/lib/ultrasearch_db.jar;
    C:\oracle\ora92/lib/mail.jar;
    C:\oracle\ora92/lib/activation.jar;
    C:\oracle\ora92/ultrasearch/lib/jgl3.1.0.jar;
    C:\oracle\ora92/lib/xmlparserv2.jar;
    C:\oracle\ora92/lib/xschema.jar;
    C:\oracle\ora92/ultrasearch/bin;
    C:\oracle\ora92/ultrasearch/lib/agent/"
    Do I need to change any of these values? If so, what changes should I make and how should I make those changes?
    NOTE THAT I AM USING THE DATABASE VERSION OF ULTRASEARCH.
    Thanks in advance,
    Amit Sangle

    Hi All,
    I would appreciate any help that I get regarding this post.
    If anyone has run the Sample crawler Agent please let me know the steps needed to make it work. I have followed the steps mentioned in the readme file here:
    http://otn.oracle.com/docs/products/ultrasearch/doc_library/ultrasearch9_2/sample_agent_readme.htm
    Are there any other configurations that I need to do? Am I missing something? Please let me know.
    Thanks and Regards,
    Amit Sangle

  • How to add to java classpath?

    I am wondering how to add/implement to java classpath. I think I might be missed out the classpath thing so my program doesn't work. I keep getting error message like: "cannot resolve symbol: method setDocumentHandler(BookCounter)" and warning messages like: "C:\Example\BookCounter.java :11: warning:org.xml.sax.HandlerBase in org.xml.sax has been deprecated." and "C:\Example\BookCounter.java :16: warning:org.xml.sax.HandlerBase in org.xml.sax has been deprecated."
    If this is not because of classpath problem, kindly let me know what should I do?
    My code as follow:-
    ========================
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.HandlerBase;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class BookCounter extends HandlerBase
    private int count = 0;
    public static void main (String args[]) throws Exception
    (new BookCounter()).countBooks();
    public void countBooks() throws Exception
    SAXParserFactory f = SAXParserFactory.newInstance();
    SAXParser f2 = f.newSAXParser();
    // Parser p = new com.jclark.xml.sax.Driver();
    f2.setDocumentHandler(this);
    f2.parse("file:///C:/books.xml");
    public void startElement(String name) throws SAXException
    if (name.equals("book"))
    count++;
    public void endDocument() throws SAXException
    System.out.printIn("There are" + count + "books");

    The errors don't look like classpath problems. The first one is a result of it not being able to find a method in BookCounter (or more likely HandlerBase) that has the signature that you are attempting to use.
    The warnings come from the fact that HandlerBase has been deprecated, just like the messages state. In other words, it has been replaced by a newer version, or incorporated into another class' functionality. Check the API for more information.

  • Exit status running java classpath in a unix shell script

    I'm new to putting java into unix scripts. I have a java classpath running inside of a unix shell script. During my testing it will error with java.io.FileNotFoundException error, which I know why that is, but when I set in my unix shell script this to see the right exit status of success/fail, it always shows a 0 for success when that isn't really the case. Below is the two lines I have set to capture the exit status and just display that exit status for now.
    notifycode=$?
    echo $notifycode
    I have these 2 lines above on a line right below my java command in my unix shell script. How can I get my unix shell script to show the right exit status if the java classpath command fails? Thanks for any help.

    That's Java code, it says "End this Java application and send return code 1 back to the shell". As for how the shell gets the return code from the application, that's a question about your shell and not about Java programming, no?

  • Tomcat Installation and setting Java Classpath

    Please help me in setting up Java classpath for Tomcat Server. I am unable to start the Server itself.

    try this it worked for me..install Tomcat and Ant in 2 seperate directories, if you are win98 or less edit your autoexec.bat file and set the class paths as follows
    set PATH=C:\jdk1.3\bin;%PATH%
    set ANT_HOME=C:\Ant
    set TOMCAT_HOME=C:\Tomcat
    set JAVA_HOME=C:\jdk1.3
    If you are using windows 2000 or NT you have to goto control panel --> system --> advanced and click environment variables
    for name type in say TOMCAT_HOME and for value type in c:\Tomcat
    restart your computer.
    Then goto tomcat\bin and type startup....in a browser type in http://localhost:8080 and you are in
    hope this helps

  • Java Classpath options

    My question is about Java classpath options in a production environment.
    The company I work for wants to start developing Java applications. These applications will not be running via a web container but standalone on a unix machine. We are setting up the environment and are unsure about the industry best practices. Specifically where it deals with classpath. We have around 15 developers and are not sure how to set up the environment on the production machine so that:
    A) The migration process is not overly complex (developers do not migrate/set up the code in production, they develop it and stage it and then other employees move it into production).
    B) There is no danger of getting the wrong versions of libraries (for example I am writing code using some toolkit that is version 2 and a co-worker is using version 3 of the same toolkit).
    Here is what we have come up with.
    1. Require all developers to place their Java code in executable JARs with a MAIN-CLASS attribute and the CLASSPATH attribute set. Here there would be no classpath set on the production environment and each developer would be responsible for setting everything in the jar. One object to migrate.
    2. Require all developers to write a shell script to accompany their Java code that will set up the CLASSPATH. This adds programs and adds another object/step to the migration.
    3. Just throw all library JAR files in the main JRE class path on the production machine and classes in a /class folder pointed to by $CLASSPATH. This seems like a bad idea and could cause confusion.
    4. Require all developers to use custom class loaders in their programs - we do not really understand this method.
    Thanks ahead of time for any advice on this issue.

    jverd wrote:
    I actually would prefer #2 over #1. I don't like dinking around with the manifest file, and if I want to see what's going on, I find it easier to read a shell script than to pull apart a jar. Plus, even with a jar, you may end up writing a script to set up other environment variables or prepare directories, etc. anyway.I prefer that as well.
    The manifest doesn't bother me but with more complex systems, solutions often require something more than just java. Especially for stand alone apps (versus JEE apps.)
    Additionally it allows one to control the VM.

  • Help!! java,rmic,rmiregistry,java,classpath,etc.

    My problems lie I think mainly when I try to javac, rmic, start rmiregistry and java in DOS. My directory structure is d:\javas\java\jdk\bin\MyAss1(project name)\Classes\
                             - Client (package name) + .java file
                             - Interface (package name) + 2 .java files
                             - Server (package) + 3 .java files
    I have set the classpath and unset the classpath so many times I am cross-eyed. How do I set the classpath for compiling, then rmic�ing, then start rmiregistry and then again for starting servers? I have read countless documentation about this and am still confused. I think everything is going fine until I start the server � goes for a very long time and then eventually gives me � --- bound to registry�. When I start the client I get a very long error message, something about not being able to find the .stub. I am assuming it can�t find the .stub or am generating a wrong stub. Please tell me how to do this properly. I would be forever grateful as I am spending too much time on this and not enough on my other subjects. Thanks.
    Below is my code. I am using Jcreator for my editor and JDK1.4.0 Beta version.
    package Interface;
    public interface MyClass extends java.rmi.Remote {
    public void setMyClass(String val) throws java.rmi.RemoteException;
    public String getMyClass() throws java.rmi.RemoteException;
    }//MyClass
    package Interface;
    public interface MyClassFactory extends java.rmi.Remote {
         public MyClassFactory makeMyClass() throws java.rmi.RemoteException;
    }//MyClassFactory
    import Interface.*;
    import java.io.Serializable;
    // implementation for MyClassFactory
    public class MyClassFactoryServant extends UnicastRemoteObject implements MyClassFactory {
         public MyClassFactoryServant() throws RemoteException {
              //no code needed : will call parent constructor automatically
         }//default constructor
         public MyClassFactory makeMyClass(){
              try {
                   return( (MyClassFactory) new MyClassFactoryServant());
              }//try
              catch (Exception e) {
                   System.out.println(e);
                   return(null);
              }//catch
         }//makeMyClass
    }//MyClassFactoryServant
    package Client;
    import java.rmi.*;
    import Interface.*;
    public class MyClassRMIClient {
    private static String message = "";
    private static String name = "rmi://localhost/MyClassFactory";
    public static void main(String args[]) {
              String host="localhost";
              if (args.length >0) {
                   host=args[0];
    try {
         MyClassFactory sFact = (MyClassFactory) Naming.lookup(name /*"//"+host+"/MyClassFactory"*/);
                   MyClass st = (MyClass) sFact.makeMyClass();
                   st.setMyClass("Here I am");
    message = st.getMyClass();
    System.out.println(message);
    }//try
    catch (Exception e) {
                        System.out.println("GenericClient exception: " +
    e.getMessage());
    e.printStackTrace();
    }//catch Error
    }//main
    }//GenericClient
    package Server;
    import java.rmi.*;
    import Interface.*;
    public class MyClassRMIServer {
         public static void main(String args[]) {
              try {
                   MyClassFactoryServant obj = new MyClassFactoryServant();
                   // Bind this object instance to the name "MyClassFactory"
                   Naming.rebind("rmi://localhost:1099/MyClassFactoryServant", obj);
                   System.out.println("MyClassFactoryServant bound in registry");
              } catch (Exception e) {
                   System.out.println("MyClassFactoryServant err: " + e.getMessage());
                   e.printStackTrace();
              }//catch Errors
         }//main
    }//class GenericServer
    package Server;
    import java.rmi.*;
    import java.rmi.server.*;
    import Interface.*;
    public class MyClassServant extends UnicastRemoteObject implements MyClass {
         // what follows is the implementation of the
         String theString;
         public MyClassServant() throws RemoteException {
              //no code needed : will call parent constructor automatically
         }//default constructor
         public void setMyClass(String val) throws java.rmi.RemoteException {
              theString = val;
         }//setMyClass
         public String getMyClass() throws java.rmi.RemoteException {
              return(theString);
         }//getMyClass
    }//MyClassServant

    here are some batch files i wrote to achieve all the javac, rmic, etc. i'll start with a couple of folder lists so that you can see where the files end up after the batch files have been executed
    the project starts with the following structure
    \archives
    \classes
    \policies
    \projects\test\rik\server
    ----read.me
    ----cleanProject.bat
    ----compileClient.bat
    ----compileServerImplementation.bat
    ----compileServerInterface.bat
    ----deployPolicies.bat
    ----runClient.bat
    ----startRegistry.bat
    ----startServer.bat
    ----testLenClientOfRik.policy
    ----testRikServerImpl.policy
    \source\test\len
    ----ClientOfRik.java
    \source\rik
    ----Server.java
    \source\rik\server
    ----Impl.java
    and ends up with this one
    \archives
    ----classes.jar
    \classes\test\len
    ----ClientOfRik.class
    \classes\test\rik
    ----Server.class
    \classes\test\rik\server
    ----Impl.class
    ----Impl_Skel.class
    ----Impl_Stub.class
    \policies
    ----testLenClientOfRik.policy
    ----testRikServerImpl.policy
    \projects
    (this remains unchanged)
    \source
    (this remains unchanged)
    this is achieved by executing the following batch files in the following order
    rem cleanProject.bat start
    @echo off
    echo Cleaning project
    echo Deleting java archives
    del \archives\classes.jar
    echo Deleting class files
    del \classes\test\rik\Server.class
    del \classes\test\rik\server\Impl.class
    del \classes\test\rik\server\Impl_Skel.class
    del \classes\test\rik\server\Impl_Stub.class
    del \classes\test\len\ClientOfRik.class
    echo Deleting policy files
    del \policies\testRikServerImpl.policy
    del \policies\testLenClientOfRik.policy
    rem cleanProject.bat end
    rem compileServerInterface.bat start
    @echo off
    echo Compiling server interface
    javac -d \classes \source\test\rik\Server.java
    echo Maintaining class archive
    chdir \archives
    jar cvf classes.jar -C \classes \test\rik\Server.class
    rem compileServerInterface.bat end
    rem compileServerImplementation.bat start
    @echo off
    echo Compiling server implementation
    javac -classpath \archives\classes.jar -d \classes \source\test\rik\server\Impl.java
    echo Creating server stub and skeleton classes
    rmic -classpath \classes -d \classes test.rik.server.Impl
    cd \projects\test\rik\server
    rem compileServerImplementation.bat end
    rem compileClient.bat start
    @echo off
    echo Compiling client of rik of len
    javac -classpath \archives\classes.jar -d \classes \source\test\len\ClientOfRik.java
    rem compileClient.bat end
    rem deployPolices.bat start
    @echo off
    copy testLenClientOfRik.policy \policies
    copy testRikServerImpl.policy \policies
    rem deployPolices.bat end
    rem startRegistry.bat start
    @echo off
    echo Starting the rmi registry
    start rmiregistry
    rem startRegistry.bat end
    rem startServer.bat start
    @echo off
    echo Starting the test rik server
    start java -classpath \classes -Djava.rmi.server.codebase=file:/d:\classes/ -Djava.rmi.server.hostname=localhost -Djava.security.policy=\policies\testRikServerImpl.policy test.rik.server.Impl
    rem startServer.bat end
    rem runClient.bat start
    @echo off
    echo Running the client of rik of len
    java -classpath \classes -Djava.security.policy=\policies\testLenClientOfRik.policy test.len.ClientOfRik
    rem runClient.bat end
    beware 'cos the line breaks (may) have been added by the text window in which i'm typing and you'll have to remove them if you use 'em...
    i can send you a zip of the whole shebang, if you like; otherwise just modify the stuff above...
    good luck
    rik

  • Regular (non-boot) server classes found in Java -classpath

    I can't start the weblogic server from the start menu at all. Neither the console nor server menu works. I get this error:
    The WebLogic Server did not start up properly.
    Reason: Trying to start the server dynamically, specifying weblogic.class.path,
    but regular (non-boot) server classes found in Java -classpath.
    WebLogic Server terminated with an abnormal condition of 1
    Any tips!!
    Ahmad

    SO is there any fix for this? I get this after installing SP9. Things work fine
    without SP9
    "Ahmad" <[email protected]> wrote:
    >
    I can't start the weblogic server from the start menu at all. Neither
    the console nor server menu works. I get this error:
    The WebLogic Server did not start up properly.
    Reason: Trying to start the server dynamically, specifying weblogic.class.path,
    but regular (non-boot) server classes found in Java -classpath.
    WebLogic Server terminated with an abnormal condition of 1
    Any tips!!
    Ahmad

  • Java classpath parameter

    Hi,
    I have created the small program to test the log4j.
    I have follwing directory structutre:
    TestLog4j.jar
    |
    +---lib
            log4j-1.2.15.jarI have executed following command:
    D:\Java\Programs\TestLog4j\release>java -classpath "./lib/log4j-1.2.15.jar" -jar TestLog4j.jarBut I have still ClassNotFoundException exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
            at Main.Test1.<clinit>(Test1.java:6)
    Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
            ... 1 moreFor the God! What Am I doing wrong?
    Thanks a lot
    Regards,
    Petr

    Hi, thanks for comments,
    the problem lies as linker said in the refferencing the jar instead of main class. Additionally in the classpath must be listed also the jar itself, which tooks me another hour to find out:)
    There is working example for the directory structure shown above for anyone, who will have similar problem:
    java -classpath ".\TestLog4j.jar;.\lib\log4j-1.2.15.jar" Main.Test1where TestLog4j.jar is my test jar, which uses classes from log4j-1.2.15.jar and the TestLog4j.jar entry point (i.e. public static void main(String args[])) lies in the Main package in the class Test1.
    BR
    STeN

  • Good example of  Java Classpath

    I am very much confused in learning about classpath in Java.
    Could anyone of you explain it.
    or
    Refer me to some website where I can have a clear understanding of classpath as well as
    master it by practicing a good example.
    I searched for it for a long period of time. I just found some theory saying you can do this do that
    with classpath but not practical example.
    Help me out in this.
    Thanks in Advance.

    I don't know what you've read, and I don't know what you didn't understand about it, so I have no idea what to say or suggest to you, other than start here:
    [http://www.google.com/search?q=java+classpath+tutorial]
    It's really not a complicated concept, so "mastering" it doesn't mean much. You either understand it or you don't.

  • Same Java classpath for any schema?

    Hello,
    I want to call a static Java method from PL/SQL, and my question is do all schema's on the database share the same Java classpath? The static Java class will read a config file on the classpath, and I want to know if all schema's that call this method will read the same config file (I would prefer if not).
    Thanks,
    Chris

    Yes, I agree with whatever you say. But there are associated problems by we ourselves enquiring the parser to return the NodeList using XPath.
    For example, let the input XSD file contain an xsd:include statement, which includes another XSD file. Then when I say:
    document.getElementsByTagName("xsd:complexType");only the list of nodes available in that particular XSD file are obtained, but none from the included file appear. This is the disadvantage of using custom (XPath) queries.
    Rather if there is an implementation supporting Schema Object Model specification, it would be easy to overcome such difficulties. I'm able to successfully use MSXML's SDK for SOM and am able to obtain all the included xsd:complexType elements as well.
    Hope this is clear.
    Thanks,
    Kalyan

  • JAVA classpath: How to find classpath for a given java process

    I want to find the classpath for java process outside of the process.
    example:
    Lets say I execute the following command
    java -classpath foobar.jar;shoobar.jar javatest
    Is there a way to find the classpath from a different program given the process id that is created for the above command?
    Ami shukla

    Perhaps through an externally connected debugger? Beyond that, the only thing I can think of would be to modify the source to report that information for you.

  • DASE Linux - Java CLASSPATH

    Folks,
    I have set java path in /etc/profile.d as java.sh, following are it's content -
    #!/bin/bash
    JAVA_HOME=/usr/java/jdk1.2.2
    JMF_HOME=/usr/java/JMF1.1
    LD_LIBRARY_PATH=/usr/java/jdk1.2.2/jre/lib/i386
    PATH=$JAVA_HOME/bin:$JMF_HOME/bin:$LD_LIBRARY_PATH/bin:$PATH
    export PATH JAVA_HOME JAVA_JMF LD_LIBRARY_PATH
    #export CLASSPATH=.
    I have checked following things for java path - which javac, it's works and also in
    path where I am suppose to do ./configure, it's works.
    After doing make 2>&1 | tee log.mks I get following errors -
    Exception in thread "main" java.lang.NoClassDefFoundError: tools/simulation/DataGen
    make[1]: *** [test] Error 1
    make[1]: Leaving directory `/home/DASE/nist_ri/devkit'
    make: *** [make-install] Error 1
    I presume, that somehow there is an issue for setting the java CLASSPATH. My classpath
    has all jar files as asked in NIST DASE document - devkit.jar, stb.jar, dase.jar & libjreX.so.
    I would appreciate if I can get some clue to resolve above issues.
    Regards,
    Mukesh K Srivastava

    Hi
    Most Linux machine's use bash as their shell, so you can try editing your ".bashrc" file which lies in the root of your profile directory (normally it would be something like "/home/username"
    If you want to make the changes for all users that log onto the machine you've got a couple of options - you can edit the ".profile" file under "/etc" , or you can run a script at a certain run-level; I normally choose run-level 3. OK, this last bit might sound like Greek to you, but it's also easy - have a look under "/etc" you'll find a dir called "rc.d" under that you'll find various dirs called "rc1.d", "rc2.d" etc; every dir contains scripts that execute when a certain run-level is reached. You can then just add a script that loads your environmental variables.
    Below is an example of how you could set you're environment variables in your ".bashrc" file:
    JAVA_HOME=/usr/lib/jdk1.3.1
    export JAVA_HOME
    TOMCAT_HOME=/opt/jakarta
    export TOMCAT_HOME
    PATH=/usr/lib/jdk1.3.1/bin:$PATH
    export PATH
    CLASSPATH=$JAVA_HOME/lib/tools.jar:.:/usr/lib/j2sdkee1.2.1/lib/j2ee.jar
    export CLASSPATH
    As you can see I set a number of variables - but that's just because I do a bit of J2EE dev every now and again
    Hope this helps - and welcome to the world of Linux!!!!!

  • How to use the Worklist API from Java (classpath ??)

    Hi all,
    Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
    I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
    I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
    thanks.

    Hi all,
    Ok now.
    To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
    Only after adding the following JAR's to the build path, was I able to compile it:
    orabpel-common.jar
    orabpel.jar
    bpm-infra.jar
    bpm-services.jar
    So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
    Thank you very much for your help,
    assaf.

  • How Web AS Java Classpath be set ?

    Hi, we are currently work on deployment of BEA Weblogic JMS adapter driver into XI 7.0 (Netweaver application server)
    The OS is HP-UX.
    After the deployment, we created a JMS adapter, however the error occured on creating initial context, it complains:
    java.lang.NoClassDefFoundError.
    We double checked that the class (used to create initial context), the class is inside the jar file we deployed.
    It seems that the error is that the class loader can not find the jar file, I just wonder how to set CLASSPATH in application server to allow our class to loaded ?
    Thanks and will reward points for those who help us solve the problem, or direct us to right directions.
    Liang

    The problem is that we have to deploy 8.x client driver in Neweaver Application server to connect BEA 9.2 server.
    This is documented in OSS Note 1090516
    Liang

  • Linux-Java Classpath

    I'm not new to Java, just new to Java in Linux. I installed the 1.3.1 jdk, but any time I try to compile or run something, I always get the same error:
    Couldn't find or load essential class `java.lang.Object' java.lang.NoClassDefFoundError java/lang/Object
    I figure it's because I don't have my CLASSPATH set, but I don't know how to do that or what to set it to. Please help!
    MagiTom

    Hi
    Most Linux machine's use bash as their shell, so you can try editing your ".bashrc" file which lies in the root of your profile directory (normally it would be something like "/home/username"
    If you want to make the changes for all users that log onto the machine you've got a couple of options - you can edit the ".profile" file under "/etc" , or you can run a script at a certain run-level; I normally choose run-level 3. OK, this last bit might sound like Greek to you, but it's also easy - have a look under "/etc" you'll find a dir called "rc.d" under that you'll find various dirs called "rc1.d", "rc2.d" etc; every dir contains scripts that execute when a certain run-level is reached. You can then just add a script that loads your environmental variables.
    Below is an example of how you could set you're environment variables in your ".bashrc" file:
    JAVA_HOME=/usr/lib/jdk1.3.1
    export JAVA_HOME
    TOMCAT_HOME=/opt/jakarta
    export TOMCAT_HOME
    PATH=/usr/lib/jdk1.3.1/bin:$PATH
    export PATH
    CLASSPATH=$JAVA_HOME/lib/tools.jar:.:/usr/lib/j2sdkee1.2.1/lib/j2ee.jar
    export CLASSPATH
    As you can see I set a number of variables - but that's just because I do a bit of J2EE dev every now and again
    Hope this helps - and welcome to the world of Linux!!!!!

Maybe you are looking for