How to go about Setting PATH and CLASSPATH?

I have problems compling the helloworldwww in the core programming.the error was:
Exception in thread "main"java.lang.NoSuchMethodError:main
my java programs are in c:\program files\java\bin
My path :
PATH=C:\WINNT\system32;C:\WINNT;c:\program files\java\bin
My classpath
set CLASSPATH=C:\WINNT\system32;C:\WINNT;c:\program files\java\bin.jar;.
is there any error in my paths, if yes how to i go about setting the path and classpath??Im running on winXP.j2sdk1.4.1_02.

set CLASSPATH=.;c:\program files\java\bin.jar;c:\program files\java\bin

Similar Messages

  • Set path and classpath in ANT

    by using ANT, how can set the JDK path and classpath..
    jdk version exists in the : C:\Program Files\Java\jdk1.6.0
    This is the build.xml that i need to modify!
    -Do i need to have a serperate JAVA_HOME variable?
    <?xml version="1.0"?>
    <!--
    Build file for 'Chat Client'
    Version: $Revision: 4.10 $ $Date: 2003/05/28 $
    Author:  Rajat Gupta
    -->
    <project name="Chat" default="jar" basedir=".">
       <!-- ================================================================== -->
       <!-- Initialization of all property settings                            -->
       <!-- ================================================================== -->
       <target name="init">
          <property name="appname"        value="chat"   />
          <property name="src.dir"        value="src"               />
          <property name="lib.dir"        value="lib"              />
          <property name="build.dir"      value="Chat"            />
          <property name="build.compiler" value="classic"          />
       </target>
       <!-- ================================================================== -->
       <!-- Makes sure the needed directory structure is in place              -->
       <!-- ================================================================== -->
       <target name="prepare" depends="init">
          <mkdir dir="${lib.dir}" />
          <mkdir dir="${lib.dir}/META-INF" />
          <mkdir dir="${build.dir}" />
       </target>
       <!-- ================================================================== -->
       <!-- Compilation of the web part of the application                     -->
       <!-- ================================================================== -->
       <target name="classes" depends="prepare">
          <javac srcdir="${src.dir}/oracle/otnsamples/oc4jjms"
                 destdir="${lib.dir}"
                 includes="**" />
       </target>
       <!-- ================================================================== -->
       <!-- Compilation of the complete J2EE application (both web and EJB)    -->
       <!-- ================================================================== -->
       <target name="j2ee-meta-inf" depends="classes, prepare">
          <copy file="${src.dir}/META-INF/application-client.xml"
                tofile="${lib.dir}/META-INF/application-client.xml" />
          <copy file="${src.dir}/images/oralogo.gif"
                tofile="${lib.dir}/oralogo.gif" />
       </target>
       <target name="jar" depends="j2ee-meta-inf">
       <jar jarfile="${build.dir}/${appname}.jar"
           basedir="${lib.dir}" manifest="${src.dir}/META-INF/MANIFEST.MF"/>
          <delete dir="${lib.dir}" />
       </target>
    </project>Message was edited by:
    jugp

    [url ='http://www.jguru.com/forums/home.jsp?topic=Ant']answer here

  • Problem in setting path and classpath for java in RedHat linux 9

    Hi ,
    i am not able to set the PATH and CLASSPATH for j2sdk1.4.2_06
    I have tried with export PATH=$PATH:/usr/j2sdk1.4.2_06/bin
    and export CLASSPATH=$CLASSPATH:/usr/j2sdk1.4.2_06/lib
    in terminal
    but i want to configure it as permenant way for the jre and jdk
    and we should only type java or javac according to the requirement
    regards mihir...

    type those in .bashrc ... save and exit
    then at prompt, type 'source .bashrc'
    this is the permanent solution ...
    bhalo thakun

  • Setting PATH and CLASSPATH in Java Applet

    Hi,
    I have been wondering if there was a way to set the PATH and the CLASSPATH in the HTML file within the <APPLET> tag...
    What I would like to do is to read some xml files outside of the directory where my html file is located to run my test application with the configuration on my computer.
    (The applet and the html file from which it is called is on my local host.)
    Therefore, I have seen that in order to access local files, I have to sign my jar files, which I did.
    But the tricky part is that for my test application to work, I need to set the PATH and the CLASSPATH... and I have no idea if this is possible or not...
    I have seen that:
    *CODEBASE: I specify here the main directory where my jar files are located
    *ARCHIVE: I specify here the list of my jar files
    In my case:
    CODEBASE=../../   (this is the root directory of my whole application)
    ARCHIVE=dir/lib/jar1.jar,dir2/jar2.jar,configXML/,etc...I don't know if I can specify the filepath of my xml files (here "configXML") in ARCHIVE (I suspect we can only specify jar files there... right ?)
    Maybe I can use ARCHIVE this way to specify my CLASSPATH (and well... not completely the way I would like I suppose), but what about the PATH ?
    I have been searching this for soooo long now...
    Any help, hint or suggestions (I might doing this all the wrong way...) would be greatly appreciated !
    Thanks in advance !

    You need to use the code attribute to specify the class that contains the main method to start the application.
    <applet code="myPackage.myClass.class" codeBase="http://www.someServer/someFolder/" archive="myApplet.jar">
    I hope this solves part of your problem at least.
    Andrew

  • Setting Path and Classpath in Linux environnement

    Hello,
    I use to develop with JAVA under Windows platform,
    now i am using j2sdk under Mandrake 8.0 , i dunno how to set my PATH end Classpath variables, could you show me how?
    Thanks

    Put this in your user's .bashrc file at the end of it.
    JAVA_HOME=/path/to/java/install
    PATH=$PATH:$JAVA_HOME/bin
    export JAVA_HOME PATHAnd buy a book on Unix/Linux.

  • How do I sett path and classpath in win98

    I have downloaded I have tried but it doesn't work...
    I just don't know how to do, almost tried everything (not the
    right way of course)!
    I would really be happy if someone could tell me how to do!

    The installation instructions are supplied with the JDK download. Otherwise, I found them on this site after 1 minute of searching
    http://java.sun.com/j2se/1.4.1/install-windows.html
    Work your way through these, and if you are still having troubles, feel free to post back here with details of the specific problem you have.

  • Path and classpath

    How do i set path and classpath in java? why it is needed

    ramyabaskar wrote:
    How do i set path and classpath in java? why it is neededTypically you do not set these in java.
    You set the path in the operating system shell.
    You set path so you can launch java by just typing java
    instead of having to type the full path to "C:\Program Files\Java\jre6\bin\java.exe".
    You pass the desired classpath to java when you launch java with the classpath option or set it in the operating system shell using the CLASSPATH env.var.

  • I had to restore my iPod because I forgot the password, like how santa forgot about me. And I didn't set up a Backup. SO I sort of lost everything. But I'm wondering if I can somehow get my pictures back from somewhere. PLEASE HELP ME. Thanks

    I had to restore my iPod because I forgot the password, like how santa forgot about me. And I didn't set up a Backup. SO I sort of lost everything. But I'm wondering if I can somehow get my pictures back from somewhere. PLEASE HELP ME. Thanks

    - If you used PhotoStream then try getting some of them from your PhotoStream. See that topic of:
    iOS: Importing personal photos and videos from iOS devices to your computer
    - Maybe from the restored iPod via
    How to perform iPad recovery for photos, videos
    Wondershare Dr.Fone for iOS: iPhone Data Recovery - Wondershare Official     
    http://www.amacsoft.com/ipod-data-recovery.html

  • Difference between path and classpath

    Difference between path and classpath?

    PATH - set of paths there executables will be found.
    CLASSPATH - set of paths and archives there class files will be found.

  • How do I globally set in and out points on a large number of images?

    As the post asks: How do I globally set in and out points on a large number of images before sending to the timeline? In AVID I can do this in the Script view. How do I do it in FCP?
    Thanks in advance

    Thanks. I assumed I needed to set in and out points. I have not done an image sequence in FCP. If I have a 10 second image and a 2 second transition, but then change the duration of the transition to say 4 seconds then FCP will let me alter the transition duration?
    With regards to movie clips, what happens with setting global in and out points? How would I do that?
    Thanks in advance

  • How to set BO SDK path and classpath in cmd

    Hi,
    I am new to BO sdk .. I am working on BO XIR2 SDK. I need to run the java program using command prompt. In lib directory of the BO SDK, I have jar files.Could anybody let me know how to set the path, classpath related to BO SDK in command prompt?
    Regards,
    Nisha

    Hi Nisha,
    Use like this
    set path=%PATH%;C:\Program Files\Java\jdk1.6.0_30\bin
    set CLASSPATH=%CLASSPATH%;D:\javaprograms\JAR Files\sqljdbc4.jar
    cd C:\Program Files\Java\jdk1.6.0_30\bin
    java happy2
    In  line1 : We are setting the Path
        line2 : We are setting Classpath
        line3 : Navigating to actual execution directory
        line4 : Executing the actual java class file
    Hope this helps!
    Regards,
    Mani

  • How to set packages and classpath

    Hi,
    I want to know about packages and classpath. I have these questions
    1, If I put a class in a package(work.util) is it necessary to put the java file in the same directory/directory hierarchy as mentioned in the package declaration. I have to compile this class, run it from main method and must be able for other classes to import.
    2. If a package have subpackages(work.util.db) do I have to set the classpath to subdirectory also to run that class.
    3. If a class is in package is it possible to run the class without prefixing the package name. I need to do this in the text editor so that I can run any program by pressing a hot key.
    rgds
    Antony Paul

    1, If I put a class in a package(work.util) is it
    necessary to put the java file in the same
    directory/directory hierarchy as mentioned in the
    package declaration.Strictly speaking, this isn't covered by the spec - it depends on what compiler and ClassLoader you are using. If you're using Sun's JDK, then yes.
    2. If a package have subpackages(work.util.db) do I
    have to set the classpath to subdirectory also to run
    that class. No. You should add the directory above work/util/db to your classpath. You should not add work, or work/util or work/util/db.
    E.g., if your Java files are in C:/MyProject/JavaSrc/work/util/db, and the package name is work.util.db, then you should have C:/MyProject/JavaSrc on your classpath (or have "." (dot) on your classpath, and compile and run from that same directory).
    3. If a class is in package is it possible to run the
    class without prefixing the package name. I need to do
    this in the text editor so that I can run any program
    by pressing a hot key.If you mean "in order to run work.util.db.Main do I need to type java work.util.db.Main, or just java Main", then you do indeed need the fully qualified class name (otherwise, how would the runtime environment know which class you mean? - there could be any number of classes called Main in any class, and it would have to search every directory and subdirectory on your classpath to find them.

  • How to remove "About this Page" and "Privacy Statement" on a OA page

    Hi,
    How do i remove "About this Page" and "Privacy Statement" links at the bottom of an OA page and add "Close Window" link on the top right corner of OA page.
    Please help.
    Advance thank
    Pavan

    Hi,
    1. Select Personalize Page link at top right of page.
    2. Select Choose context button.
    3. In the scope drop down box select OA Footer.
    4. Click on apply.
    5. Expand privacy.
    6. Click on personalize pencil icon.
    7. Set Rendered property to false at required level.
    8. Click on apply.
    9. Click on Return to Application link.
    thanx
    Pratap

  • Question about setting cookies and custom authentication

    I have a question about setting cookies.
    I have two different 'projects' in HTMLDB - we will call them App1 and App2.
    I also have two different connection configurations setup in the DADs.conf file. - we will call them Connect1 and Connect2.
    App1 is setup to use database authentication (no user is specified in the DAD) and uses Connect1. Once the user successfully logs in, we set a username cookie (this is a persistent connection).
    We created a custom authenticatoin scheme for App2 - this scheme checks for the username cookie (set by App1). We would like for App2 to use Connect2 (HTMLDB_PUBLIC_USER is the default user specified and it uses connection pooling).
    Is it possible to set a cookie from App1, Connect1 for App2, Connect2 - then redirect to App2 and pick up that cookie?
    Here is an example of what we are trying to accomplish:
    A user loggs into App1, we set a cookie, and the user is redirected to App2. If the cookie exists, we allow them access to the home page in App2, if no cookie, we redirect back to a 'Login Failed' page in App1. We don't want App2 to use the same database connection as App1 though, we need App2 to use connection pooling.
    Is this possible? OR...Is there a better way to accomplish what we want to do?
    This is an enhancement to an existing app. Our requirements are to use Database Authentication (setup where pass expires after 60 days or so, cannot reuse last 3 passwords, etc.) - which is already setup and being used by other applications in our organization. All of our users have accounts in the database. We don't want users to have a new username/pass - and we don't want to manage a separate group for HTMLDB apps.
    The existing application uses HTMLDB's built in authentication - which uses database username/pass, and it uses connection pooling, but we cannot handle the pass expire stuff in it, unless there's something we're not seeing or understanding - at least that's how our DBA explained it to us.
    Any help with this will be appreciated so much. I can send you the code we have if needed.
    Thanks!

    Same problem here.  I have so many problems with this remote app.  Is there an iTunes API? I would like to write my own remote app that actually works.

  • 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

Maybe you are looking for

  • CRM_UI pointing to wrong port while broadcasting any report

    Dears, Our BI team is facing one starnge issue in CRM_UI. Earlier we were using port 50001 to access CRM_UI but now we changed it port to 443XX. So I CRM_UI is working fine and we are able to see BI report on it but when we click on send it takes us

  • Difference between enterprise metrics and interactive reporting

    All,<BR>I am looking for a tool which can handle the KPIs, traffic signalling,digital cockpit etc. Which one is better either enterprise metrics or interactive reporting.I feel interactive reporting has has more scripting on this. Does enterprise met

  • Where are the extensions for versions older than CS6?

    When I go to the Adobe Exchange at https://www.adobeexchange.com/, the only clickable option I see is to download Adobe Exchange panel for CS6. Since I'm running CS5.5 for Mac, this won't install. There's no search feature. When I go to http://www.ad

  • Web Service Security Performance

    Hello, how can I test the performance of a Web Service over SSL and the same Web Service with WS-Security? Does anyone know how?

  • Need new iTunes, but it causes problems

    iTunes 6.0.2 had been causing an error on my computer "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience...". I solved that problem by removing the iPod and iTunes software that I had downloaded from this site an