CLASSPATH Environment Variable on Win2k problem

hi
i am new to java, but having problems to seting the CLASSPATH Environment Variable on my Win2k professional. my university computers are alredy set and i enjoy working with java. i just cant get my head arround to this problem. it would be much appriciated if some one send me a link which provide screenshot to resolve this problem. i got my jdk1.4 kit in a folder caled jdk in c:\ root.
thanks

Ashwani_Saxena wrote:
Our application is stand-alone application and we are using Applet with Object Id tag for JavaScript to Java connectivity. In our application we are displaying the value of classpath environment variable on screen.
Applets and stand alone applications are two different animals.
While migrating from JRE 1.5 to JRE 1.6, we are unable to retrieve the classpath variable value. After analyzing, figure out that when classpath is defined in uppercase (i.e. CLASSPATH) then only we are unable to retrieve its value. However if its defined in lower case or any character is in lower case (i.e. classpath) then its value appears correctly. We are retrieving the classpath value via the "Set" command from Java.
That's completely unnecessary, there's a System.getevn("CLASSPATH") method.
However the CLASSPATH environmental variable isn't much use, and certainly not in the case of Applets, which definitely don't use it.
Futhermore I don't expect the sandbox environment of an Applet will allow you to access the environmental variables in any way, (certainly not by running a program). Applets, unless signed, have almost no access to the client machine they run on.

Similar Messages

  • How to load a class , which isn't in the classpath environment variable.

    Hi, you folks.
    I have one problem. I want to load a class, which isn't in the classpath
    environment variable and I don't want to put into classpath. which method
    JVM can use to load it?
    Waitting for your sage advice.
    Regareds
    Hunter.Xiao

    You will have to write your own ClassLoader, or use something like URLClassLoader (I've never used this myself, but I've seen it mentioned elsewhere in this forum). Look here.

  • CLASSPATH environment variable - Pro/cons?

    I was told that its not a good idea to define CLASSPATH as a system environment variable, but was never told why. Is it correct that it should be avoided to define CLASSPATH as a system variable?
    Another thing when should a variable be defined as a system variable or an user variable?

    fedevaps wrote:
    I was told that its not a good idea to define CLASSPATH as a system environment variable, but was never told why. Is it correct that it should be avoided to define CLASSPATH as a system variable?For one thing, it means you have no control over classpaths. Say you write two apps, and they each use a different version of the same library. If you're using the one global classpath for both of them, you're stuffed. How do you allow them both to use the correct version? Then you come to deploy one of them on someone else's machine, and, say, send them a CD with it on."Right, what jars does it use again? I dunno. It always just worked, cos I've got all my dependencies in one place, and the VM picks up the lot. Goddammit. I'll have to put all of them on his machine, too .AND set up his classpath. What? There are 500 machines to roll out to? And some of them don't even +have+ that folder? Goddammit! ". See the problem? If you explicitly dictate a classpath when starting up the JVM, it can be wherever you want - typically a lib folder within that specific app - and have exactly what you need on it. Much more flexible and easier to control
    Another thing when should a variable be defined as a system variable or an user variable?I hope you're just asking cos you're already here, and not because you think this is related to Java. Cos it isn't. System variables are available to, well, all the users of the machine, including any local accounts that services might be running under. A user variable is specific to the user it's defined for, and not visible to any others. When you use which depends very much on what the variable is for

  • Jar file doesn't read classpath environment variable from windows xp

    I created a small program that uses javamail and jdbc driver. I program on Win XP and use java 1.6.04.
    When I compiled my classes the program works fine but when I created a jar package the jar file cannot 'see' the classpath that windows has already set.
    I have to set the classpath in the manifest file and then it works ok.
    Is this normal? I was expecting that the jar file would work just fine without any complication since the classpath is already set in the system?
    If you could point to any documentation that covers this it would be great.
    Thank you very much.
    Genti

    genti_tech wrote:
    I specified the class-path in manifest in jar file and I looked at the tutorial you are suggesting:
    http://java.sun.com/docs/books/tutorial/deployment/jar/
    which is not clear at all about the fact that jar ignores the class-path environment variable.It is specified for java. http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html#-jar

  • How to setup ENVIRONMENT VARIABLES in WIN2K installation?

    Hi experts,
    I am trying to install nw04s on wink2 server, I want to know what environment variables do I need to setup?
    Also, Export cd's, there are 8 cd's, one of them exe, else are different. How would I make it working.I know in linux how to make it working not in windows
    Thanks,

    hi,
    In win2k you need to set the " system and user variable " for java
    right click on my computer->advanced->environment variables
    1>   name:   JAVA_HOME  ( this must be in capital)
         value:  c:\j2sdk1.4.2_11
    2> edit the "path"
    and ;c:\j2sdk1.4.2_11\bin
    then save.
    after this check this through
    cmd
    give the command "java -version"

  • OC4J classpath & environment variables

    Hi,
    What do I have to have in my classpath?
    What environment variables I need to have?
    Do I have to install JDK X.XX before I install OC4J or does OC4J comes packaged with a JDK?
    Thanks
    Nabil

    I think you should install JDK1.2.2_07 or 1.3.x before you install OC4J. I am using JDK 1.3.1 now. I had used JDK 1.2.2_05 and _08, but when I start OC4J, there was a NON-FATAL error message. Although it's NON-FATAL, I still don't like it. So I moved to JDK 1.3.1. My classpath in system environment variable is ".;", nothing else.
    But if you are going to use OCI8 JDBC driver,
    you'd better replace the classes12.jar under OC4J\lib with classes12.zip coming with Oracle8i Client 8.1.7.3. otherwise, you will encounter an "UnsatisfiedLinkError" when you use the datasource to get connection. In addition, you should set the "path" variable in order to run Oracle8i client. You can find the information from Oracle8i'd documentation.
    Good Luck!

  • Setting Linux environment variable

    Is there other web site which talks about how to set the environment variable of J2EE for Linux?
    I followed this web site
    http://www.dougsparling.com/comp/howto/linux_java.html
    but after all
    when I tired to compile a servlet program... it couldn't be complied. I think the case is that the compiler couldn't find servlet.jar ...
    why is that?

    You have to verify that your CLASSPATH environment variable is set in your account's profile. I use the
    bash shell therefore my variables are set in .bashrc
    for example my CLASSPATH is set to :
    CLASSPATH=.:$J2EE_HOME/lib/j2ee.jar:$J2EE_HOME/lib/locale

  • R12, Environment Variables on Windows, and OBIEE

    Dear Experts,
    I've managed to install R12 on Windows.
    Now, in the global environment variable, Path, the user Oracle has a number of directories in its default PATH, starting with the Oracle apps middle tier.
    C:\oapps\apps\tech_st\10.1.2\bin;     
    C:\oapps\apps\tech_st\10.1.2\jdk\jre\bin\classic;     
    C:\oapps\apps\tech_st\10.1.2\jdk\jre\bin;
    C:\oapps\apps\tech_st\10.1.2\jlib;     
    C:\oapps\apps\tech_st\10.1.3\bin;     
    C:\oapps\db\tech_st\11.1.0\bin;     
    C:\Windows\system32;     
    C:\Windows;     
    I notice that there are .cmd scripts that set the Path.
    This script sets the path to look in: c:\oapps\db
    cd C:\oapps\db\tech_st\11.1.0
    VIS_black.cmd
    echo %PATH%
    C:\oapps\db\tech_st\11.1.0\perl\5.8.3\bin\MSWin32-x86-multithread\;
    C:\oapps\db\tech_st\11.1.0\bin;
    This script sets the path to look in: c:\oapps\apps
    set PATH=""
    cd c:\oapps\apps\apps_st\appl
    VIS_black.cmd
    echo %PATH%
    C:\oapps\apps\apps_st\appl\au\12.0.0\bin;
    I'd like to install OBIEE on the same server. Obviously, I don't want any path conflicts. And, OBIEE uses a different version of java.
    1)
    Do all these Apps directories need to remain in the global PATH environment variable? Or, can the directories be removed from the path, and the scripts can be relied on to set the appropriate variables?
    Thanks a lot!

    if you want global settings (always present, even after reboot), you have to edit the autoexec.bat file, e..g
    SET CLASSPATH=c:\myclasses
    you can set environment variables temporarility in a DOS shell using the same command.
    if possible, you should avoid the CLASSPATH environment variable, and use the -cp or -classpath option for java and javac. This helps a lot to solve classpath confusions.

  • Problem with ENVIRONMENT VARIABLES in MS-DOS

    I have just installed JDK & J2EESDK under the directory C:\Program Files.
    I set my JAVA_HOME to C:\Program Files\jdkblahblah\bin
    and J2EE_HOME to C:\Program Files\j2eesdkblahblah\bin
    and CLASSPATH to %J2EE_HOME%\lib\j2ee.jar
    As you may have noticed there is a space in the directory "Program Files" and this has been giving me a lotta problems. When i try to run any batch files it doesn't recognise the classpath...Same thing happens when i try to run javac with the -classpath option.
    Even when i use full path names instead of env.variables it still has problems as it is assuming the latter part after the space(Files\j2ee..) and the one before the space(C:\Program) as two different paths....
    How do i fix this? I have a work-around but, I would like to know how to fix this thing...

    I guess that surrounding the path with quotes might help. You have windoze on your 'puter, haven't you. In case of Win2K, right click on "my computer", select "properties", select "special", and then "environment variables". There you may edit the PATH. I guess editing the classpath is also a must.
    Or, alternatively, uninstall java, and reinstall it in the root directory, without having white spaces in the path. Makes your life much easier...

  • Environment variables like classpath,JAVA_HOME,path

    Sir,
    I work as a java developer in a software company.I had more problems when executing servlets."could not create the java vitual machine" error comes when i try to compile java servlet file.also I do not know that how to set environment variables like classpath,path and JAVA_HOME.Also I want to know them with proper examples.
    Thanking you.
    KRamesh

    Hi Teches
    I am facing few problem in starting eclipse 3.0 ; I had gone trogh forum , 1 of the persone suggest me to upgrade the java version.For this
    I had installed java 1.5 and set the following variable
    JAVA_HOME ---> to the home dir of JAVA
    PATH ---><home dir>/bin
    CLASSPATH --><jre>/lib
    But when ever i m giving "java -version" command on console , the result is as follows:
    C:\>java -version
    java version "1.3.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
    Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
    suggestion are welcome Plz.
    ;

  • Classpath in Environment Variables

    Dear All,
    After I put " ; " in front of Environment Variables in Win XP System Properties
    so my classpath=;C:\tomcat4\common\lib\servlet.jar;C:\tomcat4\webapps\aplikasiku\WEB-INF\lib\mssqlserver.jar;C:\tomcat4\webapps\aplikasiku\WEB-INF\lib\msbase.jar;C:\tomcat4\webapps\aplikasiku\WEB-INF\lib\msutil.jar. then my problem solved. I never found NoClassDefFoundError in my java.
    Is it ok to use that classpath?
    Thanks

    Hi,
    It can be used but should really really be avoided since it makes it makes it very hard to use when you have multiple applications, and applications of different versions.
    Kaj

  • OMB PLUS - Problem passing Unix environment variables to OMBPlus

    Due to a requirement to encapsulate deployment of OWB applications, we currently start OMBPlus.sh from our own wrapper ksh script (deploy.ksh) in order to get the new / changed application into the target control center etc.
    We now have a new requirement that means we need to pass the content of the Unix environment across to OMBPlus.sh (and from thence into our deployment tcl scripts).
    No problem, if you believe the tcl documentation. The entire Unix environement gets dumped into a hash array called 'env', so you can get the variable's value out just by saying $env(unix_valraible).
    Sounds great, it should work a treat.
    Except OMBPlus only silghtly resembles tclsh.
    The 'env' that gets into OMBPlus bears practically no resemblance to the 'env' that existed before OMBPlus.sh got invoked.
    Does anyone have:
    a decent explanation for why the env gets scrambled (and how to avoid it) ?
    or an alternative method of getting the Unix environment varaible values into OMBPlus ?
    Please do not propose passing them all on the command line because (would you beleive it) the values are database passwords !
    Edited by: user10466244 on 23.10.2008 09:28

    Unfortunately, the java implementation of TCL that Oracle used as the basis for OMB+ is NOT a fully-featured implementation. Just try using packages...
    However, and understanding why you don't want to hard-code passwords into a file, you can always edit the setowbenv.sh file in your owb/bin/unix directory to grab your specific shell environment variables and propogate them to the java session.
    towards the bottom of this env file you will see a section that looks something like:
    JDK_HOME=../../../jdk
    OWB_HOME=/owb
    ORA_HOME=/owb
    OEM_HOME=/owb
    IAS_HOME=/owb
    ORACLE_HOME=/owb
    CLASSPATH=Personalties.jar:../admin:$MIMB_JAR:
    CLASSPATH_LAUNCHER="-classpath ../admin:../admin/launcher.jar:$CLASSPATH: -DOWB_HOME=$OWB_HOME -DJDK_HOME=$JDK_HOME -DORA_HOME=$ORA_HOME -DOEM_HOME=$OEM_HOME -DIAS_HOME=$IAS_HOME -Doracle.net.tns_admin=$ORA_HOME/network/admin Launcher ../admin/owb.classpath"
    export ORA_HOME
    export OWB_HOME
    export JDK_HOME
    export OEM_HOME
    export IAS_HOME
    export ORACLE_HOME
    You could add in the environment variables that you want propogated, include them into the CLASSPATH_LAUNCHER, and then they will turn up in your OMB+ session env array.
    e.g., to propgate an environment variable called MY_DATABASE_PASSWORD you would:
    JDK_HOME=../../../jdk
    OWB_HOME=/owb
    ORA_HOME=/owb
    OEM_HOME=/owb
    IAS_HOME=/owb
    ORACLE_HOME=/owb
    CLASSPATH=Personalties.jar:../admin:$MIMB_JAR:
    CLASSPATH_LAUNCHER="-classpath ../admin:../admin/launcher.jar:$CLASSPATH: -DOWB_HOME=$OWB_HOME -DMY_DATABASE_PASSWORD=${MY_DATABASE_PASSWORD} -DJDK_HOME=$JDK_HOME -DORA_HOME=$ORA_HOME -DOEM_HOME=$OEM_HOME -DIAS_HOME=$IAS_HOME -Doracle.net.tns_admin=$ORA_HOME/network/admin Launcher ../admin/owb.classpath"
    export ORA_HOME
    export OWB_HOME
    export JDK_HOME
    export OEM_HOME
    export IAS_HOME
    export ORACLE_HOME
    So now you have no protected data hardcoded, it will pick up your specific environment variables at runtime, and when you start OMB+ you will be able to:
    array get env MY_DATABASE_PASSWORD.
    cheers,
    Mike

  • Problem with environment variables

    JAVA_HOME = C:\JBuilder9\jdk1.4
    Path = C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip
    When I run foo.java I get this error, which i believe is because of some kind
    of problem with environment variables.
    Exception in thread "main" java.lang.NoClassDefFoundError: OraThinI eliminated this path
    C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin
    just to check whether two paths of jdk bin folder is causing problem but I see no change.
    Please help

    I had solved it myself
    I am a genious :P
    Just do this
    JAVA_HOME = C:\JBuilder9\jdk1.4
    CLASSPATH = C:\oracle\product\10.1.0\Db_1\jdbc\lib\classes12.zip;.;%JAVA_HOME%\bin
    PATH= C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip;%JAVA_HOME%\bin

  • Problem with environment variable & compiling

    G'day all,
    I'm totally confused :(
    I've set my environment detail but when I use javac the command window just does nothing. The cursor (or flashing thingo) drops to the line below and just hangs there. If i manually type in the entire path javac works fine.
    Image of my environment variable window is here:
    http://img130.imageshack.us/img130/5120/environvariables.jpg
    Using Windows 7, JDK 1.6.0_18 and latest version of Eclipse is installed.
    Second issue:
    I wrote a program using Eclipse. It all went into a package named "openagil". 3 classes in total. Class "A", "B", "C". A uses both B and C. It creates an instance of B and C. Included in each is package openagil; at the very top.
    Running in eclipse it works fine. However, how do I compile this using javac and then in turn run it? The .java files are located within a workbench folder (java) and then in the package directory (openagil). These are contained on the D drive so "d:\java\openagil" - No class variables are set as I am unsure how this is done (despite reading a few guides).
    I can do javac d:\...*.java and it'll compile all of them fine but I am then unsure how to run it. I think what I do is do java openagil.classA but this pulls up errors - an "exception in thread' error followed by a "noclassdeffound: openagil/classA" then a whole bunch of URL/Access Controller stuff.
    I understand programming fine, but configuring this is a bitch. My Java book doesn't cover installation nor does it cover packages and the

    LordMidol wrote:
    Second issue:
    I wrote a program using Eclipse. It all went into a package named "openagil". 3 classes in total. Class "A", "B", "C". A uses both B and C. It creates an instance of B and C. Included in each is package openagil; at the very top.
    Running in eclipse it works fine. However, how do I compile this using javac and then in turn run it? The .java files are located within a workbench folder (java) and then in the package directory (openagil). These are contained on the D drive so "d:\java\openagil" - No class variables are set as I am unsure how this is done (despite reading a few guides).
    I can do javac d:\...*.java and it'll compile all of them fine but I am then unsure how to run it. I think what I do is do java openagil.classA but this pulls up errors - an "exception in thread' error followed by a "noclassdeffound: openagil/classA" then a whole bunch of URL/Access Controller stuff.You need to us the -classpath (or -cp) command line option to specify where java looks for your .class files. I think it would be java -cp d:\java openagil.classAFYI class naming convention is to start with a capital letter - YourMainClass for example. It may help to go here [http://java.sun.com/javase/6/docs/technotes/tools/index.html] and go to General Information, then click on How Classes Are Found.

  • Win2k Environment Variables

    When I compile a .java that constructs an object of another class javac taunts me with "cannot resolve symbol". However, All the classes are in the same directory and the program runs as intended on UNIX.
    I imagine is has something to do with setting the "Classpath".
    Thanks for your help.

    You need to add the classpath, you do this in Win 2000 and WinXP like this:
    1)Right click on "My Computer"
    2)Click the "Advanced"-tab
    3)Click the "Environment Variables"- button
    4)You add your path to "USER Variables" not system variables.
    And make sure you type classpath with lower case

Maybe you are looking for

  • Opening Raw files in Elements from Bridge

    When I right click on a raw file in Bridge there is no selection in the context menu under 'Open With' for Elements.  I'm using PSE 8 on a MacBook Pro and these are raw files from a Panasonic Lumix DMC-LX3 camera. Has anyone encountered this? Thanks

  • Oracle 9 startup and shutdown

    i have installed oracle9. there is not Svrmgrl file in Bin folder as like Oracle 8 and 8i. how i start and shut down databse in oracle 9.

  • Best Way to Export After Effects File and Save Transparency

    Hi all- A pretty simple question. I need to export a file from After Effects and keep the alpha channel so I can superimpose it on some video in FCE. What is the best way to export it? I recall hearing people mention that the Animation Codec with "Mi

  • Using motion clips for overlays in dvd studio?

    does anyone know if you can use a motion file,(eg. highlight for a dvd menu button), in dvd studio pro for overlays? like if you had a menu set up, and you need to put a highlght on a button for it's selected state? thanks

  • Any idea when we get DNG plug-in for Vista?????

    I am curious to know when we get the WIC plug-in for Vista? I have the Canon one, but unfortunately I converted most of my RAW files to DNG. I have LR and CS3, but sometimes I just want to use Windows Photo Viewer to show files. If Adobe truly want D