Novice Trying to Set The CLASSPATH Variable

I am trying to compile a file (which can be downloaded at http://java.sun.com/docs/books/tutorial/getStarted/QandE/FirstClass.java). Despite being able to successfully compile several other files, this particular one will not compile. According to my JAVA Tutorial book, the problem may lie in the CLASSPATH variable, but I am having a great deal of trouble trying to set/understand it. My operating system is WINDOWS 2000. PLEASE HELP!!!

in win 2000, the classpath can be set by the following process.
Right Click My Computer icon and click on properties.
(This can be done by going to the Control Panel and Double Clicking the System icon too).
Once you have the properties window of the system click on the 'Advanced' tab.
There is a button called 'Environment variables'.Click on it.
You will have a part called 'System Variables' there.
Here there is an entry called Classpath. Just add the entry of what you want to add to the classpath, separating each entry with a ';' semicolon as mentioned there and click on the Set button.
That should set the classpath.If that does not take effect immediately, restart the system and it will take effect.
Tell me if it worx.
All the best. Bye!
Cheers,
Win!

Similar Messages

  • I tried to set the classpath, here is what I did, any help would be appreci

    javac -classpath/WINDOWS/Desktop/school/Java Projects/assignment2sem2/exercise9.10

    howdy.
    ok. this is a constant problem with newbies. i'm not picking on you but if you don't know how to figure out class paths then you have a fundamental lack of understanding of java. understanding class paths are at the core of the java language and using an IDE that supposedly controls this for you is not helping your situation. my suggestion to you is to use a text editor and the command prompt to create and run your java programs. you won't believe how much more you understand after fooling around with java this way for a few months.
    good luck.

  • Using a business rule to set the substitution variables

    Hi All,
    I am having issues with setting the value of Substitution variable from a Business rule.
    Any help would be appreciated.
    Thanks,
    Shakil

    Thanks for your response, John.
    I am trying to set the Substitution variable through a data form on which the Business rule is attached.
    The admin guide for Planning states that "You can set substitution variables on the Essbase server,
    application, or database level. The same substitution variable can exist on multiple levels;
    Planning uses the first one it finds as it searches in this order: 1) database 2) application 3)
    server." So I believe that it should be possible.
    Regards,
    Shakil

  • Setting the CLASSPATH from the JVM by a class

    Hy experts
    I have an application thats searching a jar file and have to access classes from this jar file.
    There are two ways to do this:
    1.
    Loading the jar file byte by byte and create the classes to load them into memory. This is the hard way.
    2.
    Setting the CLASSPATH variable in the running program! Thats the easy way! May how does it works?
    Is there any possiblity to set the classpath in a running application or only in the shell?
    Thanks for help
    konrad

    the classpath is readin when you run the JVM ie issue the 'java' command, the environment cant be altered to update a new classpath. However, why not just put the files you wish to load at runtime within the current classpath you've setup. If you use the System.loadLibrary(), you should be able to pick up the classes you wish to readin at run time via this approach.
    good luck
    rob

  • How to set the CLASSPATH in Unix Server

    Hi, everyone~
    Do anyone noe how to set the CLASSPATH in the hp-ux server? I tried the setenv CLASSPATH, but not working.. I think should use export. But my jsp pages still cannot working, dunnoe y?
    I wonder is the hp-ux support jsp and servlet or not?
    In order to let the jsp and servlet to run properly in the unix server, what kinds of steps should taken ?
    Hope somemore who experience with this situation b4 can give me some guidance.. Thanks~~
    regards,
    tzeyik

    Tomcat ignores any and all CLASSPATH environment variables. Even if you could figure out how to set it, Tomcat wouldn't use it.
    Better to learn how Tomcat's CLASSPATH works and how to deploy Web apps properly. - MOD

  • How to set the CLASSPATH for an  Sql Server 2005 database... help me please

    Hello! Guys I want to access a Sql Server 2005 database from Java.I've downloaded the JDBC 2.0 driver from Microsoft.I've copied the sqljdbc4.jar file to C:\Java\jdk1.6.0_14\db\lib.And I've added this to the classpath C:\Java\jdk1.6.0_14\db\lib\sqljdbc4.jar.The classpath variable is defined as a user variable.Well the point is that I get that nasty exception:Exception in thread "main" java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver.So if you know how to help me,please do so.Thank you :)

    Hi Timo,
    My jdev version is 10.1.3.3.0, this is for R12. By PR i mean to say process request and PFR process form request in the controller.
    In the Process request of the controller, i am finding the checkbox bean and assigning the firepartialaction for it.
    Later in the process form request for the fired event, i am trying to handle the rendered property of the messagetextinput. Is this a right approach?
    my code below
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean)oawebbean.findChildRecursive("X_FLAG");
    if(oamessagecheckboxbean != null)
    oapagecontext.writeDiagnostics(this, "Message check box Bean found:", 1);
    FirePartialAction firepartialaction = new FirePartialAction("change");
    oamessagecheckboxbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, firepartialaction);
    oamessagecheckboxbean.setFireActionForSubmit("change", null, null, true);
    oapagecontext.writeDiagnostics(this, "setting fire event", 1);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processFormRequest(oapagecontext, oawebbean);
    oapagecontext.writeDiagnostics(this, "Inside Process Form Request", 1);
    if("change".equals(oapagecontext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    OAMessageTextInputBean bean = (OAMessageTextInputBean)oawebbean.findChildRecursive("X_NUMBER");
    if(bean!=null){
    bean.setRendered(Boolean.TRUE);}
    Thanks,
    Malar

  • How can i set the classpath??

    CAN ANYONE PLEASE HELP ME HOW TO SET THE CLASSPATH IN WINDOWS ME ,WHAT IS THE RIGHT CODE TO SET THE CLASSPATH I AM USING JDK1.3 VERSION.
    THANK YOU VERY MUCH
    ERICK LUCCIO

    Try this way Start->Program->System tools-> System Summary>startup .Try to find the variable classpath,make sure the path is correct.The classpath contain the the *.java & *.class you save. I'm also new in java .This path & classpath question is so trouble to me .Now i'm running jdk1.3.1_2 in WINME ,WINNT AND WIN2000 IN no problem.........

  • Setting the classpath of classes12.zip for Tomcat

    Hi
    I am using Apache Tomcat webserver and while trying to run a jsp page which intializes oracle.jdbc.driver.OracleDriver it throws an error
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    Please suggest how to set the classpath of classes12.zip in Apache Tomcat
    My Code Snippett
    <%@ page import="java.util.*,java.sql.*,javax.servlet.*"%>
    <body>
         <%
         Connection con ;
         ResultSet rs ;
         Statement stmt ;
         ResultSetMetaData rsmd ;
         try{ 
         Class.forName("oracle.jdbc.driver.OracleDriver");
         catch(Exception e)
         out.println(e);//print the exception on the command prompt
    %>

    The simplest way to do this is to copy classes12.zip to the WEB-INF/lib directory. The JSP should then find this automatically.
    As a side note, that is an ancient JDBC driver - you might want to upgrade to something from this millennium.

  • Java newbie questions...Setting the classpath in Unix

    When you set the classpath, how do you include anything already in the classpath? For instance, if your profile sets your classpath to
    "/home/weblogic/:home/weblogic/weblogic.jar, and you want to add MyJar.jar to it, can you enter:
    export classpath=~:MyJar.jar
    My question really boils down to how do you prefix the existing CLASSPATH environment variable to any new classes or jars you want to add to it. I think it's the tilde, but I'm not sure.

    In csh, the CLASSPATH environment variable is modified with the setenv command. The format is:
    setenv CLASSPATH path1:path2
    In sh, the CLASSPATH environment variable can be modified with these commands:
    CLASSPATH = path1:path2:...
    export CLASSPATH
    ====
    (From the Sun documentation)
    or, in sh,
    export CLASSPATH=path1:path2
    should work

  • How to set the DISPLAY variable to run admsi.pl?

    Dear Experts,
    I'm trying to patch Oracle apps R12 using admsi.pl.
    hostname: black
    APPS db: VIS
    But I keep getting the error:
    Please set the DISPLAY variable and re-run this script
    This is what I did:
    VIS database and listener are already running.
    login to the linux server as unix user: applmgr
    cd /oapps/applmgr/VIS/apps/apps_st/appl/
    . APPSVIS_black.env
    cd /oapps/applmgr/VIS/apps/apps_st/appl/ad/12.0.0/bin/
    admsi.pl
    Invoking Oracle Patch Application Assistant....
    Please set the DISPLAY variable and re-run this script
    huh ?
    set | grep -i "display"
    DISPLAY=:0.0
    set | wc
    435 486 25235
    I notice that there are 36 .env files!
    For applmgr alone!!
    find /oapps/applmgr/ -type f -name "*.env" | wc
    36 36 2626
    For oracle, there are another 7 .env files!
    find /oapps/oracle/ -type f -name "*.env" | wc
    7 7 513
    Did I get the environment (env) file correct?
    Or do I need to run a few more env first?
    If so, which ones?
    What would the order of operations be?
    sqldeveloper has given me problems with Display sometimes.
    But even sqldeveloper works fine.
    What is the secret to get admsi.pl to run in the normal manner?
    Thank a lot!

    Thanks a lot, that worked! So the perl script was wrong.
    In the meantime, I had done this, and it seemed to work:
    admsi.pl -debug
    Gathering Information..
    Enter the patch_top : /oappsinstall/update12.1.1/7303030
    Enter the APPS user password:
    Logfile for this session is located at admsi.log
    Generating installation instructions for patch 7303030..
    Updating database....
    install_7303030.html generated successfully
    install_7303030.txt generated successfully
    cat /oapps/applmgr/VIS/apps/apps_st/appl/ad/12.0.0/bin/admsi.log
    Executing begin :value := ad_manual_step_object.is_step_already_done('per_hrglobal','120.2.12010000.1'); end;
    Generating installation instructions for patch 7303030..
    Updating database....
    install_7303030.html generated successfully
    install_7303030.txt generated successfully
    Performing final cleanup..
    Do you think this worked ok?
    Thanks again!

  • Setting Up CLASSPATH variable

    Dears,
    In PI 7.1 we are getting one error:
    We are getting an u201CSAPClassNotFoundException:u201D. The reason for this is as I got we need to set the classpath in the PI Server.
    Please do as below:
    The following is an example of the CLASSPATH statement that is used for a Unix/Linux application:
    CLASSPATH =.:/home/usr1/mssqlserverjdbc/Driver/sqljdbc_2.0/enu/sqljdbc.jar
    Please suggest how can I set this path on AIX ,Is it a env variable.If yes then as I am getting aftre setting ones and logging out this variable will get dissaper.
    So please suggest how can i set this path.
    SHivam

    Hi,
    Where you are facing problem?? r u facing problem when you using JDBC Communication Chanels??
    Regards,
    Raj

  • Setting the classpath

    doing a jsp page which calls for:
    <%@ page import="java.sql.*" %>
    <%@ page import="javax.sql.*" %>
    <%@ page import="sun.jdbc.rowset.*" %>
    <%@ page import="java.util.*;" %>
    at the top of the page , so i downloaded the jar files that i needed and set the classpath to:
    C:\jdk1.3.1_01\rowset.jar;C:\jdk1.3.1_01\jdbc2_0-stdext.jar;C:\jdk1.3.1_01\jndi
    this is the first time ive set the classpath
    but when i run the page i get loads of Error: Could not find package named:
    anyone no what im doing wrong?

    When you say you "set the classpath", does that mean that you changed the system CLASSPATH environment variable, or that you went into the configuration of whatever it is that's running your JSPs and put those jars and directories into the appropriate place?

  • How to set the classpath on OS X 10.6

    I am trying to build a web site (first time from mac) I have written a java swing applet in eclipse which works great when run from inside eclipse - however, when I run it from Safari or Firefox via .html doc the applet isn't displayed - I don't get an error message it just doesn't display. I have been able to run other applets this way but this one uses swing and I think it isn't able to find the classes.jar file. I believe if I can set the classpath to point to the classes.jar it should then work or perhaps I am way off base. Any other suggestions or how can I set classpath. I tried echo $CLASSPATH but it appears it isn't set with the exception of perhaps the default as no path is displayed. I really need to get this going as it is holding up the release of its counter part iPhone app.
    thanks,
    PMA

    It's possible, then, that the computers running Snow Leopard have a software problem. I would start by reinstalling Snow Leopard on them.
    Reinstall OS X without erasing the drive
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.

  • Setting my Classpath variable

    Hi
    Could someone please help me get the classpath variable working
    C:\Java\sampledir\Java Game Programming;.;C:\Program Files\s1studio_jdk\j2sdk1.4.1_02\lib\tools.jar
    This is what I have in the Classpath variable now in my Windows 2000 O/S
    Now from what I gather with having this set up in the classpath I should be able to compile anything in the Java Game Programming Folder and I can do it right from the C:\ prompt. Am I correct in thinking this?? or do I need to be in the directory with the file I want to compile??
    The error message I recieve after typing from the C:\ prompt javac GameOver.java
    produces this error message
    error: cannot read: GameOver.java
    1 error
    Now I do know everything within the file is correct because it compiles and runs successfully in Sun One Studio. :)
    Thank you
    Scott

    The classpath is a way for the compiler to resolve class names it encounters in the source files.
    But you still have to give it the exact path to your source file !
    you don't need to be in the directory of the file, you can just give its absolute path from whatever directory you happen to be.

  • T o set the classpath

    my forlder is :C:\Documents and Settings\india
    jdk is in:C:\Program Files\Java\jdk1.5.0_11\bin
    can any body can help me to create a classpath for my folder

    set classpath=C:\Program Files\Java\jdk1.5.0_11\binDon't do this.
    The term "classpath" is used in two senses: it can mean the folders where user classes are located, and it can refer to an environment variable of the same name used for the same purpose. Since you won't be putting classes in he bin folder, and you will be putting them elsewhere, the setting posted makes no sense.
    For a discussion of how classes are found and on setting the class path see the links at the top of this page: http://java.sun.com/javase/6/docs/technotes/tools/#general
    I agree with the comment at the start of the start of the section on setting the classpath (http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html), that it is better to specify the classpath by using the -classpath switch with the Java tools (java, javac, jar). In this case you don't use a classpath environment variable at all.
    A typical HelloWorld is compiled and run with:javac -classpath . HelloWorld.java
    java -classpath . HelloWorld

Maybe you are looking for

  • X3 02 reception problem

    hiya just bought this phone and im in a room where i usually get decent reception on an old sony ericsson but on this phone i cant get good reception anywhere in my house now i know im not in a low signal area and have even had the same problems down

  • Binary file support for web application in 10.3?

    There is such paragraph in Release notes for Flash Player 10.3: Binary file support Add more power to your web application with direct byte access to binary data. Control and access data in new ways, such as adding support for new file and data types

  • Server Monitor error - "CANNOT LOAD BUNDLE ERR"

    I got 2 Xserve(s) intel based - 1 installed 10.6.8 and the other 10.5.8 - both server(s) are upto date on software updates. Server Monitor works fine on both of these server(s) when run locally (from the server). When I run the Server Monitor from my

  • Create new sales doc. type

    Hi all, may I know, do a customization request is generated when a new sales document type is created in VOV8. If so, when it is generated.

  • Dynamic context: recursion node

    Hello, I want to create the following in my context by code: -ParentNode |--ChildRecursionNode |--nameAttr |--valueAttr this is what I tried: IWDNodeInfo nodeInfo= wdContext.getNodeInfo().addChild                    ( "ParentNode", null, true, true,