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

Similar Messages

  • 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

  • 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

  • User defined classpath setting using "-Djava.class.path="

    Hello,
    I am invoking a JVM from a C++ application ( say A ) which inturn will be started by another C++ application ( say B ).
    The class path for the JVM is set by "-Djava.class.path=" option in application 'A' which will actually supplied by parent application 'B'.
    I want to know how to do it ?
    I tried with the following things but it doesn't work.
    // the application 'A' gets classpath string from appication 'B' the "classpath" variable ( which is a string ) gets from application 'B'
    // this is in application 'A'
    // "classpath" variable in application 'A' holds the class path string optained from application 'B'
    "-Djava.class.path=" classpath ; ---(1)
    // "-Djava.class.path=" %classpath% ; ---(2)
    // "-Djava.class.path=classpath" ; ---(3)
    All the above tries are failed in first 2 tries the application even doesn't get compiled and in third try the appilcation doesn't set the classpath even though it is get compiled.
    Do any one have any Idea !!

    Hi,
    I am not quite sure if I got your problem correctly...
    Your application A has a variable called classpath containing the classpath recieved from B. right? Now you want to call the JVM with that.
    I think what you got to do is something like
    sprintf(myclasspath, "-Djava.class.path=%s", classpath);
    this will build the correct string for the JVM in myclasspath. And that one can be used to call the JVM.
    Does this sound right??

  • What is the diff b/w Conventional Path and Direct Path?

    What is the diff b/w Conventional Path and Direct Path?
    While doing exp/imp
    which one is best in peroformance Conventional Or Direct
    consider my Oracle is 9i (9.2.0) and Os is Solaris 9
    Could you please clarify.....
    Thanks

    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#1005685

  • 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.

  • 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

  • Configuring Doc Path (and Source Path) for default JDeveloper library

    hi
    Sometimes a default JDeveloper library as no Doc Path (or Source Path) configured.
    Adding a project library with only a Doc Path (or/and Source Path) configured (so no Class Path) can make the relevant API documentation more easily available in JDeveloper,
    see http://www.consideringred.com/files/oracle/img/2011/library-doc-path-20110529.png
    - (q1) Why has the "WebLogic 10.3 Remote-Client" library no Doc Path configured by default?
    - (q2) Are somehow/somewhere source files available (maybe only of "API related"/non-implementation classes) for the "WebLogic 10.3 Remote-Client" library, so these can be configured in a library Source Path, to make the API documentation even more easily accessible in JDeveloper?
    many thanks
    Jan Vervecken

    Thanks for your reply John.
    John Stegeman wrote:
    ... At least some of the classes' javadocs are [url http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e13941/toc.htm]here ...
    As I write in my initial post, I am able to add a project library with only a Doc Path configured (as shown in library-doc-path-20110529.png),
    to "Oracle Fusion Middleware Oracle WebLogic Server MBean Javadoc 11g Release 1 (10.3.5) Part Number E13945-05 "
    at http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e13945/
    So, questions (q1) about a default Doc Path configuration and question (q2) about source files (similar to ADF) remain.
    regards
    Jan

  • 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.

  • 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

  • I've just spent the last three hours importing photos from a portable hard drive.  Now I can't see any of the photos I imported instead there is a black/white photo of a palm tree, setting sun and water?  HELP!

    Help!

    Apply the two fixes below in order as needed: 
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with
    Option #3, followed by #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • Invalid Class Path

    hi, I am using jcreator for the first time and cannot seem to get it working. I am trying to run a program and it keeps giving me the error "Invalid command line. Error : Invalid path" Can anyone help me. Also, I think it has something to do with setting up a class path in options..any one have any advice???
    thanx

    You try to set the PATH environment variable to the
    directory that contain the <java_home>\bin or
    <java_home>\jre\bin!!!
    example:
    c:\> set PATH=%PATH%;C:\j2sdk1.4.0_01\binthat won't make any difference. JCreator has a JDK profile selector, which should pick up all the JDK on your machine (if > one). JRE is absolutely irrelevant in this case.
    Can you tell use exactly where and when it is giving you the path error?

  • 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.

Maybe you are looking for

  • About the seperator in database

    Hi friends, I have a question about Oracle DataBase Driver. Which method can I use to fetch the seperator between the schema and its objects.I know it is "." like scott.emp. It seems that the driver doesn't offer the medhod to get the schema seperato

  • Cannot install Exchange 2010 on Win Server 2k8R2

    I am working in a Hyper-V lab trying to install Exchange 2010 on a Windows Server 2008 R2 server. When the installer gets to the Readiness Checks it keeps failing on the Client Access Role prerequisites, and Mailbox Role prerequisites with the follow

  • Display Bug in CS4:  Gaping Rectangular Holes in the Image

    I first discovered this problem when I would open a psd file in Photoshop that I had worked on in Painter 11. There would frequently be, although not always, a large rectangular "bite": an area of the image that was empty, and through which you could

  • Creating Structure, Type, Domain in Data Dictonary.

    Can we create Type or Domain or Strucure or Table from within the ABAP program based on internal table? Thanks in Advance Deval Bhatt

  • Learn to drive cd/dvd rom

    Hello i am preparing for the arrival of my new macbook but have a question about a learn to drive software package. An example of what i am looking for is: http://www.amazon.co.uk/Official-Learning-Drive-Pack-PC/dp/0115526102/sr=11-1/qi d=1168002669/