Setting Java CLASSPATH on WINDOWS

suppose i have the following values to set for CLASSPATH
C:\Program Files\Common Files\System\Mapi\1033\NT
and
abc-win32
is this correct
C:\Progra~1\Commo~1\System\Mapi\1033\NT;abc~
thanks.

I think that you should use long file namesi don't understand "long file names". just for my own knowledge, how can this
very thing be done?

Similar Messages

  • How to set the classpath in windows operating system

    hi,
    how to set the classpath in window operating system
    i want this help for setting the classpath for the tomcat
    please help me
    thank you
    darshan soni

    Open autoexec.bat in texteditor. This is an example from my autoexec, win me. Running resin
    SET CLASSPATH=c:\jdk1.3.1_01\bin\;c:\andreas\resin\bin\jsdk23.jar;c:\Jimi\JimiProClasses.zip;
    SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\jdk1.3.1_01\bin\;c:\andreas\resin\bin\jsdk23.jar;c:\Jimi\JimiProClasses.zip;C:\Program\MtsAndreas

  • 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

  • Help -setting long classpath in windows 2003

    i have around 50 jars .
    i have to set classpath for all these jars.
    when i try to set environmentvariables\classpath
    its not taking the classpath completly.
    and errors are thrown when program is compiled ..
    pls help
    arvin

    If you're using Java 6 a new classpath feature may help:
    "As a special convenience, a class path element containing a basename of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR (a java program cannot tell the difference between the two invocations).
    For example, if directory foo contains a.jar and b.JAR, then the class path element foo/* is expanded to a A.jar:b.JAR, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of * expands to a list of all the jar files in the current directory. The CLASSPATH environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started -- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking System.getenv("CLASSPATH"). "

  • Need Help Setting Java Classpath

    I have installed JCreator LE and the JDK 1.6.02 and the JRE 1.6.02 as well as the API's into my JDK doc directory.
    I can't figure out how to set the classpath to allow me to run java programs and I can't figure out how to get java.exe to run either.
    WinXP doesn't come with an autoexec.bat file so that route for setting my classpath is out... I can get to the DOS command prompt just fine but don't know what to type. When I try running any program like java.exe from the JDK a small DOS like box appears for a split second and then disappears.
    If someone could help me solve this/these problems I'd be very grateful. Thanks

    Thanks for your help. I set my CLASSPATH option
    within system/advanced/setvar to: "C:\Program
    Files\Java\jdk1.6.0_02\bin" Which is precisely where
    my jdk is located. Wrong. That directory needs to be in your PATH, not CLASSPATH. PATH tells the operating system where to find .exe files like javac.exe and java.exe.
    CLASSPATH tells the JVM where to look for your .class files
    I've tinkered around and around and I still can't get
    it to work... My confidence in my computer savyness
    is beginning to deteriorate... I've been reading two
    books on java and believe I'm understanding OO pretty
    well into the later chapters at present. I read
    through Suns online tutorial as well and just am not
    understanding what I'm doing wrong here. Thanks-Read the docs for both javac.exe and java.exe. Both take a -classpath option when you run in a command shell. That's the correct way to specify CLASSPATH.
    Do not use an environment variable. That is the wrong way to go about it.
    When you graduate to application servers it'll be a different matter, but by then perhaps you'll understand better.
    %

  • Any easy way to set *.jars classpath in windows

    Is any easy way to set the classpath for serveral jars in windows?
    for example, if I have 1000 jars in a folder "C:/MyJar", is this the only way to set the classpath with:
    CLASSPATH=C:/MyJar/Jar0001.jar; C:/MyJar/Jar0002.jar; C:/MyJar/Jar0003.jar; .........; C:/MyJar/Jar1000.jar
    ?

    Is any easy way to set the classpath for serveral jars
    in windows?
    for example, if I have 1000 jars in a folder
    "C:/MyJar", is this the only way to set the classpath
    with:
    CLASSPATH=C:/MyJar/Jar0001.jar; C:/MyJar/Jar0002.jar;
    C:/MyJar/Jar0003.jar; .........; C:/MyJar/Jar1000.jar
    ?You shouldn't have a system CLASSPATH environment variable.
    You don't add every JAR for every project to a system CLASSPATH. You should be doing it on a project-by-project basis, preferrably with a script or an Ant build.xml.
    Doing it with a system environment variable makes your apps less portable, because now you depend on the target machine being set up in a particular way. You should figure out how to package your apps appropriately so clients don't have to worry about that setup issue.

  • Setting java classpath [SOLVED]

    Hi everybody,
    I am sure this is not hard, but I have been looking for some time now and just couldn't figure out how to do it. Trying to run simple java applications (I am just learning...) I allways get this error
    Exception in thread "main" java.lang.NoClassDefFoundError: /opt/java/jre/bin/
    Caused by: java.lang.ClassNotFoundException: .opt.java.jre.bin.
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    So after doing some research I am pretty sure this is because my classpath is not set, but I can't figure out the correct directory. I assumed this would be
    /opt/java/bin
    So I added these lines to my .basrc
    export PATH=/opt/java/bin:$PATH
    export JAVA_HOME="/opt/java/"
    export CLASSPATH=.:/opt/java/
    I think java is installed just fine, cause I can run eclipse without problems..
    But it doesn't work... so please help me :)
    Last edited by daJense (2009-05-25 14:10:49)

    First, Thx for replying.. so here is what I get using echo
    [jens@jense-mobile Kap02]$ echo $PATH
    /opt/java/bin:/opt/java/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/share/eclipse:/opt/java/bin:/opt/java/jre/bin:/opt/kde/bin:/usr/share/netbeans/bin/:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/misc:/home/db2inst1/sqllib/db2tss/bin
    [jens@jense-mobile Kap02]$
    Now for studying I try to run simple java apps from commandline. Using the -cp option I got my programm to work (it's "HelloWorld"). So if I set up a directory
    ~/javaapps/
    How would I set this path so I don't have to use the -cp option every time I invoke an app

  • Set java classpath.

    hai,
    how to export- set classpath on linux platform.where is jdk located on fedora linux.

    hai,
    i got all u had told,but classpath is set compiles and run only one java class.
    for ex if a class A object is called by class B which has main method and both are put in same folder,their i am finding prob's.problem is class B(main class) doesn't find class A objects and gives errors.

  • Issue in setting java classpath using bash

    I tried creating a script file for executing my java code in my linux machine.Below is the script which i created.
    #!/bin/sh
    HOME=`pwd`
    JAVA_HOME=$HOME/jre
    CLASSES=$HOME/classes
    CLASS_PATH=$CLASSES/Testing.jar:$CLASSES/server/Server.jar
    "${JAVA_HOME}"/bin/java -cp "$CLASS_PATH" 'com.project.testing.Tester' '10000'It worked perfectly.But if i put this script in a directory containing spaces in its name, it is not working and it is throwing the below exception
    Exception in thread "main" java.lang.NoClassDefFoundError: com/project/testing/Tester
    So i modified the script to escape the spaces in the class path variable.Below is the modified script
    #!/bin/sh
    HOME=`pwd`
    JAVA_HOME=$HOME/jre
    CLASSES=$HOME/classes
    CLASS_PATH=$CLASSES/Testing.jar:$CLASSES/server/Server.jar
    CLASS_PATH=$(echo $CLASS_PATH | sed 's/ /\\ /g')
    "${JAVA_HOME}"/bin/java -cp "$CLASS_PATH" 'com.project.testing.Tester' '10000'But still i am getting the same exception.
    Please help me to solve this problem.

    julians wrote:
    >
    You think?? Why don't you just find out? The classpath is one of the system properties, so just write a Java program which simply writes all of the system properties to stdout. Then look at the system property which contains the classpath.
    Sorry you didn't understand my question.Your answer is irrelevant to my questionThen you should explain your question better, using something less totally useless than "not working".
    My question is I can read.
    It has nothing to do with bash.There is some issue with java in the way it treats the argument after -cp option.If i can find out why should i post it here?.No. Java isn't treating any arguments. Your shell (bash) is treating the arguments. If you think it's Java, then you should investigate that. Which is why I posted what I did. If you think it's irrelevant then it must not be Java causing the problem. Of course you didn't even try it. Time-waster.
    Please simulate this issue and respond to my postYou want me to buy a computer and install bash and try to reproduce your problem? Don't be ridiculous. Do your own work.

  • Setting classpath in Windows XP

    I have read numerous questions and replies pertaining to setting the classpath in Windows XP but have yet to find a clearcut answer. I have JDK 1.4 with the correct PATH set. Generally speaking, what do I type when setting up the CLASSPATH for windows XP? In addittion, what about jar files, libraries, and packages? Thanks

    CLASSPATH contents depend totally on what you establish as your Java environment.
    A classpath value tells Java to look "here" for the files that you create. (It knows where it's "own" files and jars are, we don't any longer have to tell it where to find them.)
    If no classpath variable is set. Java uses a default CLASSPATH of the current directory. Many people can run this way.
    If you set a classpath it cancels the default setting. Therefore, it's necessary to start it with a period, which represents the current directory. Use a semicolon to separate this and subsequent entries.
    Follow that with directory paths that point to directories that you want Java to search to find files and jars that you create or that applications need to use.
    If Java needs a file or jar and it can't find it in one of the classpath entries, it will complain with a "classpath not found" error.
    Here's my SET CLASSPATH statement:
    SET CLASSPATH=.;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.0_01lib\tools.jar;C:\mnrx;C:\NetRexx\NrxRedBk

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

  • Classpath in Windows ME

    I cannot seem to find where to set the classpath in Windows ME. Shouldn't the J2SDK installer set something up in the autoexec.bat if that is where you are supposed to do it. Is it necessary after my first installation of the JDK to manually set a classpath for the standard libraries? Thanks for any help on this.

    The java compiler knows were to find the standard core libraries you use the class path to define where you have stored your own extensions that you may want to include (import).

  • Setting Classpath on Windows 2000 box

    I have written a java application that is deployed to a Windows 2000 box. This application requires that a number of .jar files be included in the classpath, but it appears Windows 2000 imposes a maximum character length on the classpath variable because when I try to include all my .jar files in the classpath variable, the string is getting cut-off after a set number of characters. For example, I would like my classpath set to c:\classes\jar1.jar;c:\classes\jar2.jar;c:\classes\jar3.jar, but Windows 2000 only recognizes c:\classes\jar1.jar;c:\classes\jar2.jar;c:\cl. This causes my application to take java.lang.NoClassDefFoundExceptions since all the .jar files do not get included in the classpath.
    Does anybody know of a way around this issue? I would really like to avoid extracting the contents of my .jar files to a directory structure. Thanks for your help.

    I forget what the limits in Windows are, but they're a lot bigger than the size you need. I just set my classpath to that string in Windows 2000 with no problem. I believe Windows has a limit on the total size of the environment: maybe you have a whole lot of other environment variables set that you could dump. More likely, the problem has nothing to do with a Windows size limit, and you're getting cut off somewhere else.

  • Setting classpath in windows ME

    how to set it?
    I have placed a file "test.java" in the directory c:\test
    i set the classpath in Dos prompt by:
    set classpath=c:\test;
    however, the following message appear:
    C:\>javac test.java
    error: cannot read: test.java
    1 error
    can anyone help me? is it the way to set classpath in Windows ME is different from other versions of Windows? That's urgent, Thanks!!

    setta le impostazioni in questo modo:
    Avvio --> Programmi --> Accessori --> Utilit� di Sistema --> Microsoft System Infomation.
    Selezionare la voce "Utilit�" di configurazione di sistema dal menu "Strumenti". Selezionare quindi "Ambiente", variabile PATH e premere il pulsante "Modifica";
    Da questa sezione puoi fare il SET DEL PATH E CLASSPATH.
    RESTART PC, E PROVA SE TUTTO FUNZIONA.
    PS. se non riesci a capire l'italiano, posso seguirti in lingua inglese. , fammi sapere anche via mail.

  • Trouble Setting Classpath on Windows XP

    I'm having trouble setting up a classpath on Windows XP for SDK1.3.1_04.
    I've tried Control Panel\Advanced\Environment Variables\System Variables. There was a Path variable present, to which I've added:
    c:\jdk1.3.1_04\bin;
    There wasn't a Classpath variable present though. I've tried adding it myself in System Variables as follows:
    Variable name: Classpath
    Variable value: set classpath=.;
    But no joy. When I run "set" from the command prompt, there's no classpath present.
    I'd appreciate any help.
    Cheers.

    Hi,
    I am running on XP (unfortunately), but also win2000 and win98.
    Setting up the classpath is not a problem, although if you are logged in as root, then it does not always show correctly.
    Try logging back in as yourself and then checking the classpah through the set command.
    Altrnatively, if this is not the problem, actualy try a reboot. which should not be necessary.
    best
    kev

Maybe you are looking for

  • Need help in finding a font for a logo

    I was looking for help in finding a font for my logo. I'm not a designer at all, so I'm calling on all the fine designers and folks on the Adobe site to help me out. All replies are, of course, appreciated and any suggestions/comments/ideas will be w

  • Multiple tables feeding one table

    Hi All, What is the best method to feed data one central table with data from multiple other tables? Here is the scenerio/requirement: >BI Query 1 --> VC Table 1 --| >.........................................| >BI Query 2 --> VC Table 2 --| >........

  • Xslt ecc6  ISO-8859-1 problem when download xml file

    Hello, i create an ABAP test program: *& Report Z_ABAP_TO_XML                                             * *& Write the data from an internal ABAP table into an XML document, * *& and write it onto your frontend computer                         * RE

  • Does HP P6820 desktop support 8GB ram

    I have HP P6820 sesktop with 2x2 Gb of ram now my son asking for more ram just wondering will it support 2 x4 gb ram Taanks

  • BBP_UPLOAD_QM_SYSTEMS Importance of this report

    Hello All, BBP_UPLOAD_QM_SYSTEMS What is the importance of this report in EBP? and tables .It says that to replicate quality management syatem data from r/3.Can you elaborate more? Appreciate your answers. Regards Muthu