Set Path Prob...

I am trying to compile in MS-DOS...no joke, I have installed the JDK1.3.1 into the proper directory and have set the path in autoexec.bat. When I try to run a .class file I get an 'Exception in Thread "main" java.lang.NoClassDefFound Error'. What's up ???

Hello,
I too encountered this when installing Java; I corrected this as follows (on my Windows platform):
1. Open the Autoexec.bat file by clicking 'Start', then on 'Run', this will open a new window - type in 'sysedit' and click on the 'OK' button. This opens the 'System Configuration Editor'. Click in the C:\AUTOEXEC.BAT window to bring it to the front so you are able to edit it.
2. Now you have the Autoexec.bat file in front of you, you can now edit it. You need to remove the CLASSPATH variable. Do this by placing 'REM' in front of 'CLASSPATH'. So now it should look as follows:
REM set CLASSPATH=c:\javastuff
given that it was 'set CLASSPATH=c:\javastuff' for example.
Now you must restart your computer for these new setting to take effect.
Now when you run a Java program it should work. If you do need a classpath variable, the preferred way is to add it when compiling using the -classpath option. This is considered better practice because you can set it for each application without affecting any other applications, also, other application will not change its value.
I hope this helps.

Similar Messages

  • How to set path to run a Java program?

    my pc os is win2000 service pack 3.
    cpu is celoron 667mhz
    256 pc133 sdram
    i have done the setting b4 run a java program but no any effect.
    setting as below:
    set path=c:\j2sdk1.4.1_01\bin
    set classpath=c:\j2sdk1.4.1_01\lib
    my java file is store in C:\Java, file name is HelloWorld.java, so when i type:
    C:\>
    C:\>Java\javac HelloWorld.java
    (the screen show me : java\javac not internal or external........")
    and i try again as follow:
    C:>
    C:>\Java>javac HelloWorld.java
    (the screen show : Exception in thread "main" java.lang.NoClassDefFoundError:HelloWorld/java)
    i cant do anymore, who can help me?

    you need to put the CLASSPATH to dir: c:\j2sdk1.4.1_01
    and also to the directory you are working
    For example, you are working in "C:\Myclasses". You need to put:
    set CLASSPATH = C:\j2sk1.4.1_01;C:\Myclasses;
    if you don't put your working directory, java doesn't find your classes
    Try it and luck!

  • Setting Path variable in Win XP Pro

    Hello,
    I have installed Java SDK 1.3.0_02 on Windows XP professional.
    I have set my path to:
    %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\system32\WBEM;
    %SystemRoot%; %SystemRoot%\system32\WBEM; C:\Program Files\Common
    Files\Adaptec Shared\System; %Java_Home%\bin; %Java_Home%; %Tomcat_Home%;
    where %JAVA_HOME% refers to C:\jdk1.3.0_02.
    I get the following error upon trying to use 'javac' in the DOS command
    prompt:
    'javac' is not recognized as an internal or external command, operable
    program or batch file
    According to the instructions at
    <http://java.sun.com/j2se/1.3/install-windows.html#Environment> I have done
    all I can. Also, according to this article I should not have to set a
    classpath variable. Should I set a classpath variable?
    Here are some conditions I cannot figure out:
    1) When I use the 'java' command with any switches (such as -version) I get
    a proper response.
    2) When I type on the command line "set path=C:\jdk1.3.0_02" and then try
    "javac" command it works. This happens only while the command window is
    opened. If it is closed and reopened I will have to do it again. This should
    not be required.
    3) When I navigate to the "C:\jdk1.3.0_02\bin" directory and try using the
    "javac" command it works fine.
    4) Everytime I use the 'autoexec' command in the C: root directory I get an
    old version of the path variable without my recent path settings.
    What do I need to do to simply open a command prompt and compile Java code?
    It seems to work fine on other installations. I want to be able to use
    'javac' from any directory without referencing in the command line the
    directory of 'javac'.
    My main question is how do I set the path variable so it permanently stays in
    Windows XP Pro? What is the simplist way to do this?
    Should it be set in the environmental variables section under 'My Computer'? Should it be set in DOS? Should it be set in 'autoexec.syd' in the C: root directory (there is not autoexec.bat)? Someone mentioned to set the
    Sincerley,
    Chris

    From the command prompt echo your classpath (echo %classpath%) and see what displays. If it's not the one from your environment variables, then something else is getting it's dirty hands in the way.
    You may want to take a look through your autoexec.bat and remove any lines that set the path variable. Leave it to your windows environment settings to do it for you.

  • How to set path in linux?

    Hi,
    I tried to compile a form in linux.
    I use the following command:
    export LD_LIBRARY_PATH=/u0/oracle/prodora/8.0.6/lib
    f60gen module=/u0/oracle/prodappl/ar/11.5.0/forms/US/TESTFORM.fmb USERID=apps/****
    An fmx is generated. But during compile it also give the following message:
    FRM-18108: Failed to load the following objects.
    Source Module:TEMPLATE.fmb
    Source Object: FRAME_HORZ_LINE
    Source Module:TEMPLATE.fmb
    Source Object: FRAME_RECT
    Source Module:APPSTAND
    Source Object: STANDARD_PC_AND_VA
    Source Module:APPSTAND
    Source Object: STANDARD_TOOLBAR
    Source Module:APPSTAND
    Source Object: STANDARD_CALENDAR
    I suppose it because it cannot found template.fmb and appstand.fmb.
    How do I include the path to this files? For example the path is this: /u0/oracle/prodappl/ar/11.5.0/forms/US
    Can I add it using the "export LD_LIBRARY_PATH" command?
    What is the syntax for multiple path for the "export LD_LIBRARY_PATH"?
    I cannot execute it one after the other as it seems the later overwrite the former.
    Thank you
    Jim

    I do:
    export FORMS_PATH=/u01/app/oracle/product/apps/your_source Will it overwrite any path in the FORMS_PATH, or will it add into it? Or is it not permanent?
    this is not permanent solution,your just setting path.
    Refer metalink note
    What is Difference between the Forms_path and the working directory? [ID 551511.1
    Edited by: Amigo on Dec 22, 2010 1:20 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to set Path on windows 98

    Hello!
    sorry for my bit knowledge on Java first.
    I am having a hard time to set a path in my windows 98.
    First, I did instal Java 2SDK version 1.4.0
    Then, I download j2EE RI server and documentation from sun's J2EE download site
    Then, I run the installer for both the J2EE and documentation
    then I did put these �set� command in a bat file.
    set JAVA_HOME = C:\j2sdk1.4.0
    set J2EE_HOME=C:\j2sdkee1.3.1
    set ANT_HOME=C:\ant\apache-ant-1.5.3.1
    set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%J2EE_HOME%\bin
    My last step was to check all logging output to the current shell. So I went to the command line and type j2ee -verbose. However I got the following error message.
    Microsoft(R) Windows 98
    (C)Copyright Microsoft Corp 1981-1999.
    C:\WINDOWS\Desktop>j2ee -verbose
    Bad command or file name
    can you please help me how to correct this. I don't know DOS much so I may type something wrong.
    any help is appreciated.
    Kimbra

    Yes, I ran into the same problem on my Win 98 laptop. I used the exact same set command, but the problem was, it seems than Windows 98 forgets the set command after a shutdown/reboot.
    Go into your autoexec.bat file (should be in your C:\ drive, as in C:\autoexec.bat, or I think you can type sysedit into the Run prompt (Start > Run) ) and then type in:
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\j2sdk1.4.0\bin;
    That worked for my laptop; I was able to run the javac and java programs in any directory, without referencing the full directory path each time.
    Sorry, but I can't help you on the apache problem, although I suspect all you need you do is add that directory path onto the above line.

  • Unable to set path in win 98

    hi!
    i know it wud sound stupid but i am unable to set path variable in win 98. i added the line PATH=c:\j2sdk1.4.1_01\bin in autoexec.bat,
    then executed the statement c:\autoexec.bat and then checked the value of path variable. it works fine but when i try to run any java file like
    c:\javac Test.java the following error appears:
    error: cannot read: *.java
    1 error
    wat shud i do??????

    you should change into directory where you have these .java files, and then try again...

  • Does anyone know if my iphone 5s contents are backed up automatically within icloud.  Because i need to take back to factory setting and prob will lose everything on my phone

    Does anyone know if my iphone 5s contents are backed up automatically within icloud.  Because i need to take back to factory setting and prob will lose everything on my phone

    If iCloud Backup is turned on in Settings->iCloud->Backup
    The iPhone will backup automatically, when its plugged in, locked, and connected to Wifi.
    So if you let it charge while connected to wifi recently for a few hours and did not use it, it probably backed up.
    If you can still access the iPhone, you can check the date of the last iCloud backup in Settings->iCloud->Backup

  • Linux - j2sdk1.4.2_06 can't set path/classpath

    I am struggling to get my java set up to write, compile and run some java programs, and honestly being a linux newbie the docs for such are somewhat confusing..
    I am trying to break this down as simple as possible.
    -I am logged into Linux as root.
    -then download the j2sdk1.4.2_06 in the /USR/ dir
    -I did chmod +x j2sdk1.4.2_06...
    -then./j2sdk1.4.2_06...
    it installed successfully.
    but setting up the path classpath is different.
    I would like two things:
    for my mozilla browser to now be java enabled, AND
    I would like to create a directory called javasrc to hold all my java source code
    but I do not want to develop in root, I want any user to be able to use the javasrc directory and be able to compile and run the programs..
    what exactly do I edit. someone said I need to edit a file in /ETC/PROFILE
    I want to try this..but I dont think it is correct
    export JAVA_HOME=/usr/j2sdk1.4.2_06
    PATH=$HOME:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/X11:/sbin:/home/mqm/bin:$JAVA_HOME/bin
    export PATHthanks

    I'd advice you to not touch CLASSPATH until you've studied how packages and classloading work. Until then it will just get on your way.
    What comes to setting PATH, the file to modify in /etc depends on your distribution -- a least in some versions of SuSE /etc/profile is generated by a script and you are supposed to modify /etc/profile.local instead. You could also edit a file called ".bashrc" in your home directory. The manual page of bash explains the differences between using these files. If you modify /etc/profile you need to either start a new login shell or source the file for the change to have effect. The lines to write are:export JAVA_HOME=/usr/j2sdk1.4.2_06
    export PATH=$PATH:$JAVA_HOME/bin

  • Need help with setting PATH in Windows 98

    Hi
    Can anyone please help me!!!
    I am new to java and I am confuse how to set the path in my pc. I have a windows 98, I downloaded the Java 2 SDK Standard Edition v 1.4.1 from the CD that came with the fifth edition "Java How to Program" book. I followed the instruction in how to set PATH permanently but it is not working. When I open my AUTOEXEC.BAT this is what I have:
    @ECHO OFF
    rem
    rem *** DO NOT EDIT THIS FILE! ***
    rem
    rem This file was created by the System Configuration Utility as
    rem a placeholder for your AUTOEXEC.BAT file. Your actual
    rem AUTOEXEC.BAT file has been saved under the name AUTOEXEC.TSH.
    rem
    SET PATH=%PATH%;C:\PROGRA~1\BORLAND\CBUILD~1\BIN;C:\PROGRA~1\BORLAND\CBUILD~1\PROJECTS\BPL
    @REM Added by MATLAB installer
    SET PATH="%PATH%;c:\matlab_sv12\bin\win32"
    PATH=%PATH%;C:\PROGRA~1\SSHCOM~1\SSHSEC~1
    REM >>>CS ChemOffice: Do Not Edit!
    path="c:\PROGRA~1\CHEMOF~1\COMMON\dlls";%PATH%
    REM <<<CS ChemOffice: Do Not Edit!
    I added the C:\J2SDK1.4.1\BIN and the end of PATH=%PATH%;C:\PROGRA~1\SSHCOM~1\SSHSEC~1 but it is not working. When I try to compile javac HelloWorldApp.java in MS-DOS Prompt I get "Bad command or file name".
    If anybody can please help, I'd greatly appreciate it...
    Thank you
    Gem

    I added the C:\J2SDK1.4.1\BIN and the end of
    PATH=%PATH%;C:\PROGRA~1\SSHCOM~1\SSHSEC~1 but it iswell, you could have written that directory wrong...
    are you sure that your java is in J2SDK1.4.1 ? for me
    that directory has _02 at the end of it as well...
    it also might be that you didn't separate your path
    element with ';'
    that's important too.
    you could try it from dos-prompt like that:
    set PATH=%PATH%;c:\j2sdk1.4.1\bin
    if it works from dos-prompt, then it should work in
    autoexec as well...
    HTHThank you very much for your help!!!
    I tried what you suggest set PATH=%PATH%;c:\j2sdk1.4.1\bin in the dos-prompt and it worked, but it didn't work in the autoexec.bat. I am getting "Out of environment space".
    Gem

  • Install jdk into WinME, how to set path?

    I just install WinME for my pc! However, the method to set path in WinME is different with Win98! I set the path in Win98 by using 'sysedit', however, WinME haven't got 'sysedit', then i tried to set path in 'msconfig'! But, it only allows us to set one path, how should i add one more paths?
    i can't run javac, it said msvcrt.dll has problem!
    what happen?
    I can set path in Win98 but winME is different.
    thank you

    Windows ME - To set the PATH permanently:
    From the start menu, choose programs, accessories, system tools, and system information. This brings up a window titled "Microsoft Help and Support". From here, choose the tools menu, then select the system configuration utility. Click the environment tab, select PATH and press the edit button. Now add the SDK ( e.g C:\j2sdk1.4.0-beta3\bin)to your path by Looking for the PATH statement. (If you don't have one, add one.) If you're not sure where to add the path, add it to the right end of the PATH.
    After you've added the location of the SDK to your PATH, save the changes and reboot your machine when prompted.
    hope this help

  • Set path for emacs

    Hi
    The emacs located in /opt/sfw/bin
    But how to set path for that so i can use emacs or other software in any other directory.
    I put
    set path=(/opt/sfw/bin $ path)
    in my home dir /export/home/joanna/.cshrc
    but it did not work.
    Which file should i modify and the format i put in ~/.cshrc is correct or not?
    Thanks
    Joanna

    The PATH variable is PATH and not path (The case of the shrinking Alphabets...?)
    And I think in the csh, it should be setenv and not set.
    BTW, csh is not really a good shell to be working on - use ksh instead.
    man csh
    man ksh

  • RMAN backup set path

    I am restoring the production database to testing server. i have taken the cold backup of my catalog database and refreshed on development server so that i can have information about the production db in RMAN catalog db.
    i have copied the backup sets ( level 0 ) of my production db to development server. backup set path is not identical as production. so When i try to recover in dev server i am getting error file not found. ( not able to find the backup piece ) since it is point to production backup set path.
    how do i set or update the RMAN database about my testing server backup set path so that during the recovery rman reads from new location on the development.

    thank you.
    I am facing problem while restoring the database.
    i trying to restore from level 0 backup which we take daily basis. when i use the below command and while restoring one of the datafile referring the old backup set which is not available. i have valid backup sets taken yesterday. but rman refers the backup sets taken on day before yesterday.
    i am using the following command.
    rman << EOS
    connect catalog rman/rman@PSMTRRCT
    set dbid 4151495469;
    connect target /;
    startup nomount;
    run {
    allocate channel c1 type disk;
    set until time "to_date('9/mar/2011 23:00','dd/mon/yyyy hh24:mi')";
    restore controlfile;
    restore database;
    alter database mount;
    exit
    EOS
    LEVEL 0 backup which i have was taken on 9 mar. but rman refers the 8 march backup set for one particular datafile. since i dont have that backup set. restore fails.
    can you please help.

  • 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

  • Setting Path Permanently

    This problem is taking up way too much time...
    So, I, like many others, want to set a global PATH variable for all users. I know you should do this in /etc/profile, but it doesn't work. In my etc/profile (before the last two lines) I have:
    export PS1="[\u@\h \w]\$ "
    export PATH=$PATH:/opt/csw/binThe PS1 variable is always changed (i.e. it looks like I told it to look), but the PATH variable never includes the folder I appended to it. (This is with root and nonroot users). I don't want to mess with .profile, .bashrc, etc. because this is supposed to be for all users. If I can help it, I'd also like to avoid editing /etc/default/login. Thanks in advance for the help.
    -Andy

    Also, I have another question. When I login to
    fluxbox or something, and I open up a terminal
    (loading sh), my PATH isn't set because sh doesn't
    source .profile or /etc/profile when invoked like
    that. Is there some file it does source, or some
    other way to set PATH?Ok, you logon locally to the box. You type sh to
    invoke bourne shell and your PATH does not carry over
    to the new shell?
    What shell do you originally log into?
    alanHere's the problem: Say I log in via fluxbox. /etc/profile is run, setting PATH, etc. Now I open a terminal which loads into sh, but does not run /etc/profile or .profile. Unfortunately, there is a script I want run every time I open a new shell session/terminal, and I want to set a few variables, including PATH via .profile. For some reason, probably logical because /etc/profile has already been sourced, opening a shell via terminal doesn't source either .etc.profile or, more importantly, .profile. Is there a way to get it to execute .profile every time I open a terminal? If you answer is to edit the menu and change the actual command opening the terminal, how do you do that in JDS? I couldn't find a way to do it.
    Thanks.

  • Setting path win98

    i've followed all instructions and i still have to use set classpath= to get java classes to work... can anyone tell me how to set path and it actually work?

    This is how i set up my classpath
    1.I have a directory c:\jdk1.3.1_02\classes
    2.Put BreezySwing package into the classes folder
    3.Use Wordpad to open the file c:\autoexec.bat
    4.Go to the very end of the file, and add the following two lines:
    path %path%;.;c:\jdk1.3.1_02\bin
    set CLASSPATH=.;c:\jdk1.3.1_02\classes
    The first of these lines adds the current directory, and the directory c:\jdk1.3.1_02\bin to the paths
    through which the Windows system looks when searching for files that implement commands. This
    will allow you to invoke the JDK utilities javac (Java complier), java (Java Virtual Machine) and
    appletviewer (utility for checking Java applets) from anywhere in your system.
    The second line directs the Java compiler to the correct place on your disk for accessing the classes
    provided in the BreezySwing package and any others you may add in
    the future. You will need to restart your computer.
    Good luck.

Maybe you are looking for

  • Materialzed view rewrite

    Hi http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/qradv.htm#CHDFIAGB In the following section Materialized View Delta Joins A materialized view delta join is a join that appears in the materialized view but not the query. All delta jo

  • IMovie 3.0.3 not working with OS 10.3.9

    I have iMovie 3.0.3 and OS 10.3.9. All video clips that are currently in my iMac were imported with a previous version of iMovie (don't know the version). These imported video clips do not correctly play back. There seems to be a synchronization prob

  • Installing Solaris 10 on HP ML370G5 server -No disks found

    I get no disks found. There is no way to disable Smart Array P400 using ROM based settings which appears after pressing F9. It seems the DISABLE option for P400 controller is removed. Has anyone had success in disabling the array controller on ML370G

  • Please review windows 8 is not compatible with 7gen nano it causes a WDF violation.

    I have 7th gen ipod nano,  i am running windows 8 and when I connect the ipod  and launch itunes, a blue screen pops up and says WDF violation and then my computer reboot is there solution to resolve this and how? If Apple actually reivews this they

  • Provisioning profile not found

    Hello, I am a student and I have signed up the Apple Developement Program (the one with annual fee). After 4/5 months of normal use, I recently opened XCode, and when I bult my app on the device, I got this error: Code Sign error: a valid provisionin