AUTOEXEC.BAT PERMANENT PATH

I downloaded J2SDK1.4.0 for windows 98 and it says to set the path permanently to AUTOEXEC.BAT file.I found the file ,opened it and this is what it reads : SETCLASSPATH=C:\ProgramFiles\PhotoDeluxe2.0\AdobeConnectables, in this path where do i insert \J2SDK1.4.0_<version number >\bin? <----is this typed right or do i leave out version number,do i need to add something else?please help if you can,im still new at this and i really want to learn all i can .Thank You

The CLASSPATH is where the Java executable looks for the classes it needs. It already knows how to find the built-in classes, so you don't need to mess with that for now. The PATH is where Windows looks for the Java executable, and that's what you need to set. Just add this line to the end of your AUTOEXEC.BAT file:
set PATH=C:\j2sdk1.4.0\bin;%PATH%...or wherever you installed it.

Similar Messages

  • Editing autoexec.bat when setting up j2sdk

    I have grown tired of entering the full location of the Java executables, so I attempted to edit my autoexec.bat as documented on the j2sdk instructions. When I entered my sysedit, the autoexec.bat file had a message stating that that particular file was "created as a placeholder and the actual autoexec.bat file was stored under a file named autoexec.tsh." Does anyone know how to edit the path for this kind of file? Where do I find this file?
    Thanks in advance for the help.
    Frank

    Now, can I do the same for the classpath, since it is not declared? If so, what should my statement look like for the >classpath?The following is from an old response of mine re classpath.
    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 and for the files that your files need during compiling and running. (Java 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. Do NOT quote directory paths that include spaces, the quotes cause a problem.
    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
    The subject has quite a bit more meat to it. If you're interested, here's reading:
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/classpath.html
    http://java.sun.com/j2se/1.4/docs/tooldocs/findingclasses.html

  • Autoexec.bat problem

    I added the following line to my Autoexec.bat file. It still would not let me compile, and now it won't let me edit autoexec.bat. I keep getting Bad Command or Filename. When I rebooted, I had to cd\Windows, then key in Win to boot up. I think I really messed up my Autoexec.bat file.
    set path=c:\jdk1.3.1\bin;

    you needed to type this as
    set path=%PATH%;c:\jdk1.3\bin
    so that you suffix the existing PATH, not replace its valuable set of individual path entries. This is stated in the install docs, please read them carefully

  • Autoexec.bat, Environment settings and XP

    I'm running XP Home, and sdk1.4.1_02. Initially I modified autoexec.bat to include SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\j2sdk1.4.1_02\bin, but to understand the symbol javac, I'd have to c:/autoexec.bat. I read a few ealier postings of people having the same problem, and went to the control panel -> system -> environmental settings and added new definitions for PATH, CLASSPATH, J2EE_HOME and JAVA_HOME, and still the only way I get javac to be recognized it to execute autoexec.bat each time from the DOS prompt. What am I doing wrong? Thanks.

    winxp ignores autoexec on bootup (if it exists) as it merely a legacy thing and is looked upon by the system as just another batch file... u need to put the paths for the java bin and j2ee bin directories (as you have in the autoexec inside the PATH variable in your environment variables dialog...

  • Autoexec.bat help

    I've recently purchased a book called "Object-Oriented Programming With JAVA Second Edition" by Barry J. Holmes and Daniel T. Joyce. I've downloaded and installed version 1.2.2 of java because that is what the book refers to. That's no problem. I've also installed the avi package that came on cd with the book, that went well except for one thing, it asked me to edit my autoexec.bat file to tell the PC how to interact the two programs. I have no idea how to do this, although I do know where my autoexec.bat file is. This is what I have now:
    SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1
    This is what it says I need to have:
    @C:\PROGRA~1\NORTON~1\NAVDX.EXE /Startup
    set CLASSPATH=.;c:\
    path=c:\jdk1.2.2\bin
    Here's the instructions given to me:
    Now that the SDK and the AVI package has been installed on your computer, you must set up your computer so that these programs can be located when needed. Use the NotePad utility to open the autoexec.bat file that is stored on your C drive. Amend the file to include the jdk1.1.2 directory in the path entry. Also include a CLASSPATH entry. The following listing of an autoexec.bat file illustrates how the path and CLASSPATH entries have been modified to include jdk1.2.2 and the avi package.
    @C:\PROGRA~1\NORTON~1\NAVDX.EXE /Startup
    set CLASSPATH=.;c:\
    path=c:\jdk1.2.2\bin
    The interpretation of the CLASSPATH entry follows. The pathways are separated by the semicolon, hence there are two pathways the computer should use when searching for the named packages. The first pathway is signified by the use of a period . which implies the current directory. The computer will search all subdirectories of the current subdirectory to find the subdirectory of the avi package.
    The second pathway is signified by c:\ which is the root directory of the C drive. The computer will search all the subdirectories of the root directory to find the subdirectory of the avi package. If you use software that also requires a CLASSPATH entry, append the entry to the one shown here. Separate the entries with a semicolon, and only set the CLASSPATH once.
    The path entry signifies where on the C drive the computer can find the Java development environment. Once again, if you use software that requires a path entry, append the entry to the one shown here, separating different pathnames by a semicolon.
    Save the modified autoexec.bat file, and finally restart your computer.
    Please help me.
    Also, I'm new to this site, if there was a better place to post this, please let me know. Thanks.

    thanks guys, it now works but I'm getting a strange error for the test code, here's the test code I was using:
    // program to write the text literal "HELLO WORLD" centrally on the screen
    import avi.*;
    class Example_1
         public static void main(string[] args)
         // create a window object screen
         Window screen = new Window("Example_1.java","bold","red",72);
         screen.showWindow();
         screen.write("\\n\\n\\n\tab\tab\tab HELLO WORLD!");
    The error it was giving me was:
    class string not found on line 7 and it had a pointer looking at the 'm' in the "public static void main(string[] args) line. I did this in the command console using 'javac Example_1.java' command. Am I missing something?, or should I just start using something else? I've done C++ but this has me boggled.

  • Autoexec.bat Not Being Executed

    I am able to invoke autoexec.bat from JAVA with
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec("c:\\autoexec.bat");
    where autoexec.bat is coded to compile a .java file, as in
    C:
    CD JDK1.4\BIN
    javac JavaClass.java
    This batch code runs fine if I manually run it from the command prompt. However, the trouble is that when I run it from Java, the command prompt shows up very briefly, then closes without executing the batch code. What is up?!

    So you don't have a JavaClass.class file when it's done? It seems to me that there are errors in the comiple, so no class file is generated. Have you tried to compile the file normally, and does it work? Also, make sure the CLASSPATH is correct for this batch file. For debugging, you should print the output like this:
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec("c:\\autoexec.bat");
    BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
    while((str = in.readLine()) != null)
        System.out.println(line);
    }

  • Running  .class file from autoexec.bat (in Windows Xp environment)

    How to run a .class file from autoexec.bat file. I have WinXP installed on my PC. I tried the solution given by Forum memebers but they didn't work.
    after setting the classpath
    i wrote
    java -cp simple in autoexec.bat , but results were not satisfactory.

    What does "not satisfactory" mean? If the commans works from any .bat file, it'll work from autoexec.bat, too.
    May I ask what you're trying to accomplish? I'm not sure whether XP dtill uses autoexec.bat for console initialization after all.

  • Set a permanent PATH

    Hi all,
    I am under Sun Solaris 11 (Express 6/05), and I want to set a permanent PATH, for all user of the computer (When I reboot the computer, I wan't to have these path already set).
    But I don't know what is the file where I can set that.
    I wan't to add these path:
    /opt/csw/bin -> to $PATH
    /opt/csw/man -> to $MANPATH
    Thanks.

    Hi Folk,
    I am a newbie in Sun Solaris 10 x86. Recently I installed gcc and tried to add the global path in /etc/profile. But it shows me the some sort of error message as below
    # . /etc/profile
    Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
    PATH=/usr/sbin:/usr/bin:/usr/sfw/bin: is not an identifierMay I know how do I solve this problem? Please advise....

  • AUTOEXEC.BAT

    This is not properly Java question is something about the PC System.
    I have an eviroment variable in AUTOEXEC.BAT named BLASTER
    are we talking about BLaster Worm?? dont think its a enviroment var.

    Much more likely to be information about a Sound Blaster sound card. (And probably way obsolete).

  • JDBC MySQL connector & autoexec.bat

    This what I entered into my autoexec file but when I run my java program it gives me a 'no suitable driver' error. I do not know what I should be entering for the
    'CLASSPATH' in the autoexec. Below is what I entered. The file jar file is located in my C:\unzipped\mysql-connector-java-3.1.7/ folder.
    C:\unzipped\mysql-connector-java-3.1.7\mysql-connector-java-3.1.7-bin.jar%CLASSPATH%
    Can somebody with knowledge in installing the JDBC driver for MySQL give me some help please.

    This works perfectly in the Eclipse IDE area that I have but when I run the same program on the Net Beans 3.6 IDE area it gives me a 'not suitable driver' error. To note these are both on the same computer. I would really like to get the Net Beans 3.6 IDE working because that is what I am most familiar with using. If you know of the problem why one IDE area recognizes the driver where the next does not I would sure like to know. Somebody passed the idea that when the 3.6 area is executed there are multiple instances running and it resets the ClassPath(I think they where shooting in the dark but it is a lead none the less). Anyway if anybody has had this problem please enlighten me, Thank-You.
    The ClassPath is set to the following:
    ClassPath = C:\Program Files\Java\jdk1.5.0_02\lib;C:\unzipped\mysql-connector- java-3.1.7\mysql-connector-java-3.1.7;C:\Program Files
    \Java\jdk1.5.0_02\jre\lib\ext;
    This is the code:
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class Connect2 {
         public static void main(String[] args) {
              try {
                   // The newInstance() call is a work around for some
                   // broken Java implementations
                   Class.forName("com.mysql.jdbc.Driver");
              } catch (Exception ex) {
                   System.out.println("HERE");
              try {
                   String url = "jdbc:mysql://localhost/test";
                   String username = "root";
                   String password = "password";
                   Connection conn = DriverManager.getConnection(
                             "jdbc:mysql://localhost/test", "root", "password");
                   Statement c = conn.createStatement();
                   c.execute("insert into green values('richmond')");
                   c.execute("select * from green");
                   ResultSet rs = c.getResultSet();
                   while (rs.next()) {
                        System.out.println(rs.getString(1));
                   // Do something with the Connection
              } catch (SQLException ex) {
                   // handle any errors
                   System.out.println("SQLException: " + ex.getMessage());
                   System.out.println("SQLState: " + ex.getSQLState());
                   System.out.println("VendorError: " + ex.getErrorCode());
    }

  • Cannot get permanent PATH variable in Vista working.

    Just like [this thread|http://forum.java.sun.com/thread.jspa?forumID=31&threadID=5219380], I made "C:\program files\java\jdk1.6.0_06\bin" as a new "variable value" in Vista but I get the error: "javac is not recognized as an internal or external command, operable program or batch file".
    Thanks in advance for your help!

    Fixed by another guy in a different forum!
    If you don't see the variable "Path" under User Variables, you add it and the variable value would be the path to the bin folder.
    System Variables should have the Path variable set so all you do is highlight it then click edit and scroll to the end of the value, add a semicolon ";" and input your bin path. Ok everything and the commands should work now.

  • Error with JAVA_HOME enviro variable

    I'm running win2k Pro. I installed first j2sdk1.4.1 and then tomcat 4.1.12 on my e:\. When I click START TOMCAT i recieve the error in a dialog box:
    Cannot find the file '-Djava.endorsed.dirs='(or one of its components). Make sure the path and filename are correct and that all required libraries are available
    Also in the command prompt it describes the error as:
    The JAVA_HOME environment variable is not defined
    This environment variable is need to run this program
    Using CATALINA_BASE: ..
    Using CATALINA_HOME: ..
    Using CATALINA_TMPDIR: ..\temp
    Using JAVA_HOME:
    I've set my environment variables as the following
    JAVA_HOME - e:\j2sdk1.4.1
    CATALINA_HOME - e:\Tomcat
    CLASSPATH - e:\Tomcat\common\lib\servlet.jar
    PATH - c:\WINNT;c:\WINNT\SYSTEM32\cmd;e:\j2sdk1.4.1

    I have exactly the same problem with the environment variables.
    I am running Win Me;
    I have all the environment variables set in AUTOEXEC.BAT, including the PATH ; but after many tests I am convinced that autoexec.bat is not being run at all;
    I tried adding an auto batch command file to be run every time a dos box was opened but while that runs ok it still leaves the problem outstanding;
    ie startup wont run through, claiming that the environment variables are not set:
    This is what I have set in autoexec.bat
    set PATH=C:\Java\j2sdk1.4.1_02\bin;C:\orawin95\bin;C:\WINDOWS;C:\WINDOWS\COMMAND
    SET JAVA_HOME="C:\Java"
    SET CATALINA_HOME="C:\Tomcat\jakarta-tomcat-4.1.24"
    ANy help/advice appreciated

  • Information Broadcast Email File - Where is the file in Unix directory?

    Hi,
    I am using Information Broadcasting to email the BI report.   We use Unix as the application server.
    In transaction SOSV, I can get detailed information on the file (attachment) and the send status.  There is a requirement to encrypt the file in Unix server.   Does anyone know where the file resides in Unix when the report is generated from Information Broadcasting?   What's the Unix directory?
    Any information would be appreciated.
    Thank you.
    Rebecca

    I added the path of the servlet.jar to the CLASSPATH. Now my modified
    file content is as follows:
    WINDOWS 2000 Environmental variable changes:(CLASSPATH)
    C:\Program Files\PhotoDeluxe BE 1.1\AdobeConnectables;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar
    AUTOEXEC.BAT:
    set path=%path%;c:\onnet32
    SET PATH=C:\jdk1.3.1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
    SET JAVA_HOME=C:\jdk1.3.1
    SET CATALINA_HOME=C:\jakarta-tomcat-4.1.12
    SET CLASSPATH=.;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar
    With this I am executing the command: javac test.java. However, it is still giving lot of error messages
    All the messages are 'cannot resolve symbol' associated with the Servlet class, Servlet Request, Server Exception etc. In the very first error message it states that: 'package javax.servlet does not exist'.
    I would appreciate any help. Thanks in advance.

  • Help for getting connection with oracle database

    Hello,
    i have a problem to connect my java program with oracle databse.
    i have oracle 8 release. i tried all my best to connect but i
    can't. please help me. whenever i compile JdbcCheckup.java file
    which is distributed with oracle 8 release, it compile successfully.
    but whenever i run JdbcCheckup class file then it will generate an
    exception and that is -
    Exception in thread "main" java.lang.ClassNotFoundException:
    oracle.jdbc.driver.OracleDriver
         at java.lang.class.forname0(native method)
         at java.lang.class.forname(unknown source)
    and some other error message.
    But, by following yours given instruction, first, i unzip CLASSES111.zip
    in file which is distributed with oracle 8 realease in jdbc subdirectory
    into c:\temp directory and then run oracle installer(setup.exe) and point
    the installer to c:\temp and then i install the oracle JDBC drivers(beta)
    7.3.3.1.3 from the jdbc subfolder into oracle installer by selecting
    win95.prd for jdbc subfolder.
    After that i write into my autoexec.bat file,
    path d:\jdk\lib;d:\jdk\bin;c:\windows\command;C:\temp\BIN;c:\temp\jdbc\lib\classes111.zip
    and then i restart the machine and the i complile and run JdbcCheckup file
    But, i can't recognize my error to define class path or installing the
    driver. please help me in details so that i overcome this problem.
    because i am student of B.sc. in CIS of final year. i need to submit
    my project within some days. please reply me as early as possible.
    thanks
    hemonto
    email - [email protected]

    path d:\jdk\lib;d:\jdk\bin;c:\windows\command;C:\temp\BIN;c:\temp\jdbc\lib\classes111.zipYou've added classes111.zip to your PATH, not your CLASSPATH.
    Add it to your CLASSPATH using:
    set CLASSPATH=%CLASSPATH%;c:\temp\jdbc\lib\classes111.zip
    then try to compile/run again.

  • Where is the hiccup in comiling this test servelet

    Hi,
    I am working on "WINDOWS 2000 WORKSTATION". I have installed TOMCAT in the following directory: c:\jakarta-tomcat-4.1.12
    I have the JAVA J2SE installed in the following directory:c:\jdk1.3.1
    Now the following are the configurations of class and classpath in the environment variable section of the Windows 2000 workstation:
    PATH
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;c:\jdk1.3.1\bin\;JAVA_HOME=c:\jdk1.3.1\;CATALINA_HOME=c:\jakarta-tomcat-4.1.12
    CLASS PATH
    C:\Program Files\PhotoDeluxe BE 1.1\AdobeConnectables;.;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
    The autoexec.bat stands as:
    set path=%path%;c:\onnet32
    SET PATH=C:\jdk1.3.1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
    SET JAVA_HOME=C:\jdk1.3.1
    SET CATALINA_HOME=C:\jakarta-tomcat-4.1.12
    SET CLASSPATH=.;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
    I have the servlet.jar file in the following directory:
    C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar
    I have servlet file test.java in d:\temp directory.
    Now, in the dos prompt I am going to d:\temp directory. From there I am issuing the following command in order to compile the servelet:
    javac -classpath .;C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar test.java
    However, at this point I am getting 'invalid argument' error message.
    I am not sure where I am going wrong. I am very new to servlet technology. Any help is highly appreciated in advance.
    Thanks,
    Regards

    I added the path of the servlet.jar to the CLASSPATH. Now my modified
    file content is as follows:
    WINDOWS 2000 Environmental variable changes:(CLASSPATH)
    C:\Program Files\PhotoDeluxe BE 1.1\AdobeConnectables;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar
    AUTOEXEC.BAT:
    set path=%path%;c:\onnet32
    SET PATH=C:\jdk1.3.1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
    SET JAVA_HOME=C:\jdk1.3.1
    SET CATALINA_HOME=C:\jakarta-tomcat-4.1.12
    SET CLASSPATH=.;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;C:\jakarta-tomcat-4.1.12\common\lib\servlet.jar
    With this I am executing the command: javac test.java. However, it is still giving lot of error messages
    All the messages are 'cannot resolve symbol' associated with the Servlet class, Servlet Request, Server Exception etc. In the very first error message it states that: 'package javax.servlet does not exist'.
    I would appreciate any help. Thanks in advance.

Maybe you are looking for