Classpath setting

Hello techies,
I had installed jdk-1_5_0-rc-windows-i586 in my system.
I am having windows2000servicepack4.
I had also installed mysql. I had also installed mysql-connector-java-3.1.8a.zip . I had extracted this zip file.
It is having 6 JAR files. In the lib folder, i am having the follwoing 4 jar files.
C:\mySql\mysql-connector-java-3.1.8\lib\aspectjrt.jar
C:\mySql\mysql-connector-java-3.1.8\lib\aspectjtools.jar
C:\mySql\mysql-connector-java-3.1.8\lib\jdbc2_0-stdext.jar
C:\mySql\mysql-connector-java-3.1.8\lib\jta-spec1_0_1.jar
The remaining 2 jar file are
C:\mySql\mysql-connector-java-3.1.8\mysql-connector-java-3.1.8-bin.jar
C:\mySql\mysql-connector-java-3.1.8\mysql-connector-java-3.1.8-bin-g.jar
I had installed java in
c:\program files\java
Mysql in c:\mysql\
Now i have to set up the classpath.
I had gone to MyComputer>Properties>Advanced>
Now i had created two variables claspath n path
classpath: C:\Program Files\Java\jre1.5.0\lib;.;
path
C:\Program Files\Java\jdk1.5.0\bin;.;C:\mySql\mysql-connector-java-3.1.8a.zip;.;
Now iam able to excute java programs successfully. When i try to connect to mysql through jdbc connection.
It is showing Class Not Found Exception.
Does i need to specify those 6 jar file in the classpath (or) i just need to specify in the zip file in the path.
Can i excute servlet programs by using jdk-1_5_0-rc-windows-i586 without mentioning the servlets jar files in the classpath.
If not what r the jar files i need to mention in the classpath.
Does jdk 1.5.0 supports servlets.
iam always having confusion b/w classpath and path
Does i need to change the classpath for mysql jdbc connection??
If so can anybody adjust my classpath n path.
I will be very thankfull if any body replies
thanks(inadvance),
ramu

That said, you shouldn't have a CLASSPATH environment variable anyway. You do need the PATH, but your classpath should be specified in other ways.
If you create a project in an IDE, you configure projects in that IDE which involves adding jars and directories to its "libraries" or such, which in effect make up the classpath.
Or if you use the JDK command-line tools (javac and java), you specify the classpath on the commandline:
javac -classpath (classpath here) ...
(same command-line option for the java command-line executable)
Please follow all the documentation and tutorials on this site...

Similar Messages

  • Log4j classpath setting in weblogic server 8.1

    Hi,
    I placed all my properties files outside ear file in the folder C:\bea\user_projects\domains\xyz\config . I changed classpath setting in startweblogic.cmd as follows
    set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar;./config;%CLASSPATH%;When i run my application, these properties are getting picked up and logs comming up in the spcified folder I have done this in windows platform.
    When i tried the same in unix box, by keeping properties files in separate folder and including that folder in classpath of startManagedWebLogic.cmd. Here is my classpath settings that i have modified
    $/data/weblogic/app_properties/log4j.properties:$/data/weblogic/app_properties/download.properties:Problem here is i am not able to get the logs updated,even though my application is running fine.
    Can you any one please tell me am i missing anything.
    Thanks,
    Ram

    Hi,
    I placed all my properties files outside ear file in the folder C:\bea\user_projects\domains\xyz\config . I changed classpath setting in startweblogic.cmd as follows
    set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar;./config;%CLASSPATH%;When i run my application, these properties are getting picked up and logs comming up in the spcified folder I have done this in windows platform.
    When i tried the same in unix box, by keeping properties files in separate folder and including that folder in classpath of startManagedWebLogic.cmd. Here is my classpath settings that i have modified
    $/data/weblogic/app_properties/log4j.properties:$/data/weblogic/app_properties/download.properties:Problem here is i am not able to get the logs updated,even though my application is running fine.
    Can you any one please tell me am i missing anything.
    Thanks,
    Ram

  • CLASSPATH setting for IAS installation?

    Hi
    I am trying to install IAS 1.0.2 on Solaris. Everything seemed to be going okay until near the end, when I am informed by the installer that the SSOHash Class has not been loaded into the database.
    I have attempted to follow the advice on metalink about using loadjava to load the classes manually, but it still errors. I believe that I may have the CLASSPATH set incorrectly. The installation guide states it should not refer to an existing Oracle home, but I did not have a CLASSPATH set up with my exisiting DB configuration. It does not advise what it should be set to.
    Please can anyone advice what it should be set to if my directory structure is something like oracle/app/product/ias/ etc
    Thanks in advance
    Tim

    This is the sort of thing I am getting
    internal error: unanticipated exception: java.io.FileNotFoundException: ?resolve
    java.io.FileNotFoundException: ?resolve
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.io.IOException.<init>(Compiled Code)
    at java.io.FileNotFoundException.<init>(Compiled Code)
    at java.io.FileInputStream.<init>(Compiled Code)
    at java.io.FileInputStream.<init>(Compiled Code)
    at oracle.aurora.server.tools.loadjava.LoadJava.processLoadAndCreate(Compiled Code)
    at oracle.aurora.server.tools.loadjava.LoadJava.process(Compiled Code)
    at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(Compiled Code)
    at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(Compiled Code)
    I tried using this utility after the portal installation failed with 'you cannot login because there is no configuration information stored in the enabler configuration table' . I confirmed this was the case by checking the contents of user_ojects, and found there were no objects of type 'JAVA CLASS'

  • What classpath setting is needed for JMF 2.1.1.

    What classpath setting is needed to get JMF2.1.1 working on WindowsXP?
    I want to run some of my JMF code ..but am unable to do so ...please help ...thank you!!

    Hi
    When you install JMF2.1.1, Windows Performance Pack the classpath will be automatically set but i am still giving you the files for which the classpath has to be set.
    JMF21~1.1\LIB\SOUND.JAR;
    JMF21~1.1\LIB\JMF.JAR;
    JMF21~1.1\LIB\CUSTOM.JAR.;
    Try this and it will work.
    Also to check the working there is a class file which performs JMF Diagnostics, if you can give me your contact email, i can send you that file and how to use it.
    Thanks
    Swaraj

  • Runtime classpath setting-help

    Hi friends,
    I m getting java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder exception because of the classpath setting..This is the story, During runtime i have to change one xml file. For that i need the jdom.jar. This jar file shoulb be set in classpath during runtime.. i dont know how to do that.. plz help me.
    Thanking you
    Krishna.

    Use the -cp or -classpath argument of java command to specify file system paths and JAR files to be taken in the classpath.

  • Even after classpath setting in jserv.properties file  error.

    hi kali,
    i have used a custom jsp page for export to excell using a jar file poi-3i-200566.jar which i deployed in oracle apps version 11.5.10.2.
    the jar is put in $JAVA_TOP and class path entry is set in jserv.properties file as
    wrapper.classpath=/d2_u10/....../poi-3i-200566.jar .
    After setting the classpath , bounced the apache.
    But even after the setting , the same error continues.
    I refered the mod_jserv.log file for error details , the error is in import statement of classes present in the poi-3i-200566.jar file like
    could not find the symbol HSSRow , HSSpreadsheet , etc. all these are classes in jar file.
    please anybody know any extra conf is needed or any idea where i am going wrong.
    thanks
    prabhakr,ap

    Hi,
    Please check your jserv.properties file whether the custom class path that you have set is present or not in jserv.properties after restarting the AutoConfig and Apache server.
    Thanks & Regards,
    Sagarika

  • Weblogic Classpath setting error not able to pick the properties file

    Hi All,
    We are using a third party jar and create a java Web service on the top of that jar. This jar file need two configuration file .properties and .xml when we deploy war for the application into weblogic server it will give file not found error. Though this file already exists inside the .war but from the application it is not able to pick the files.
    We find that these file need to be put in weblogic domain home and we put it there and application works.
    I decompile the jar and found that inside java class they use FileReader("allXXX.xml") path and when I Google it and found that it will pick the file from weblogic domain directory.
    The issue is that we need to put properties file in specific weblogic folder like /3party/config by setting the class path inside startWebLogic.cmd. Please let us know solution for same
    Thanks in advance
    Edited by: sb**** on Mar 19, 2012 9:08 AM

    Hi , I am also facing the similer issue. I am deploying war file of my Spring MVC application , but its not picking resource bundle .properties files from one of the configuration file.
    <bean id="PropertiesRepository"
              class="LanguageBasedPropertiesRepository">
              <property name="propertiesFiles">
                   <map>
                        <entry key="en" value="classpath:/exceptionMessages.properties" />
                        <entry key="es" value="classpath:/exceptionMessages_es.properties" />
                        <entry key="default" value="classpath:/exceptionMessages.properties" />
                   </map>
              </property>
         </bean>
    Please let me know how we can modify this to make it work.
    thanks .

  • Reg Classpath setting in WIN NT4

    Hi Friends,
    I have installed JDK 1.3.1 recently on Win NT4 and facing the following problem..
    1. when i say javac A.java it says can't read file.
    My settings under environment variables r as follows..
    PAth=C:\JDK1.3\BIN;
    CLASSPATH=.;\C:\JDK1.3\lib\tools.jar;
    Both these i have set under User variables.I would like to know if any one of these have to be set under System environment variable? If i don't put .;\ in classpath..then also it gives same error. Whether i write my prog in notepad or in DOs editor the problem is same.
    Pl. help...i am fed up trying....i have read all related questions but my problem remains unsolved.I am able to work on Win 2000 but not NT4 and thats what is bugging me.
    Thanks in advance and expecting a fast reply to this.
    waiting for solution...
    VA

    See when i write the prog in dos editor then it says can't read file...even when i say edit A.java and open the editor. If i use "edit A.java" also no use.
    The suggestion u gave for notepad doesn't work. I used all files option while saving and gave .java extension.But it gets saved as A.java.txt. It works only when i save it in double quotes like "A.java".Only this works on NT4. I still want to know what and how i can do it when i use Dos editor? Its not taking 4 character extn.So what to do?
    See if anyone take interest to reply to this small question.
    Thanks in advance.
    VA

  • Classpath setting for oracle classes 12 in unix environment

    hi all,
    i am trying to exceute java program with JDBC statements in it. I am running the code on a remote machine which has both JDK1.4 and oracle 9.i installed .I am accessing the remote machine through PUTTY .can any one suggest how to set the classpath in UNIX environment for oracle.
    Thanks

    Same way you do it else where:
    java -cp <classpath>

  • User defined classpath setting using "-Djava.class.path="

    Hello,
    I am invoking a JVM from a C++ application ( say A ) which inturn will be started by another C++ application ( say B ).
    The class path for the JVM is set by "-Djava.class.path=" option in application 'A' which will actually supplied by parent application 'B'.
    I want to know how to do it ?
    I tried with the following things but it doesn't work.
    // the application 'A' gets classpath string from appication 'B' the "classpath" variable ( which is a string ) gets from application 'B'
    // this is in application 'A'
    // "classpath" variable in application 'A' holds the class path string optained from application 'B'
    "-Djava.class.path=" classpath ; ---(1)
    // "-Djava.class.path=" %classpath% ; ---(2)
    // "-Djava.class.path=classpath" ; ---(3)
    All the above tries are failed in first 2 tries the application even doesn't get compiled and in third try the appilcation doesn't set the classpath even though it is get compiled.
    Do any one have any Idea !!

    Hi,
    I am not quite sure if I got your problem correctly...
    Your application A has a variable called classpath containing the classpath recieved from B. right? Now you want to call the JVM with that.
    I think what you got to do is something like
    sprintf(myclasspath, "-Djava.class.path=%s", classpath);
    this will build the correct string for the JVM in myclasspath. And that one can be used to call the JVM.
    Does this sound right??

  • CLASSPATH setting Problem

    Hi Gurus
    I am trying to compile a simple java code,it compiles properly.But I am not able to run it. the error is below.
    C:\javaTest>java GraphTester
    Exception in thread "main" java.lang.NoClassDefFoundError: GraphTester (wrong
    me: javaTest/GraphTester)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)CLASSPATH is---->
    .;C:\j2sdk1.4.2_12\lib\log4j-1.2.9.jar;C:\j2sdk1.4.2_12\lib\commons-logging.jar;C:\j2sdk1.4.2_12\lib\GMICoreSampleTest-1.0.jar;C:\j2sdk1.4.2_12\lib\junit.jar;C:\j2sdk1.4.2_12\jre\lib\rt.jar
    java is Installed at C:\j2sdk1.4.2_12
    Please help me Itried all the possiblity

    Good day FriendsI
    install Java
    If you do not have Java installed already, follow the instructions provided with the download in order to install Java.
    Once Java has been installed, you will be able to run Java program by running the java executable that was installed. You may find it convenient to add the location of this file to your operating system's path variable, otherwise you will need to explicitly refer to the absolute location of java.
    Setting up the path
    Windows 2000/XP users may set their path by right-clicking on 'My Computer' and selecting 'Properties'. Under the 'Advanced' tab, there is a button that allows you to set the 'Environment variables'. Click on this and alter the 'Path' variable so that it also contains the path to the Java executable. For example, if you have installed Java in c:\jdk and your path is currently set to C:\WINDOWS\SYSTEM32, then you would change your path to read C:\WINDOWS\SYSTEM32;c:\jdk\bin
    When you open a new command prompt, it will reflect these changes and allow you to run java programs by typing "java". If you have installed the SDK, then you will also be able to run "javac" to compile stuff.
    Windows 95/98/ME users may find that their path variable is stored in a different place. Edit the c:\autoexec.bat file and add the following line at the end: SET PATH=%PATH%;c:\jdk\bin
    (This also assumes that you have installed Java in c:\jdk)
    Linux, UNIX, Solaris, FreeBSD users must set their PATH variable to point to where the java binaries have been installed. Please refer to your shell documentation if you have trouble doing this. For example, if you use bash as your shell, then you would add the following line to the end of your .bashrc: export PATH=/path/to/java:$PATH
    Setting up the classpath
    In addition to setting up the path, you also need to tell Java where to find compiled class files at runtime. You will probably want to set the classpath to include at least the current working directory (.)
    Eg: SET CLASSPATH=%CLASSPATH%;.
    The classpath can also contain other directories that may contain compiled class files. Note that if you are using classes that are contained inside a .jar file, you will need to specify the full path and name of this file in the classpath, rather than just the name of the directory it is contained within.
    Compiling a Java Program
    Java sourcecode is always stored in files with the extension .java. Once you have created the sourcecode for a program and saved it in a .java file, you need to process the source using a Java compiler. Using the compiler that comes with the JDK, you would make the directory that contains your Java source file the current directory, and then enter the following command:
    javac -source 1.4 MyProgram.java
    Executing a Java Application
    To execute the byte code program in the .class file with the Java interpreter in the SDK, you make the directory containing the .class file current, and enter the command:
    java -enableassertions MyProgram

  • Problem in classpath setting!!please help urgent

    hi,
    i am using BEA weblogic server 9.0.i created a new domain names servletproj.i have created directory webapp under applications dir.
    i.e C:\bea\user_projects\domains\servletproj\applications\webapp
    i have created a directory srtucture as webapp\WEB-INF\web.xml
    and webapp\WEB-INF\classes\HelloClientServlet.class
    i am able to start and shut down the server.i compiled the servlet program successfully.
    but i want to run the program .i don't know how to set the classpath and path variables .please help me.please explain in simple steps.i would like to set the path in command line.
    bye.

    Hi Kristoper,
    No..that Vo is based on some EO..why i am using the row.setAttribute() is...the bid number is coming from some other page...and i need to insert it in table..
    and except the bid number..other values are coming from the page...
    Thank you

  • Classpath set BUT still javax.servlet package not found when compiling

    Hello,
    I'm trying to compile a servlet and use tomcat 5 to run it. After I set the classpath to include the servlet-api.jar file, the compiler still tells me it cannot find package. I'm not sure what else to do. Please Help.
    Thanks Smoker

    Then you haven't set the actual classpath that the compiler is using. Just because you say you have set the 'classpath' doesn't mean you've properly told the compiler that.
    Such as, what did you do, set the CLASSPATH environment variable? Don't do that - ever. If that's what you did, and you're using an IDE, the IDE project is ignoring that environment variable anyway. You have to configure the project appropriately (which for one thing sets up the 'classpath' it uses), which varies depending on the IDE. That's an IDE question though, not a Java one.

  • Classpath Setting using win 98

    Please help me in this little delima.
    I want to set the classpath in win 89 and i am not finding any way of doing this correctly . Can any one tell me how can i set the class pathe in win98 environment.
    Actually i am installing Tomcat and i have to set the environment verivable for this and i dont know how can i do it in win 98 environment.

    There's a handy little tool called sysedit.exe in Win98 that you can use to edit the 4 common config files:
    autoexec.bat
    config.sys
    windows.ini
    system.ini
    just open a command window and type sysedit.
    Don't forget to reboot after you've made changes.
    You may have to increase the environment size if you increase the classpath by much. There have been recent posts about how this is done.

  • Weblogic classpath setting

    How to set the classpath for the helper class files in weblogic.
    There is option where I can set the classpath of the servlets , but to set the classpath of other class files(helper) , where should I set the classpath in weblogic.properties files
    Also by default where should I keep my class files

    Hi,
    start weblogic with a script file. There is a sample script file located in the weblogic directory called startWebLogic.cmd (weblogic 5.1). Adjust this file with your (classpath) settings.
    The classpath is not set in the properties file. In the properties file you add your ejb-jar files that are being deployed.
    Bye

Maybe you are looking for