How do i set thae class path

i have a folder javaex and helloworld program is in this folder.but after compilation it is showing java.lang.NoClassDefFound error..so how to set the classpath in windows just tell me

no, it's not your path, it's my path.

Similar Messages

  • How can I set Java class path right?

    After I downloaded Java Developer for 10.6 (10M3239a) (Disk Image) 139.4 MB,
    when I opened eclipse it showed 2 errors
    The project cannot be built until path errors are resolved
    Unbound classpath container: 'JRE System Library [Java-1.7]'
    how can i resolve this problem.
    can someone please help me, i am really new to these stuffs.

    I have the exact same problem. I'll try to find out but if someone could help us it would be grate.
    In my error message it says:
    The project cannot be built until path errors are resolved
    Unbound classpath container: 'JRE System Library [JavaSE-1.6]

  • OK - I can set the Class Path. Now - what else?

    Dear all,
    I read with interest the many posts in this forum debating whether to use an IDE for your Java development, or to use some other (more primitive????) means of crafting code - notepad for example. As I understand things:
    If I use notepad and the command line to build, run, and compile my classes, then I will hopefully come to learn and understand how to set my class path correctly, and gain an insight into the environment in which I work - an insight moreover, that I might not happen upon if I leave an IDE to do all this for me. Ok - fine, I can use my IDE, but also do some testing on the command line to fill this gap in my knowledge.
    If I use an IDE to help me build my UIs, then it is more than likely that I will progress through life without a profound knowledge or understanding of layout managers, cell renderers, event handelers etc. OK - this is fine too, and I have decided to craft my UI 'by hand' because I want a broad appreciation of Swing and anyway, after the initial pain (akin, I imagine, to child birth), it's not so bad really.
    Now I feel I am cooking. I understand my environment, and the more esoteric features of Swing; I use my IDE to fashion my code - it's cool and helps me with code completion, and direct access to the API documentation as I type, and it does a whole bunch of refactoring stuff too.
    I feel as if I am getting the best from both worlds now.
    Would anyone argue against an approach such as this?

    ChuckBing wrote:In general, a good approach. You're correct, using the IDE will make life easier.
    What you have to watch out for is using it as a crutch. If it ever does something that you can't do, or don't know why it's doing "that", then you aren't learning. The next time "that" has to be done, if the IDE isn't available to do "that" for you, you're dead.
    Then you'll be posting the "how do I do that outside the IDE" question here.
    Make a promise to yourself: You'll learn why and what the IDE does, and read the API's - A lot!Yes, I agree Chuck. I am not comfortable with a tool doing something for me which I don't understand; which is one of the reasons I build the UIs by hand.
    I also become somewhat downcast when I see people in the forums requesting code so they can simply paste it into their aplpications. Learning can be painful, but it is a necessary pre-requisiite to knowledge in my view - so copy/paste can be a most harzardous thing.
    I am hoping this thread will be a small guide to new folk.
    Thank you for your input,
    Steve

  • Simple question about environment variables and setting the class path???

    ok I have been trying for a few months now ontrying to set the class path..
    I work with windows vista..
    on the environment variables user variables,
    I have the name of the variable as class
    and the value as C:\Program Files\Java\jdk1.6.0_04\bin;.
    where javac is...
    on the system variables I have
    its name as class
    and the value as C:\Program Files\Java\jdk1.6.0_04\bin;.
    why is this not reading javac

    The PATH environment variable should have as an entry the directory containing your javac executable. The CLASSPATH should have have entries which define your library directories and entries which are your jar file libraries. In the early days, probably the only CLATHPATH entry you will need will be a '.' to indicate the current directory.
    The Java tutorial covers ALL of this.

  • How to set the class path?-

    my forlder is :C:\Documents and Settings\india
    jdk is in:C:\Program Files\Java\jdk1.5.0_11\bin
    can any body can help me to create a classpath for my folder?

    An alternative - as stated in reply 2 in your other thread on this topic: http://forum.java.sun.com/thread.jspa?threadID=5170470 - is not to set the CLASSPATH environment variable at all. Use the -classpath switch instead.
    As the documentation linked to in that reply points out: "The class search path (more commonly known by the shorter name, "class path") can be set using either the -classpath option when calling a JDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value."
    As always, the documentation is worth reading; the available command line options worth using.

  • Setting the Class Path

    Hi guys,
    I am having problems using Textpad to run my java programs. It compiles java programs, but it doesn't allow me to run the programs. It comes up the error;
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloApp1
    I was having the same problem when I tried to run my java programs on command prompt. To solve this I resorted to using -cp to set the classpath to the directory where my java apps were located. The path in the environment variables is pointing towards my java bin directory, so that isn't the problem. Can someone tell me how I can set my classpath permantly and where I should point the directory to, so that i can run my java progs on Textpad.
    Thank You
    Jaz

    Can
    someone tell me how I can set my classpath permantly
    and where I should point the directory toYou shouldn't use the CLASSPATH environment variable to run programs. You should always use the -classpath option for javac and java--even when you don't need to specify a path. If you don't need to specify a path, then write: -classpath "". The -classpath option overrides the CLASSPATH environment variable, which is what you want. Otherwise, you will never figure out how to compile different files.
    so that i
    can run my java progs on Textpad.
    I have a similar editor, and I was able to set it up to run simple, one file programs without package statements when I click a button. Your best bet is to find a Textpad discussion forum and ask how you can set it up to execute java programs. Or, check the help in Textpad.

  • How to find packages using class path

    how to list all the packages in my class path using a java program?
    for eg. if the class path is c:\ajay;
    and ajay contains two folders pack1(i.e a package) and pack2(i.e a general folder not a package)
    in pack1 there are 2 java file which has package pack1; as their first statement.
    in pack2 there are two java file which does not contain package statement.
    so can i identify between pack1 which is a package and pack2 which is a general folder

    I don't think there's any real way to distinguish a package from an "ordinary directory" except by checking if for *.class files.
    Probably you want to use a recursive method to walk the direcotories, calls itself tor each sub-directory found.

  • How do i set source/swc path to online libraries in flash cc?

    hi,
    i want to publish online a .swf that uses away3d library,
    but if in actionscript setting i put the link to the file online (http://.../.swc) , it appears a warning message saying that the path is not valid...
    also in another case (involving source jpgencoder.as).. but working fine if i publish it with flash cs5...

    Hi Debu,
    I just want to add another step to the steps you have mentioned
    1)Shutdown the EM Website, OC4J instance, dcm, etc.
    2)Then modify this file.
    3)Run the dcmctl updateconfig to update the repository after this file is modified
    4)Run opmnctl reload to apply changes of opmn.xml to opmn
    5)Restart EM Website and restart the OC4J instance
    I was not able to set the library path without doing the opmnctl reload.
    Thanks,
    Harini

  • How to set a class path in atuoexec.bat

    hello friends,
    How to set a classpath in autoexec.bat file. pls sent a path setting techniques to me.
    my JDK1.2 in "c dirve" so what can i do
    help me
    davipet

    What is your OS?
    If it is 95 or 98,
    add SET CLASSPATH=C:\Jdk1.2\lib\tools.jar;.; to your autoexec.bat file.

  • JGRASP 1.8.3 Help me set up class Path

    I have a package called jpb in a folder called jpb with two files: SimpleIO.java and Convert.java. I want all my .java files to be able to see these files every time I compile. I tried apprehend the path to C:\jpb but Jgraps keeps complaining the package doesn't exist. WHat can I do?

    Learning to know how classpath works is essential to Java programming. Your First Cup of Java

  • How do I set the install path for acrobat (the free reader)?

    I cannot find any place during the download/install process where I can choose the install path.
    How do I do it? The software works fine, I just don't want it at that location.

    I appreciate your help.
    To sum it up, what I hear is that theoretically it might be possible to save some space, but that initially it wont be that much and over time it might be a very small portion of the total amount.
    I am also indirectly hearing: "No, you cannot choose an install path"
    Thanks again for your help.

  • Regarding class path setting

    Hi,
    I am new to java How can i Set a class path in my sytem to run java programs and tomcat and ant .
    I declated like below in Environment varialble.
    JAVA_HOME
    c:\javasdk\jdk\jre\ext;C;\javasdk\bin;
    ANT_HOME
    c:\ant\bin;
    CATALINA_HOME
    C:\tomcat\bin;c:\tomcat\common\bin;
    when I am running the startup.bat in commandprompt the it showedd me aan error like this.
    CATALINA_HOME environment variable is not deffined correctly, this environment variable is needed to run thhis proram.
    when I am running the ANT then it showed me an error like this.
    build.xml file does not found. But i Wrote the build.xml file in ant\bin.
    Please let me know the where is sthe mistake. It is very urgent to me.

    I love all these questions that go "I'm really new to Java, so new I don't even know how to set or use a classpath. How do I get my application server to work?"
    Like a first-week med student trying a heart transplant

  • How do you set a classpath?

    thanks to yawmark. To resolve this I must put LottoNumber in my classpath.
    How is this done? Is this done in the program or in the path statement in Windows.
    Thanks and Merry Christmas
    lottery.java:73: cannot resolve symbol
    symbol : class LottoNumber
    location: class lottery
    public static boolean duplicateLottoNumbers(int current, LottoNumber[] lottoArray)
    ^
    lottery.java:86: cannot resolve symbol
    symbol : class LottoNumber
    location: class lottery
    public static void insertionSort(LottoNumber[] lottoArray)
    ^
    lottery.java:31: cannot resolve symbol
    symbol : class LottoNumber
    location: class lottery
    LottoNumber[] lotteryNumberArray = new LottoNumber[5];
    ^
    lottery.java:31: cannot resolve symbol
    symbol : class LottoNumber
    location: class lottery
    LottoNumber[] lotteryNumberArray = new LottoNumber[5];
    ^
    lottery.java:37: cannot resolve symbol
    symbol : class LottoNumber
    location: class lottery
    lotteryNumberArray = new LottoNumber();
    ^
    lottery.java:89: cannot resolve symbol
    symbol : class LottoNumber
    location: class lottery
    LottoNumber index;
    ^
    6 errors
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    Here is the code
    // Special thanks to Jim McElroy for his Input
    import javax.swing.*; // loads the gui
    public class lottery{
    public static void main(String[] args)
    final int MAX = 49; // Highest number in Lottery according to our assignment
    final int YES = 0; // for the Do While Loop
    int response; // what the user chooses
    // An array to hold the lottery numbers
    LottoNumber[] lotteryNumberArray = new LottoNumber[5];
    // create the 5 lottery number objects in the array
    for(int i =0; i < lotteryNumberArray.length; i++)
    lotteryNumberArray = new LottoNumber();
    do // a Do While loop to start the program
    for(int i = 0; i < lotteryNumberArray.length; i++)
    do
    lotteryNumberArray.changeNumber(MAX);
    while(duplicateLottoNumbers(i, lotteryNumberArray) == true);
    // this is for sorting
    insertionSort(lotteryNumberArray);
    // This is a Message area for a Dialog Box
    String messageDialog = "Your Five Lottery Numbers Are: \n";
    for(int i = 0; i < lotteryNumberArray.length; i++)
    messageDialog += lotteryNumberArray.getNumber() + " ";
    messageDialog += "\n\n AIU ITP 630 Lottery \n";
    messageDialog += " **** David Bass **** \n";
    JOptionPane.showMessageDialog(null, messageDialog);
    response = JOptionPane.showConfirmDialog(null, "Would you Like Five More Numbers?", null, 0);
    while(response == YES); // This ends the loop if they choose yes
    // This checks for duplicate numbers
    public static boolean duplicateLottoNumbers(int current, LottoNumber[] lottoArray)
    for(int i = current; i > 0; i--)
    if(lottoArray[current].getNumber() == lottoArray[i-1].getNumber())
    return true;
    return false;
    public static void insertionSort(LottoNumber[] lottoArray)
    int i, j;
    LottoNumber index;
    for (i=1; i < lottoArray.length; i++)
    index = lottoArray;
    j = i;
    while ((j > 0) && (lottoArray[j-1].getNumber() > index.getNumber()))
    lottoArray[j] = lottoArray[j-1];
    j = j - 1;
    lottoArray[j] = index;

    Refer to this: http://forum.java.sun.com/thread.jsp?forum=31&thread=476627
    How do I set the Class Path?Serious question: Are you trying to learn Java, or JGrasp? If you're trying to learn JGrasp, check the docs - I'm not familiar with that tool. If you're trying to learn Java, get out of JGrasp and use a text editor and the command line. From there, classpaths and compiling are a cinch.
    javac -classpath . YourClassName.java

  • How to set class path for mysql

    hai, I have been trying to make a java program read from mysql database. but i don't know how to set the class path for mysql-connector-java-5_1_.0.6-bin. i set the class path in system variable as C:\Program Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-java-5_1_.0.6-bin.
    in the command prompt, i compile C:\javac abc.java and run java abc.
    when run it come out error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    i am using Window xp. can anybody help me??? TQ.

    hai, I have been trying to make a java program read
    from mysql database. but i don't know how to set the
    class path for mysql-connector-java-5_1_.0.6-bin. i
    set the class path in system variable as C:\Program
    Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-jav
    a-5_1_.0.6-bin.
    in the command prompt, i compile C:\javac abc.java
    and run java abc.
    when run it come out error
    java.lang.ClassNotFoundException:
    com.mysql.jdbc.Driver
    i am using Window xp. can anybody help me??? TQ.Right click on my computer icon,
    Goto properties->advanced->environment variables.
    Look for 'classpath' under system variable.
    Select it and click edit.
    put ';' and path of the mysql connector jar at the end
    suppose if u have jar file under d:/driver/mysqlconnector.jar
    thn put this value in variable value text box
    ;d:/driver/mysqlconnector.jar
    or simply put ur driver jar file in jre/lib/ext folder
    D:\j2sdk1.4.2_03\jre\lib\ext
    [Servlet tutorial|http://www.jsptube.com]

  • How do I set class path for 3rd-party classes?

    Hello, I need to know how to set the classpath so that I can use the apache's third-party lang classes. I downloaded commons.apache.org/lang/download_lang.cgi. And I need to know next steps. Move the unzipped files to which location? And type what commands?
    Thanks, Melissa

    Hi, it's not the server that I am running. My instructor told me to download an apache class file for the Apache Lang library and then set my class path to point to the executable. Her instructions are for Windows users, however. I need to do something in the terminal shell but I don't know precisely what.
    mg

Maybe you are looking for

  • Problem in mapping: aba_bupa_map_ddic_to_proxy   ( CRM - EEW - proxy - XI )

    Hi there, I have a problem on CRM 5.0 using XI with ABAP proxy and data type enhancement together with generated code from eew (enhanced but000). To use the ABAP proxy, BUPA_OUTBOUND_MAIN and REL are activated (in my case ZBUPA_... without additional

  • Opening p65 files in Indesign CS 3.0.1

    I am having trouble converting or opening an old pagemaker 6.5 file into an Indesign file. Error message says I maybe missing an add on. Thanks Dan

  • Updated Internet, old hardware

    Ah, where to begin. A few months back I changed my service from triple Play to double play and upgraded my Internet speed. My first bill after the change was doubled. After calling for three months in a row and being being told different answers each

  • Erro message when attempting to use versamail.​..Please help!!!!

    When I go to appllications and select the email (versamail) option, I get the following error message: "MMUpgrade.prc could not be found. Reinstall the Palm desktop or find and install the .prc onto your Palm Device." i re-install palm desktop on my

  • Installation problem - admin login

    Installing CFMX 7 on Win XP Pro with IIS. I have run the installer with apparent success, but on logging in to the administrators page the migration/configuration wizard starts then returns to the login page. I've tried installing with the developer