Very new to Java!!! HELP!!!!

very simple, how do I set everything up in Windows XP????
it doesn't seem to work for me!
I tried to run javac.exe and java.exe it just goes to command prompt and then disappears!!!!!!! AHHHHHHHHHH!!! help!
thanks

i get the error when I run the helloworldapp
this: C:\documents and settings\hanamachi\java stuff>
java HelloWorldApp
Exception in thread "main"
java.lang.NoClassDefFoundError: HelloWorldApp
huh???You didn't follow the directions carefully, particularly the part about setting your classpath. You can remedy this in the short term by using the following command:
java -cp . HelloWorldAppI highly recommend you go back through the instructions, though, and follow them very carefully.

Similar Messages

  • Writting Tools for Java (Very new to java HELP!!!!)

    It's hard to write a java applet using a windows notepad, because I must to save as a *.java files, open a msdos prompt type (javac *.java), and run it (very inefficinet :( ).
    Doesn't like Vb, notepad didn't alert me if I make a mistake like this :.
    --System.out.println("good")
    --Sistem.out.println(":( wrong)
    HELP ME PLEASEEEEE!!!!

    Forte, where can I download it from?Link to Forte (now called Sun One Studio 4):
    http://wwws.sun.com/software/sundev/jde/index.html
    Link to JCreator (a text editor):
    http://www.jcreator.com/
    Link to search results on Google.com:
    http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=java+ide%2Ceditor

  • Very new to java please help

    i'm very new to java and i'm getting an error in my application. i took 4 applications that compiled and worked separatly and i tried to combine them into one application. i'm getting the error: unreported exception java.io.IOException; must be caught or declared to be thrown, in lines 73,78,83,88,120,146,149,152,155 in the and it points at the keyboard.readLine() but everything i've tried just gives me more errors. please help anything and everything will be greatly appreciated. here it is, sorry about format i dunno how to straighten it in here:
    // ^ ^
    //               (0)(0) A Happy Piggy Application
    // Problems: 2.6,2.8,2.9,2.12 (oo)
    // An application finds the total number of hours, minutes, & seconds, finds the distance
    // between two points, finds the volume and surface area of a sphere, and adds up the change
    // in a jar. First, the total hours, minutes, and seconds problem.
    import java.io.*;
    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    public class twoptsix
         static BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
         static PrintWriter screen = new PrintWriter(System.out, true);
         public static void main (String[] args) throws IOException
              double hoursa, minutesa, secondsa;
              String hours;
              System.out.print ("Please enter a number of hours: ");
    hours = keyboard.readLine();
    hoursa = Double.parseDouble(hours); //asks programmer friendly user to enter hours
    String minutes;
    System.out.print ("Please enter a number of minutes: ");
    minutes=keyboard.readLine();
    minutesa = Double.parseDouble(minutes); //asks programmer friendly user to enter minutes
    String seconds;
    System.out.print ("Pretty please enter a number of seconds: ");
    seconds = keyboard.readLine();
    secondsa = Double.parseDouble(seconds); //asks programmer friendly user to enter seconds
    double allseconds;
    allseconds = (hoursa * 3600) + (minutesa * 60) + secondsa; //adds up all the seconds of the time entered
    System.out.println ("You have: " + hours + " hours..."); //displays hours
    System.out.println ("" + minutes + " minutes..."); //displays minutes
    System.out.println ("and " + seconds + " seconds..."); //displays seconds
              System.out.println ("to get whatever you need to done!"); //witty attempt at humor
    System.out.println ("The total amount of seconds is: " + allseconds + " seconds."); //displays total seconds
    // An application that finds the distance between two points when the points
    // are given by the user.
              double x1, x2, y1, y2, total, distance;
              String xa;
              System.out.print ("Please enter the 'x' coordinate of first point: ");
              xa = keyboard.readLine();
              x1 = Double.parseDouble(xa); //asks programmer friendly user to enter first x value
              String ya;
              System.out.print ("...also need the 'y' coordinate of first point: ");
              ya = keyboard.readLine();
              y1= Double.parseDouble(ya); //asks programmer friendly user to enter first y value
              String xb;
              System.out.print ("...and the 'x' coordinate of the second point: ");
              xb = keyboard.readLine();
              x2 = Double.parseDouble(xb); //asks programmer friendly user to enter second x value
              String yb;
              System.out.print ("...don't forget the 'y' coordinate of the second point: ");
              yb = keyboard.readLine();
              y2 = Double.parseDouble(yb); //asks programmer friendly user to enter second y value
              total = Math.pow(x2 - x1, 2.0) + Math.pow(y2 - y1, 2.0); //squares the differences of values
              distance = Math.sqrt(total); //finds the square root of the sum of the differences of the values
              System.out.print ("E=mc^2...oh and,");
              System.out.print ("the distance between point (" + xa +"," + ya +") and point("+
              xb + "," + yb + ") is : " + distance);
    // An application that takes the radius of a sphere and finds and prints
    // the spheres volume and surface area.
              double radius,volume,area;
              String rad;
              System.out.print("Please enter the radius of a sphere: ");
              rad = keyboard.readLine();
              radius = Double.parseDouble(rad); //asks programmer friendly user to enter the radius of a sphere
    DecimalFormat fmt = new DecimalFormat ("0.####");
              volume = ((4 * Math.PI * Math.pow(radius,3.0)) / 3) ;
              System.out.println (" The sphere has a volume of:" + fmt.format(volume)); //finds and displays volume
              area = ( 4 * Math.PI * Math.pow(radius, 2.0)) ;
              System.out.print (" The Surface Area of the sphere is: " + fmt.format(area)); //finds and displays surface area
    // An application that finds the total, in dollars and cents, of a number of quarters,
    // nickels, dimes, and pennies in your piggy bank.
              int pennies, nickels, dimes, quarters;
              double money1;
              screen.println("Empty your piggy bank and count the change, how many quarters ya have?: ");
              int q = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of quarters
              screen.println("How many dimes?: ");
              int d = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of dimes
              screen.println("How many nickels?: ");
              int n = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of nickels
              screen.println("How many pennies?: ");
              int p = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of pennies
              NumberFormat money = NumberFormat.getCurrencyInstance();
              money1 = (.25 * q) + (.1 * d) + (.05 * n) + (.01 * p);
              screen.println("You're rich! Total, you've got: " + money.format(money1));//finds and displays total money

    Ok here is the working code as one long function:
    // ^ ^
    // (0)(0) A Happy Piggy Application
    // Problems: 2.6,2.8,2.9,2.12 (oo)
    // An application finds the total number of hours, minutes, & seconds, finds the distance
    // between two points, finds the volume and surface area of a sphere, and adds up the change
    // in a jar. First, the total hours, minutes, and seconds problem.
    import java.io.*;
    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    public class twoptsix
        static BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
        static PrintWriter screen = new PrintWriter(System.out, true);
        public static void main (String[] args) throws IOException
    double hoursa, minutesa, secondsa;
    String hours;
    System.out.print ("Please enter a number of hours: ");
    hours = keyboard.readLine();
    hoursa = Double.parseDouble(hours); //asks programmer friendly user to enter hours
    String minutes;
    System.out.print ("Please enter a number of minutes: ");
    minutes=keyboard.readLine();
    minutesa = Double.parseDouble(minutes); //asks programmer friendly user to enter minutes
    String seconds;
    System.out.print ("Pretty please enter a number of seconds: ");
    seconds = keyboard.readLine();
    secondsa = Double.parseDouble(seconds); //asks programmer friendly user to enter seconds
    double allseconds;
    allseconds = (hoursa * 3600) + (minutesa * 60) + secondsa; //adds up all the seconds of the time entered
    System.out.println ("You have: " + hours + " hours..."); //displays hours
    System.out.println ("" + minutes + " minutes..."); //displays minutes
    System.out.println ("and " + seconds + " seconds..."); //displays seconds
    System.out.println ("to get whatever you need to done!"); //witty attempt at humor
    System.out.println ("The total amount of seconds is: " + allseconds + " seconds."); //displays total seconds
    // }  <----- MAIN FUNCTION USED TO END HERE!!!
    //but we want to keep going so remove the bracket!
    // An application that finds the distance between two points when the points
    // are given by the user.
    // {  <-- other function used to start here, but now it continues
    double x1, x2, y1, y2, total, distance;
    String xa;
    System.out.print ("Please enter the 'x' coordinate of first point: ");
    xa = keyboard.readLine();
    x1 = Double.parseDouble(xa); //asks programmer friendly user to enter first x value
    String ya;
    System.out.print ("...also need the 'y' coordinate of first point: ");
    ya = keyboard.readLine();
    y1= Double.parseDouble(ya); //asks programmer friendly user to enter first y value
    String xb;
    System.out.print ("...and the 'x' coordinate of the second point: ");
    xb = keyboard.readLine();
    x2 = Double.parseDouble(xb); //asks programmer friendly user to enter second x value
    String yb;
    System.out.print ("...don't forget the 'y' coordinate of the second point: ");
    yb = keyboard.readLine();
    y2 = Double.parseDouble(yb); //asks programmer friendly user to enter second y value
    total = Math.pow(x2 - x1, 2.0) + Math.pow(y2 - y1, 2.0); //squares the differences of values
    distance = Math.sqrt(total); //finds the square root of the sum of the differences of the values
    System.out.print ("E=mc^2...oh and,");
    System.out.print ("the distance between point (" + xa +"," + ya +") and point("+
         xb + "," + yb + ") is : " + distance);
    //second function used to end here...
    //} <--- COMMENT OUT BRACKET SO WE CONTINUE
    // An application that takes the radius of a sphere and finds and prints
    // the spheres volume and surface area.
    //{ <--- ANOTHER ONE TO COMMENT OUT
    double radius,volume,area;
    String rad;
    System.out.print("Please enter the radius of a sphere: ");
    rad = keyboard.readLine();
    radius = Double.parseDouble(rad); //asks programmer friendly user to enter the radius of a sphere
    DecimalFormat fmt = new DecimalFormat ("0.####");
    volume = ((4 * Math.PI * Math.pow(radius,3.0)) / 3) ;
    System.out.println (" The sphere has a volume of:" + fmt.format(volume)); //finds and displays volume
    area = ( 4 * Math.PI * Math.pow(radius, 2.0)) ;
    System.out.print (" The Surface Area of the sphere is: " + fmt.format(area)); //finds and displays surface area
    // } <----- COMMENTED OUT FOR THE SAME REASON
    // An application that finds the total, in dollars and cents, of a number of quarters,
    // nickels, dimes, and pennies in your piggy bank.
    //{ <----AND ANOTHER
    int pennies, nickels, dimes, quarters;
    double money1;
    screen.println("Empty your piggy bank and count the change, how many quarters ya have?: ");
    int q = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of quarters
    screen.println("How many dimes?: ");
    int d = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of dimes
    screen.println("How many nickels?: ");
    int n = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of nickels
    screen.println("How many pennies?: ");
    int p = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of pennies
    NumberFormat money = NumberFormat.getCurrencyInstance();
    money1 = (.25 * q) + (.1 * d) + (.05 * n) + (.01 * p);
    screen.println("You're rich! Total, you've got: " + money.format(money1));//finds and displays total money
    }P.S. To make the code formatted better put [ code ] before and [ /code ] after. It's not perfect, but a little better...

  • Convert C++ prog into Java( I m new in java)help urgent

    hi all,
    i am very new in java. i have code of C++.i have to convert it in to Java.please help me on urgent basis.plz provide me solution.
    I am looking for positive response.code is below:
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <sys/stat.h>
    #include <fstream.h>
    #include <iostream.h>
    //#include <sha.h> //24112003
    //#include<wincrypt.h>
    char ntc(unsigned char n){
    if (n<26) return 'A'+n;
    if (n<52) return 'a'-26+n;
    if (n<62) return '0'-52+n;
    if (n==62) return '+';
    if (n==63)return '/';
    unsigned char ctn(char c){
    if (c=='/') return 63;
    if (c=='+') return 62;
    if ((c>='A')&&(c<='Z')) return c-'A';
    if ((c>='a')&&(c<='z')) return c-'a'+26;
    if ((c>='0')&&(c<='9')) return c-'0'+52;
    if (c=='~') return 80;
    return 100;
    int b64decode(char from,char to,int length){
    unsigned char c,d,e,f;
    char A,B,C;
    int i;
    int add;
    char *tot=to;
    for (i=0;i+3<length;){
    add=0;
    A=B=C=0;
    c=d=e=f=100;
    while ((c==100)&&(i<length)) c=ctn(from[i++]);
    while ((d==100)&&(i<length)) d=ctn(from[i++]);
    while ((e==100)&&(i<length)) e=ctn(from[i++]);
    while ((f==100)&&(i<length)) f=ctn(from[i++]);
    //if (f==100) return -1; /* Not valid end */
    if (c<64) {
    A+=c*4;
    if (d<64) {
    A+=d/16;
    B+=d*16;
    if (e<64) {
    B+=e/4;
    C+=e*64;
    if (f<64) {
    C+=f;
    to[2]=C;
    add+=1;
    to[1]=B;
    add+=1;
    to[0]=A;
    add+=1;
    to+=add;
    if (f==80) return to-tot; /* end because '=' encountered */
    return to-tot;
    int b64get_encode_buffer_size(int l,int q){
    int ret;
    ret = (l/3)*4;
    if (l%3!=0) ret +=4;
    if (q!=0){
    ret += (ret/(q*4));
    /* if (ret%(q/4)!=0) ret ++; */ /* Add space for trailing \n */
    return ret;
    int b64strip_encoded_buffer(char *buf,int length){
    int i;
    int ret=0;
    for (i=0;i<length;i++) if (ctn(buf)!=100) buf[ret++] = buf [i];
    return ret;
    int b64encode(char from,char to,int length,int quads){
    // 3 8bit numbers become four characters
    int i =0;
    char *tot=to;
    int qc=0; // Quadcount
    unsigned char c;
    unsigned char d;
    while(i<length){
    c=from[i];
    *to++=ntc(c/4);
    c=c*64;
    i++;
    if (i>=length) {
    *to++=ntc(c/4);
    *to++='~';
    *to++='~';
    break;
    d=from[i];
    *to++=ntc(c/4+d/16);
    d=d*16;
    i++;
    if (i>=length) {
    *to++=ntc(d/4);
    *to++='~';
    break;
    c=from[i];
    *to++=ntc(d/4+c/64);
    c=c*4;
    i++;
    *to++=ntc(c/4);
    qc++; /* qz will never be zero, quads = 0 means no linebreaks */
    if (qc==quads){
    *to++='\n';
    qc=0;
    /* if ((quads!=0)&&(qc!=0)) to++='\n'; / /* Insert last linebreak */
    return to-tot;
    char* mEncryptPassword(char* mPassword)
    char mEncryptedPassword[200]; // To hold encrypted password.
    //char* mEncryptedPassword = new char[200];
    char mPrimEncryptedPassword[200];
    char * temp = new char[200];
    //unsigned char* md; // 19122003
    //md = new unsigned char[100]; // 19122003
    memset(mEncryptedPassword, '\0', sizeof(mEncryptedPassword));
    memset(mPrimEncryptedPassword, '\0', sizeof(mPrimEncryptedPassword));
    strcpy(mPrimEncryptedPassword, mPassword);
    //strcpy(mPrimEncryptedPassword, (char*) SHA1((unsigned char*) mPassword, strlen(mPassword), NULL));
    //strcpy(mEncryptedPassword, (char*) SHA((unsigned char*) mPassword, strlen(mPassword), md)); // 19122003
    //strcpy(mEncryptedPassword, (char*) SHA((unsigned char*) mPassword, strlen(mPassword), md)); //19122003
    b64encode(mPrimEncryptedPassword, mEncryptedPassword, strlen(mPrimEncryptedPassword), 0);
    // If successfully encrypts..
    if (mEncryptedPassword != NULL)
    //char * temp = new char[strlen(mEncryptedPassword)+1];
    strcpy(temp,mEncryptedPassword);
    // strcpy(mRetVal,mEncryptedPassword);
    return (char*)temp;
    //return (mEncryptedPassword);
    //return (char*) md; // 19122003
    else
    return ("Error");
    char* mDecryptPassword(char* mPassword)
    char mDecryptedPassword[200]; // To hold decrypted password.
    char mPrimDecryptedPassword[200];
    char * temp = new char[200];
    // 02032007
    memset(mDecryptedPassword, '\0', sizeof(mDecryptedPassword));
    memset(mPrimDecryptedPassword, '\0', 200);
    strcpy(mPrimDecryptedPassword, mPassword);
    b64decode(mPrimDecryptedPassword, mDecryptedPassword, strlen(mPrimDecryptedPassword));
    // If successfully decrypts..
    if (mDecryptedPassword != NULL)
    //char * temp = new char[strlen(mEncryptedPassword)+1];
    strcpy(temp,mDecryptedPassword);
    // strcpy(mRetVal,mDecryptedPassword);
    return (char*)temp;
    //return (mEncryptedPassword);
    //return (char*) md; // 19122003
    else
    return ("Error");
    void main(int argc, char* argv[])
    cout << mEncryptPassword(argv[1])<<endl<<flush;
    cout << mDecryptPassword(mEncryptPassword(argv[1]))<<endl<<flush;
    Anubhav

    endasil wrote:
    I just thought of how ridiculous this would sound in any other profession:
    Surgeons:
    plz plz help I have patient dying need to insert new kidney into 90yr old patient plz someone come do itLawyers:
    Help client guilty need good defense (I m new in law)help urgentHow come we get stuck with the lazy low-lifes?Because there's no legal requirement that a software developer must be licensed

  • Very New to Jave, need to do totals/subtotals

    Hi, (I hope this is the right place)
    I'm VERY new to Java (I mainly do wourk with php interfaces for MyAQL databases).
    Up until now, there hasn't been anything I couldn't do with PHP that I needed to...
    My boss recently requested subtotals/totals at various points on an input sheet. The sheet inputs numbers of people, so I'm not worried about rounding (The php already takes care of people trying to input parts of people....) or tax.
    It's a rather large form (~144 lines) and the math is already in place to do the subtotaling (among other things) before entering the information into the database.
    How would I go about writing script that would display sub totals, and recalculate them every time one of the boxes value's is modified?
    Is this something javascript is designed to do? Is there a better language out there for this task?
    I've found sites out there that have canned subtotal/total scripts, but I don't want something pre-made unless it comes with a detailed explaination of what everything does; if I'm going to maintain it, I have to understand it.
    Thanks

    Is this a web form? e.g. a html form with input fields?
    You can add onchange or onblur events to your input fields to detect changes. Then you can use javascript to retrieve the values from the form and do the calculation.
    -S

  • Very New To Java

    Hi, I'm very new to java - 2nd day. Trying to move from Visual FoxPro.
    In testing statements to learn java, I can't seem to get java.util.Scanner.nextInt or nextDouble ... etc. to wait for a keyborad input. Is there something I have to configure before utilizing ...Scanner.nextWhatever?
    I'm using the latest java (just downloaded 2 day ago) and TextPad as my editor.
    Thanks you.

    Hi Petes1234:
    Thanks for you quick response!!!!
    The following is the code very simple ... still my "Hello World!" phase of learning.
    import java.util.Scanner;
    public class ScannerApp
         static Scanner sc = new Scanner(System.in);
         public static void main(String[] args)
              System.out.print("Enter an integer: ");
              int x = sc.nextInt();
              System.out.println("You entered " + x + ".");
    }The above code complies fine. But when I try to run it, it errors out with the following error:
    Enter an integer: Exception in thread "main" java.util.NoSuchElementException
         at java.util.Scanner.throwFor(Scanner.java:838)
         at java.util.Scanner.next(Scanner.java:1461)
         at java.util.Scanner.nextInt(Scanner.java:2091)
         at java.util.Scanner.nextInt(Scanner.java:2050)
         at ScannerApp.main(ScannerApp.java:11)
    See anyting I'm doing wrong here?

  • Very new in Java pls help!!!!!!

    hello,
    i just started to learn java and trying to do my first program, but dont know why i cant do that! it asking me to set my PATH in sdk bin folder with jdk and i dont know how to do that, couse i install it in diferent folders! im trying to set c:\jdk1.6\bin;%PATH% but writing "environment variable c:jdk1.6\bin;C:\windows\system32;C:\windows;C:\windowasystem32\wbem;C;\program files\cyberlink\power2Go\C:\sun\SDK\bin not defined" help me please!!!

    - Right click 'my computer', select 'properties'.
    - Click the 'advanced' tab.
    - click the 'environmental variables' button
    Here you will find the PATH environmental variable, most likely under system variables. Add the path to the JDK bin directory here.
    Note: If you have a command prompt open while you are doing this, open a new one as the old one will not see the changes you make. To make sure the PATH is valid, open a command prompt and type:
    echo %PATH%

  • Very new user needs help setting up a three user network plus server

    Hi,
    I'm an owner/manager of a recruitment company in the UK and we use three mac minis in our office to run our recruitment software (on a filemaker database) internet, mail and MS Office 2008.
    We currently use one of the mini's as a 'server' in so much that it has a external HDD attached and shared across the network. We use Airport Extreme to share the internet.
    Although to begin with this set up has served us well the amount of data travelling across the network and the prospect of a couple of new employees starting has made me think it's time to invest in a network and server of some description.
    With my very limited knowledge i'm proposing the following but would greatly appreciate some assistance from the forum users!
    Install OSX 10.5.3 Server on one of the Mac Minis
    Get an ethernet switch and cable the three minis together
    Use the external HDD as a time machine backup and store all files on the 'server' HDD
    Continue to use the Airport Extreme to share the internet over airport.
    I have a couple of questions:
    Can the Server computer still be used as a desktop or do we need to buy a new mini
    Does this set up make the airport base station redundant
    As we grow I would envisage enlisting the help of a specialist Mac IT support company but in the mean time any help would be greatly appreciated.
    Thank you again in advance.

    I would get something better specified than a mini to be my Mac OS X based server, and although you can run it as a desktop I wouldnt advise it.
    You ought to go out and buy the book Mac OS X Server 10.5 Essentials - The only Apple-certified book on Mac OS X Server - which Ive found to be a godsend of a book in getting Leopard Server going. Make sure you get the 10.5 version. Im in the UK and got it from Foyles in London.
    Your approach is fine, but Leopard Server isnt as plug and go as the rest of Apples products. In particular it just doesnt function correctly if you do not have working DNS before you start. Period. If you dont understand DNS in your office or If having read the book you find its too technical you might be better off buying a no-brand Network File Store/Disk or even a Time Capsule from Apple if its mainly shared disk space that you need.
    Angus

  • Very new in Java

    I go start my course in Java programming,but first, because i need start from the beggining i need make one module wich gonna take me around 1 nad a half month. Because i want star more soon understand about programming i bought "Java A beginner's guide. Note i never make any kind of programming in my life. I start read the book and not found any problem my problem appears when i reach the first simple program. I get the J2SE 5 and they say the program run in command prompt but my command prompt when i open always appears c:\>documents and settings>nuno blanc i just ca,t take out that .documents and settings. i try everything what i know.
    They say is well for i use Word Pad. i use the word pad and after i dont know how to run the program witch i made. If someone able to help-me please help me here or in my mail [email protected] i want start enter in programming.
    Please!
    Thank's

    I go start my course in Java programming,but first,
    because i need start from the beggining i need make
    one module wich gonna take me around 1 nad a half
    month. Because i want star more soon understand about
    programming i bought "Java A beginner's guide. Note i
    never make any kind of programming in my life. I
    start read the book and not found any problem my
    problem appears when i reach the first simple
    program. I get the J2SE 5 and they say the program
    run in command prompt but my command prompt when i
    open always appears c:\>documents and settings>nuno
    blanc i just ca,t take out that .documents and
    settings. i try everything what i know.
    They say is well for i use Word Pad. i use the word
    pad and after i dont know how to run the program
    witch i made. If someone able to help-me please help
    me here or in my mail [email protected] i want start
    enter in programming.
    Please!
    Thank'sHi,
    Unfortunately, it's fairly difficult to get Java set up on your computer and learn to run programs. You should read the tutorial, "Your first Cup of Java":
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/
    It will lead you through the steps of installing Java and running your first program.
    Because i want star more soon understand about
    programming i bought "Java A beginner's guide. I've read the 2nd edition of that book, and I thought it was a good book. I do have previous programming experience, though. I thought it was a good, short overview of Java. Other beginning books are much longer and can get pretty complicated.
    Good luck.

  • New to java,,,help needed urgently

    I am geeting a compile error..."cannot resolve symbol" in my main class. The program is supposed to prompt the user for five sets of data, and calculate the tax and total of the entered products and print it back to the screen, it is also supposed to calculate the cheapest and most expensive item and print them back. can someone pls shed some light on this error msg, as I cant seem to get my head around it.
    import java .io.*;
    import java.util.StringTokenizer;
    import java.text.NumberFormat;
    import java.util.Locale;
    //set up a class to call on the constructors from the catalogueitem class
    public class Myassg4
         private static final int MAX = 2;//sets the length to 2
         private static CatalogueItem[] prodlist ;//sets array for product list
         NumberFormat cash = NumberFormat.getCurrencyInstance(new Locale("en","AU"));
         private static void main(String[] args) throws IOException
         {//declare the variables and initialize
         double preTotal = 0.00;
         String inString;
         double maximum, lowest;
         double sum = 0.00;
         BufferedReader stdin = new BufferedReader (new
         InputStreamReader(System.in));
         prodlist = new CatalogueItem[];//sets the length (THIS IS WHERE THE PROBLEM OCCURS!!!!)
    System.out.println("Enter 5 sets of data");
         //loop through the array and read the data in
         for(int i = 0;i <prodlist.length;i++)
              inString = stdin.readLine();
              //create a String Tokenizer to read the data separately
              StringTokenizer tok = new StringTokenizer(inString, ":");
    prodlist[i] = new CatalogueItem(tok.nextToken(), tok.nextToken(),
    Double.parseDouble(tok.nextToken()));
    }//end of loop
    //create a header and print the data back to the screen
    System.out.println();
    System.out.println("LISTING OF ALL GOODS");
    System.out.println();
    System.out.println("Cat\tDescription\tExTax\tTax\tIncTax");
    System.out.println("___\t___________\t_____\t___\t______");
    System.out.println();
    for(int j = 0;j <prodlist.length;j++){
    System.out.println(prodlist[j].getCatno()+"\t"+prodlist[j].getDesc()+
    "\t"+prodlist[j].getPrice()+"\t"+prodlist[j].getTax()
    +"\t"+prodlist[j].getIncTax());
    I have errors every where the prodlist is used, I know I am not initializing it correctly but dont know what the alternatives are.

    daniel here is the entire code if you do get a chance can you pls have a look at it for me thanks.
    import java .io.*;
    import java.util.StringTokenizer;
    import java.text.NumberFormat;
    import java.util.Locale;
    //set up a class to call on the constructors from the catalogueitem class
    public class Myassg4
         private static final int MAX = 2; //sets the length to 2
         private static CatalogueItem[] prodlist; //sets array for product list
         NumberFormat cash = NumberFormat.getCurrencyInstance(new Locale("en","AU"));
         private static void main(String[] args) throws IOException
         {//declare the variables and initialize
         double preTotal = 0.00;
         String inString;
         double maximum, lowest;
         double sum = 0.00;
         BufferedReader stdin = new BufferedReader (new
         InputStreamReader(System.in));
         prodlist = new CatalogueItem[5];//sets the length
         System.out.println("Enter 5 sets of data");
         //loop through the array and read the data in
         for(int i = 0;i <prodlist.length;i++)
              inString = stdin.readLine();
              //create a String Tokenizer to read the data separately
              StringTokenizer tok = new StringTokenizer(inString, ":");
    prodlist[i] = new CatalogueItem(tok.nextToken(), tok.nextToken(),
    Double.parseDouble(tok.nextToken()));
    }//end of loop
    //create a header and print the data back to the screen
    System.out.println();
    System.out.println("LISTING OF ALL GOODS");
    System.out.println();
    System.out.println("Cat\tDescription\tExTax\tTax\tIncTax");
    System.out.println("___\t___________\t_____\t___\t______");
    System.out.println();
    for(int j = 0;j <prodlist.length;j++){
    System.out.println(prodlist[j].getCatno()+"\t"+prodlist[j].getDesc()+
    "\t"+prodlist[j].getPrice()+"\t"+prodlist[j].getTax()
    +"\t"+prodlist[j].getIncTax());
    //use this data and call the cheapest method to print
    //the cheapest goods in the catalogue
    System.out.println();
    System.out.println("CHEAPEST GOODS IN THE CATALOGUE");
    System.out.println();
    lowest = cheapest(prodlist, MAX);
    System.out.println("Cat\tDescription\tExTax\tTax\tIncTax");
    System.out.println("___\t___________\t_____\t___\t______");
    System.out.println();
    for(int k = 0;k <prodlist.length;k++){
    if(prodlist[k].getTaxInc == lowest)
    System.out.println(prodlist[k].Catno()+"\t"+prodlist[k].getDesc()+
    "\t"+prodlist[k].getPrice()+"\t"+prodlist[k].getTax()
    +"\t"+prodlist[k].getIncTax());
    //use the listing of all goods and call the most expensive method
    //to calculate and display back on screen
    System.out.println();//create two lines of space in between
    System.out.println();
    System.out.println("MOST EXPENSIVE GOODS IN THE CATALOGUE");
    System.out.println();
    maximun = expensive(prodlist, MAX);
    System.out.println("Cat\tDescription\tExTax\tTax\tIncTax");
    System.out.println("___\t___________\t_____\t___\t______");
    System.out.println();
    for(int l = 0;l < prodlist.length;l++){
    if(prodlist[l].getTaxInc == maximum)
    System.out.println(prodlist[l].Catno()+"\t"+prodlist[l].getDesc()+
    "\t"+prodlist[l].getPrice()+"\t"+prodlist[l].getTax()
    +"\t"+prodlist[l].getIncTax());
    //print the pretax worth of goods by calling the method and display
    System.out.println();//create a two lines of space in between
    System.out.println();
    System.out.println("TOTAL OF PRE-TAX WORTH OF CATALOGUE ITEMS: "+preTaxWorth
    (prodlist));
    //print the avg tax payable per item
    System.out.println();
    System.out.println("AVERAGE AMOUNT OF TAX PAYABLE PER ITEM:"+avgTax
    (prodlist));
    //declare the other methods within the scope of the main class
    public static double cheapest(CatalogueItem[] prodlist, int size)
         double lowest = prodlist[0].getIncTac();
         for(int i = 0; i < size;i++)
              if(prodlist.getIncTax() < lowest)
              lowest = prodlist[i].getIncTax();
         return lowest;
    public static double expensive(CatalogueItem[] prodlist, int size)
         double maximum = prodlist[0].getTaxInc();
         for(int i = 0; i < size; i++)
              if(prodlist[i].getIncTax() > maximum)
              maximum = prodlist[i].getIncTax();
         return maximum;
    public static double preTaxWorth(CatalogueItem[] prodlist)
    {//add all the getPrice's in together
    double preTax = 0; //prodlist[0].getPrice();
    for(int i =0; i <prodlist.length; i++)
         preTax += prodlist[i].getPrice();
    return preTax;
    public static double avgTax(CatalogueItem[] prodlist)
    {//run through the array and add all the getTax amounts up.
         double sum = 0;
         for(int i = 0; i < prodlist.length; i++)
              sum = sum + prodlist[i].getTax();
         //to get the avg we divide the sum by the MAX number of entries
         double Total = sum / MAX;
         return Total;
    }//end of main class
    //CatalogueItem class      
    //catalogue item class
    //ensure that the accesors and mutators
    //are visible and cannot be overridden
    class CatalogueItem
    //declare the data types
    private String catno;
    private String desc;
    private double price;     
    //declare the taxation rate constant
    //but make it visible
    public CatalogueItem(){
         catno = " ";
         desc = " ";
         double price;
    //declare the full constructor
    CatalogueItem (String inCatno, String inDesc, double Price)
         inCatno = catno;
         inDesc = desc;
         Price = price;
    //name accessor---not overidable
    public final String getCatno()
         return catno;
    //name product description accessor--not overidable
    public final String getDesc()
         return desc;
    //name the extax method
    public double getPrice()
         return price;
    //tax utility method
    public double Tax()
    double Tax;     
         Tax = 00.15 * getPrice();
         return Tax;
    //Including Tax method
    public double IncTax()
         double IncTax;
         IncTax = Tax() + getPrice();
         return IncTax;

  • New to Java:   Help Needed

    Hi,
    I am writing a utility to monitor all the objects created by my application. I want to be able to get not only values of class variables(for which the reflection package seems pretty useful), but also instance variables.
    For example.
    public class myClass {
    //Constructor
    public myClass(int i) {
    // another class instantiates this one
    myClass mc = new myClass(10);
    myClass mc1 = new myClass(20);
    I need to keep track of the the handles mc and mc1 and the
    other initializations they do based on the value passed at runtime.
    Is there a way to to this. Or even better, is there someplace in Java which stores all the objects instantiated and their handles?
    Any suggestions would be greatly appreciated.
    Thnx
    cvsan

    How do I access private and proteced variables. By default only the public variables are accessible via the reflect class as in the example below.
    Class c = rc.getClass();
    String s = c.getName();
    System.out.println(s);
    try { abcField = c.getField("abc");
    where abc is a public instance variable. If abc is a private instance variable, the above example fails.
    Is there any way to override the data hiding feature of Java?
    Thanks
    cvsan

  • Very new at Java

    Hello,
    I have am new also to Java and would like to know what to download first. I want to work with databases and use java as the front end. The databases I use are MySql. I am really excited about this language because I have a Apple at home and a PC at work. By the way I have read this I can use both and not have to worry about different OS. This sounds great.

    Hi
    Welcome to Java!
    I don't know much about Macs, but for PC you need the following:
    -The JDK (Java Development Kit)
    JDK 5 is the current version (jdk 6 due before end of year).
    http://java.sun.com/javase/downloads/index.jsp
    -A Java IDE (Integrated Development Environment - in case you didn't know ;) )
    I recommend Netbeans as your IDE. Check out:
    www.netbeans.org
    It's free and runs on Mac too, assuming you have jdk5.0 for Mac. Netbeans 5.5 is the latest version (released a few days ago) and requires jdk5.0, Netbeans 5.0 requires only JDK1.4.2 if you only have on older JDK on your mac. Various plugins are available on the netbeans site too.

  • Very New To Java, Using Sun One Studio

    I am doing a small work project for a company and they would like me to do a small project using the JavaMail API and the Java One Studio.
    Now I have some experience with Java, It is installing the JavaBeansTM Activation Framework and the JavaMail API to my Classpath.
    How do I figure out what my class path is?
    Thanks Mike

    If on windows or unix, in a shell, type set.
    If on mac OS, then I don't know. Sorry.

  • New to Java Help!!

    Hello-
    I have to allow the user to enter 2 numbers until they enter the provided break. Then using recursion I have to perform the operation a times b and a to the power of b. The trick is I have to use addition. Then print out the results for each pair of numbers.
    Thank you!

    http://forum.java.sun.com/thread.jspa?threadID=713853&tstart=10
    One thread per question please.

  • Very new to Java, trying to make a jar file run on WM6

    Ok so i downloaded this java progam that is supposed to work on "java-enabled" phones. So i have windows mobile 6, which is able to run java but i think its limited to the browser. when i try to run it on a virtual java machine i recieve the following error.
    java.lang.Exception: No Main-Class attribute in \My Documents\TrafficPilot.jar
    at java.lang.VMMainThread$1.run(VMMainThread.java)
    at java.lang.VMThread.run(VMThread.java:120)
    JVM exit
    what is needed to make this work? or is it even possible?

    Hi, welcome to the Sun Java forums.
    Pester the person who gave you the JAR, s/he did something wrong.
    Pass this information on to them:
    Add a MANIFEST.MF file in the JAR's META-INF directory (all names case-sensitive) and put this line in it, with two Enters after it:
    Main-Class: mypackage.MainClassName
    Though if the JAR contains an applet (which would explain why it only works in a browser), it might not have a main class.

Maybe you are looking for

  • HT2589 One of the songs I purchased and down loaded will not play. The arrow/cursor keeps jumping off

    I have a song purchased/downloaded, but the arrow keeps jumping off and it will not play

  • BPEL Workflow email not stored in database!

    Hi, I'm using SOA Suite 10.1.3.4. I have a worklist application where notifications are sent to Assignees, Approvers when the action is Assign or Approve. The mails are delivered as expected. But there is not trace of emails sent. I checked WFNOTIFIC

  • Variant Creation for Background mode

    hi I am trying to create variants which will run the background jobs for CFM1 transaction with materials having 6000 records every time. Can you tell me how to create variants for a particular transaction A using some other program B. if I have 24000

  • Commissions Configuration

    Hi Sap Gurus  if any body has Commissions & Incentives Configuration Document , pls send to my mail id: [email protected] With Best Regards Nina.T Edited by: Nina T on Apr 25, 2008 1:01 PM

  • Filter on the currently signed in user

    Hi all, I am trying to find out an easy way to filter on the current signed in user on a permission list. I tried to use the [Me] but that did not work. So the url I am using is: https://site/Shared%20Documents/Forms/AllItems.aspx?View={number}&Filte