Setting Classpath and Path on Windows ME

Hi..How do I set up the classpath and path on windows ME. Do I use DOS or run the autoexec.bat from windows directly. I have jdk1.3.1 abd my classpath and path are:
set classpath="C:\jdk1.3.1\bin"
set PATH=C:\windows\xxxx\;C:\jdk1.3.1\bin
I sometimes can't compile my programs from other directories other than jdk1.3.1\bin. Why? Is there a way I can compile my program just from the C:\ directory like:
C:\javac myprogram.java
C:\java myprogram
Thanks.

If you put . in the beginning of your classpath, java always searches the folder you are currently in.
Now to set the classpath try clicking from the startmenu:
settings/control panel/system. Then click advanced tab and then the Enviroment variables. I'm on win2000 but I think it should be the same on ME.
Make sure it starts with .;C:\jdk1.3.1\bin;....
I think installing jdk puts in the essentials, but if you have certain folders you store your classes in you can stick those in there as well.
If you hava more questions about this, I suggest searching these forums on Keywords like : "set CLASSPATH PATH". Then you'll find a bunch of threads solving this problem.
Sjur

Similar Messages

  • Setting CLASSPATH and PATH properly how?

    I have set PATH=c:\jdk_install_directory\bin which works fine. However, for example when I create an app or small program for example, simply to print out a line on the screen, it works when I compile in NetBeans. However, if I copy the java file to another directory, my C: root for example, I can compile it, but when I run the class file it gives me errors saying it can't find certain classes. So, I figure its something with the classpath variable that I have to fix. How can I do this properly for both J2SE and J2EE using default install directories for each.
    Thanks so much!!

    Your PATH is exactly what it should be.
    The CLASSPATH answer depends on where you're compiling and running.
    If you're doing things on the command line, I think the right answer is to use the -classpath option on javac.exe and java.exe.
    If you're using NetBeans or another IDE, the right answer is to add JARs and paths according to the idiom demanded by the IDE. Each one is different, and all the ones I know of ignore the system CLASSPATH environment variable. I don't have one set on my machine.

  • Problem in setting CLASSPATH and PATH

    I am a newbie in java. I downloaded and run the "j2eesdk-1_4_01-windows.exe" from Internet. By default, it creates a new user variable, which is "PATH = C:\Sun\AppServer\bin". My problem is when I try to compile a java, I get an error message, which is
    'javac' is not recognized as an internal or external command,
    operable program or batch file.
    I create a new user variable which is "CLASSPATH = .;C:\Sun\AppServer\jdk\bin"
    and add new variable into my system variable, which is
    "PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Sun\AppServer\jdk\lib"
    However, it doesn't work and give the same error message. Any idea about the solution?
    Thanks in advanced.

    Your PATH variable needs to include the path to the J2SE SDK bin directory. It looks like you added it to your CLASSPATH instead

  • Problems in Classpath and Path 's variables setting in Windows XP

    Here is my drive structure in my PC:
    1. hard drive (primary slave, Partition: C and E where E boot Windows XP
    2. Hard drive 2 (Primary Master), Drive letter: D
    Although my default boot directory is E (for strange reason, i like to keep
    that way for now), I installed other programs in C and D drive dues drive
    space factors.
    So My java sdk1.4.2_02 has been installed in C:\Java_home directory, the
    following is my Classpath and Path values:
    (CLASSPATH Variables)
    Classpath=.;
    c:\java_home\j2sdk1.4.2_02;
    e:\Program Files\java\j2re1.4.2_02;c:\java_home; c:\java_home\j2sdk1.4.2_01
    \lib;e:\Program Files\java; e:\Program Files\java web start;c:\java_home\j2
    sdk1.4.2_02\jre\lib;c:\java_home\java\petstore1.3.2\src\lib\jst1;
    (PATH variables)
    c:\java_home\j2sdk1.4.2_01\bin;C:\java_home;e:\Pr
    ogram Files\java;c:\java_home\jdk1.4.2_2\bin;E:\Program Files\Oracle\jre\1.
    1.8\bin;E:\WINDOWS\system32;E:\WINDOWS;E:\WINDOWS\system32\WBEM;E:\
    Program Files\Support Tools\;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    Path=D:\oracle\ora92\bin;E:\Program Files\Oracle\jre\1.3.1\bin;
    My Fruit txt and Fruit.java file is located in my c:\java_home folder
    when I try to compile the my file as <c:\java_home\javadoc Fruit.java), it
    gives me the error message<'javac' is not recognized as an internal or
    external command,operable program or batch file.>
    however, I can compile the Fruit file from C:\java_home\jdk1.4.2_2
    \bin\javadoc Fruit.java; with out any problem of course I have to copy the
    Fruit.java file at the C:\java_home\jdk1.4.2_2\bin\javadoc Fruit.java
    folder.
    I am requesting u please help or advise me to correct my mistakes
    Ely
    [email protected]

    I must confess that I am totally unable to understand what your PATH is set to. The error that you see,
    <'javac' is not recognized as an internal or external command,operable program or batch file.>
    is due to a missing or incorrectly set PATH. It is used by Windows to find executable file (like javac.exe) that you have added to the computer. Item #5 on this page gives you instructions on how to set it: http://java.sun.com/j2se/1.4.2/install-windows.html
    As for the setting of the CLASSPATH, you seem to have a number of different versions of java (1.4.2_02, 1.4.2_01, 1.4.2_2, and 1.1.8) and I doubt that these are all valid. You are also using an unusual syntax C:\java_home\jdk1.4.2_2\bin\javadoc Fruit.java and I wonder if that is really C:\java_home\jdk1.4.2_2\bin\javadoc\Fruit.java? I think the best action is to point you to Sun's instructions and information about setting and using the CLASSPATH.
    The CLASSPATH is a set of pointers that is used by Java to find the files that YOU (not Java) create and want compiled and/or run.
    Setting the Classpath:
    http://java.sun.com/j2se/1.4.2/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.2/docs/tooldocs/findingclasses.html
    Examples:
    This is my path
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BATCH;C:\J2SDK1.4.2_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.2_01\lib\tools.jar;C:\NetRexx\NrxRedBk

  • How to set classpath and server configuration in eclipse

    i am new to eclipse tool pls anyone tell me to set classpath and serverconfiguration (tomcat) and sample program

    Get WTP [1], install it [2] and checkout one of the lot Eclipse WTP tutorials [3].
    [1] http://www.eclipse.org/webtools/
    [2] http://ftp.osuosl.org/pub/eclipse/technology/phoenix/demos/install-wtp/install-wtp.html
    [3] http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html

  • 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

  • Classpath and path of jdkjdk-1_5_0_09

    hi
    i have installed c:\progrmaefiles\java\ jdk-1_5_0_09 on my pc but i m not able set systemenvironment variable like PATH and CLASSPATH .i tried lot of option but it does not work so plz anyone help me out.i m using windows Xp operating system. when i m running any java programe i m getting error " Exception in thread "main" java.lang.NoClass.DefFoundError.plz hep me out.
    thx manu

    That's CLASSPATH, not PATH.
    Without seeing your exact directory structure and the exact command you're runing, nobody can give you specific advice. Here are some explanations of how it works, though.
    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • Setting classpath and creating packages

    Hi
    I am new to Java and my questions are basic.
    1)I am using the kawa IDE and i dont know how to create and use packages.
    2)Creating classpath to compile and run java programs from the Dos prompt.
    I would appreciate any help on these questions

    I'm not sure how to use KAWA.
    When it comes to classpaths, though, I would recommend not setting it as an environment variable - this tends to cause confusion if you work on more than one project at a time on your machine. Either set it locally or specify it directly on the command line.
    Often it's a good idea to write a batch file for compiling and executing your code:
    setlocal
    set PATH=c:\j2sdk-1.3
    set CLASSPATH=c:\jars\Servlet.jar
    javac MyClass.java
    endlocalHope this helps.

  • How to set the classpath and path from the jsp to call  java class function

    Hi Exprets,
    I have a requirement to call a java class function which returns a hashmap object from the jsp. The java class in present in one jar file and that jar file is location somewhere in unix path. So the requirement is to set the classpath for that jar file and then create the object of the java class and then call the function.
    If any one know how to achieve it, please reply as soon as possible.
    thanks in advance,
    swapna soni.

    It is never advisable to store large data sets in the session. But it will depend on a lot of factors:
    1. How costly is the query retrieving the data from the database?
    If it's a complex query with lots of joins and stuff, then it will be better to store it in the session as processing the query each time will take a lot of time and will decrease performance. On the other hand if the query is simple then it's advisable not to store it in the session, and fetch it each time.
    2. Are there chances for the data to become stale within a session?
    In this case storing the data is session will mean holding the stale data till the user session lasts which is not right.
    3. How many data sets does the session already holds?
    If there are large no. of data sets already present in the session, then it's strictly not advisable to store the data in the session.
    4. Does the server employ some kind of caching mechanism?
    Using session cache can definitely improve performance.
    You will have to figure out, what is the best way analyzing all the factors and which would be best in the situation. As per my knowledge, session is the only place where session specific data can be stored.
    Also, another thing, if the data set retrieved is some kind of data to be displayed in reports, then it would be better to use a pagination query, which will retrieve only the specific no. of rows at a time. A navigation provided in the UI will retrieve the next/previous data set to display.
    Thanks,
    Shakti

  • Post jDev 903 cleanup: Classpath and Path.

    Having installed the new [complete set] 9.0.3 and having decided NOT use 9.0.2 or other developer suite tools, it's time to clean up my path and classpath settings.
    Please help me sort it all out. Thanks.
    Per instructions I did not install the new 9.0.3 into any existing oracle_home. The home_dir for the 9.0.2 and complete suite is: E:\Programs\OraDevSuite.
    My Classpath has three entries: (formatted for easy reading on the forum.)
    CLASSPATH=
    E:\Programs\OraDevSuite\jlib\bigraphbean.jar;
    E:\Programs\OraDevSuite\jlib\LW_PfjBean.jar;
    E:\Programs\OraDevSuite\jlib\bigraphbean-nls.zip
    Questions: 1. Can (Should) I throw these out? 2. Do I need anything else in the classpath? (The java command line uses the -classpath parameter anyhow.)
    Here are the PATH settings (in the order maintained by the os). This really needs to be cleaned up. I have added my question on each line. Sounds like alot of questions but many are the same type.
    Path=
    E:\Programs\OraDevSuite\bin; (Old suite: Good-bye?)
    E:\Programs\OraDevSuite\jdk\jre\bin; (Old suite: Good-bye?)
    E:\Programs\OraDevSuite\jdk\jre\bin\classic; (Old suite: Good-bye?)
    E:\Programs\OraDevSuite\jdk\jre\bin\classic; (Old suite: Good-bye?)
    E:\Programs\OraDevSuite\jlib; (Old suite: Good-bye?)
    E:\Programs\OraDevSuite\bin; (Old suite: Good-bye?)
    E:\ORACLE\bin; ( How do I verify if this is needed by 9iDB or OEM?)
    C:\Program Files\Oracle\jre\1.3.1\bin; ( Since 9.0.3 comes with its own can I REMOVE this FROM THE DISK? )
    C:\Program Files\Oracle\jre\1.1.8\bin; ( Can I remove this from the disk? )
    C:\WINDOWS\system32;
    C:\WINDOWS;
    C:\My Programs\Java\sdk1_3\bin; ( Can I remove this from my disk? )
    **********THANK YOU!**************
    -Nat

    If you downloaded the full version of 9.0.3 Dev Preview (the 160MB sized-one), then it's completely self-contained. Just unzip it and go. Anything else can be removed.
    If you downloaded the "base" version, then you'll need to keep a JDK 1.3 around and edit your .\jdev\bin\jdev.conf file to SetJavaHome to point at your JDK home location.

  • Classpath and Path in Win2k Server

    Hi
    My OS is windows 2000 Server
    I installed Jdk 1.3.x Version.
    Do I need to set path and class path to my system to run sql package files...
    What shalll i include in my path and in class path.
    If any one having idea, please help me.
    Thanks in advance
    Yours
    Rajesh

    Dear dewangs,
    Thankyou VeryMuch
    Do I have to keep tools.jar file in my path or else in my class path ?
    Thanks in advance
    Yours
    Rajesh

  • How to set tomcat server path in windows XP

    hi frnds,
    I am new to java technologies.I am trying to learn all alone Hw am wandering how to set class path of tomcat server in windows xp.
    it shud be in user varibles r system varibles
    Thanks everyone in advance,
    cheers........
    roopa

    What exactly are you trying to accomplish here?

  • Question on classpath  and path

    path=.;D:\j2sdk1.4.2_04\bin;D:\j2sdk1.4.2_04\tomcat4.1\bin
    classpath=.;D:\j2sdk1.4.2_04\bin;D:\j2sdk1.4.2_04\tomcat4.1\common\lib\servlet.jar
    it work well in J2SE but doesn't work well in servlet
    what's wrong?

    I am sorry but **
    D:\javatest>javac -classpath D:\j2sdk1.4.2_04\Tomcat4.1\common\lib\servlet.jar h
    ello.java
    hello.java:6: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    hello.java:7: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    hello.java:14: cannot resolve symbol
    symbol  : class HttpServlet
    location: class com.seriousJavaProject.servlets.Hello
    public class Hello  extends HttpServlet {
                                ^
    hello.java:16: cannot resolve symbol
    symbol  : class HttpServletRequest
    location: class com.seriousJavaProject.servlets.Hello
    public void service(HttpServletRequest request,HttpServletResponse response) th
    rows IOException ,ServletException
                         ^
    hello.java:16: cannot resolve symbol
    symbol  : class HttpServletResponse
    location: class com.seriousJavaProject.servlets.Hello
    public void service(HttpServletRequest request,HttpServletResponse response) th
    rows IOException ,ServletException
                                                    ^
    hello.java:16: cannot resolve symbol
    symbol  : class ServletException
    location: class com.seriousJavaProject.servlets.Hello
    public void service(HttpServletRequest request,HttpServletResponse response) th
    rows IOException ,ServletException
                      ^
    6 errors

  • Mac OS X 10.6 Setting up and Printing to Windows Domain Printers

    Hi Guys,
    I have a Windows Domain currently running here at work. I am running a print server on one of our Windows 2003 Servers.
    I have successfully joined 4 Mac Pro machines to the domain. They are all logging on to the domain and can access shares etc.
    My problem is that I wish to add the networked printers that appear on the domain print server to the Mac Pros.
    When i go to System Preferences > Print and Fax then click the + button. I see a list of all the printers that are exclusively installed on the Windows Print Server.
    Some are listed in the Add Printer window as Bonjour and some Open Directory. The Bonjour items I can add fine, its the Open Directory ones that are causing me problems.
    How can I add these printers to each machine without manually installing the drivers for each printer on each Mac. Why am I seeing some Bonjour listed printers and some that are not?
    Any help would be very much appreciated

    Some are listed in the Add Printer window as Bonjour and some Open Directory. The Bonjour items I can add fine, its the Open Directory ones that are causing me problems.
    How can I add these printers to each machine without manually installing the drivers for each printer on each Mac.
    The answer depends on what printer description language (PDL) these Windows shared printers support. If they are Postscript then it is possible that a PPD for the printer may already exist on the Mac and so all you need to do is select it from the Print Using menu. And if the PPD is not present then you can still select Generic Postscript. But the thing to note is that since you are sharing the queue from Windows, rather than connecting directly to the printer (as you are doing with the Bonjour printer) then the Mac does not know what the printer is so you still need to manually select the correct printer on the Mac.
    If the printer is not Postscript and requires a proprietary printer language then would have to manually install this driver on every Mac. And even with this driver installed on the Mac there is no guarantee that it will work via the Windows share. Many vendor drivers are written for direct communication to the network printer. Sticking a Windows queue in between stops the Mac driver from communicating with the printer and this in turn stops the Mac from printing. So if you can tell us what printer models you have then we can provide better information.
    Why am I seeing some Bonjour listed printers and some that are not?
    Not all network printers support Bonjour. Often only newer models of business printers support this protocol, while it is more prevalent in consumer printers. And what you are seeing is a multicast coming directly from the printer. So if you don't want the users to bypass your Windows print server and connect directly to these printers, then you may not want them broadcasting their presence.
    But the benefit of the printer using Bonjour is that they are able to communicate with the Mac what they are and this helps with the Mac determining which printer driver to use,  so as you have noted the setup for the Bonjour printer on Mac is easy, because it helps the help with selecting the correct driver.
    Hope this helps with your questions. Please reply if you need more information

  • Set classpath in Window 95, 98, ME

    Hi,
    Would anybody please show me how to set the class path in windows 95, 98, ME.
    I used: set classpath=c:\ but it did not work
    Thanks

    hi,
    Instead of using 'classpath' try and use just 'path'.
    If JDK is installed in C: then the path would be
    "path=c:\jdk1.3\bin;%path%"
    Regards
    Deepa Datar

Maybe you are looking for

  • Iphone touchscreen issue

    I got an iphone 5s Gold from Flipkart(India) a month back and the touchscreen has been acting funny since last week. It keeps clicking on buttons by itself. I am not able to unlock sometimes and messaging is almost impossible. Plz advise.

  • TS3212 i downloaded it but it wont work

    i downloaded itunes 10.6 and it just wont work....

  • [Solvd]XFCE mixer panel plugin doesn't get updated when volume changed

    XFCE audio mixer panel plugin used to show the correct volume when I change the volume either with my Laptop touchbuttons or keyboard volume buttons. 1.  To make sure if I am actually changing the volume, I opened alsamixer and tested pressing keys t

  • White background​s OS5

    Hi again Since updating to OS5, when i click my BB icon to bring up my full icon menu the backgroud on the phone turns bright white which im not keen on and is straining my eyes, how do i go about changing this? i have my own theme added which used t

  • ECC6 EHP5 issue with authorisations now need access to S_DEVELOP

    Hi We have ECC6 and have just upgraded to EHP5 and have found that many HR reports/transactions now need access to S_DEVELOP authorisation object.  This  has caused issues with our user roles.  Has anyone else experienced this issue? Many thanks Juli