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%

Similar Messages

  • 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...

  • 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?

  • New to java(need help on access specifier)

    hi! i am new to java.plzzzzz help me i have to make a project on access specifier's i know all theroy.but
    i am unable to understand how i can define all specifiers practicly.i mean in a program.
    thanks.plzzzzzzzz help me

    the most common project i can think of is a payroll system..
    you can have real implementation of all the access specifiers
    good luck

  • New 2 javamail - pls help

    Hello everyone,
    I'm new to Java and have a project to do for school: setting up a webmail using Java.
    As I work on it, some errors appeared and I dont know their meaning or where to search their explanation:
    "The exception NoSuchProviderException is not handled"
    "Field type Session is missing"
    "Field type Store is missing"
    "Field type Folder is missing"
    Thank you very much, any input would be appreciated.

    Hi,
    The setProvider() method in javax.mail.Session can throw an exception called NoSuchProviderException when the Provider passed to it fails to instantiate. As with all java exceptions, this must be caught in you code and can't be ignored, you might like to do some of the online tutorials on this site. This one, http://java.sun.com/docs/books/tutorial/essential/exceptions/firstencounter.html is a good start for exception handling. It looks like you have some other problems there as well. Perhaps some quality time in the tutorial section will help. :-)
    Cheers,
    Peter.

  • I am completealy new at java.  HELP!!!!

    K, hi, well, i am experienced in HTML and Macromedia Flash, and Game Maker 5, a shit game maker prog. Ne ways, i admire games like RuneScape and would like to know how i would get around to making one. I know that i can't just jut out and make a rs type game. But i would like to know where to start? Are there programs i need to buy or DL, or are there books? And btw, is Java like HTML where u sit in front of a notepad prog, and type? or is it like u type and see whats happening? or do u add objects and give them properties..... Its a whole lot to ask! lol, Help me out.......try to answer it all.

    Resources for Beginners
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java. This one has been getting a lot of very positive comments lately.
    But i would like to know where to start? With reading the "New To Java" tutorials.
    Are there programs i need to buy or DLTo start with you only need Notepad, and the JDK (AKA the Java SDK), downloadable from http://java.sun.com/j2ee/1.4/download-sdk.html
    Later on, you might also want an IDE, or maybe just a better text editor. But for now, just stick with Notepad.
    And btw, is Java like HTML where u sit in front of a notepad prog, and type?Mostly, after writing something (in Notepad), then compile it, then run it. And extra step than HTML has.
    or is it like u type and see whats happening?You can also get interactive shells for it, but for now, do not worry about them.
    r do u add objects and give them propertiesYou can get IDEs which let you work this way, but for now, do not worry about them.

  • Hi, i'm new to java. need help setting the path in win XP

    hi all,
    i'm new to java technology. i've just downloaded the JDK and ran my first java program (hello world). i love it. java's gr8. i need help. i run win XP and how can i setup the path sothat i can execute my programs from the root dir??? any help in this direction will be greatly appreciated. please email me @ [email protected]
    Best regards
    Mrinal

    Go to Start menu and select Control Panel. In the Control Panel, double click on System. In the System dialogue, choose the Advanced tab. Then click on Environmental Variables. Select Path and Edit. Put ;c:\j2sdk1.4.0\bin at the end of the Path (or c:\j2sdk1.4.0\bin;) at the start of the Path. That's it.

  • Totally New in Java - Please help!!

    Hi Dear all,
    l am totally new in Java, and l facing one problem,and really hope can get some help from yours,please!
    l need to write this program:
    The program should do the following:
    1. Input two fields: action (action: add / delete), and account number (any
    digit or character)
    2. if the action is "add" then the program adds one text line to a text
    file.
    "New account is <account number>"
    3. create the text file if it is not already exist (in c:\)
    4. When program runs again with new input values, a new line will be
    appended to the same file.
    5. if the action is "delete" then the program finds the record and removes
    the text line from the file.
    My problem is :
    l just know that l need to create the user interface first,but l don't know how to go on??
    Would you please show me some step how to solve these problem?
    Many many thanks!!
    BaoBao

    I don't know about Swing. I never use it.
    The stuff to create and manipulate files is in the java.io package.
    You'll probably want to use java.io.FileReader and java.io.FileWriter.
    Note that FileWriter has a constructor that lets you append and not overwrite.
    I'll start you off with a test.
    public class AccountListAddTest() {
      public static void main(String[] argv) {
        AccountList accts = new AccountList();
        accts.add("abcdefg12345"); // arg is a hypothetical account number
    }Write an AccountList class that'll work if you compile and run this test. After you run this test for the first time, the file should contain the string
    New account is abcdefg12345.
    This test assumes that the filename is hardcoded into the AccountList class. To keep it simple, make the add method create a new appending FileWriter each time, write, then close the writer.

  • 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.

  • 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

  • New to Java, Please help

    Hi, I was trying to play a game and came up with this java error (below), I uninstalled and reinstalled still no fix. I think i need a new class?, If anyone can explain the potential problem to me and help me fix it, that would be much appreciated. I'm a complete NEWB when it comes to java, I'm not even sure how to edit that code. so please remember to explain in the newbiest of newby answers. I am proficient with features of a computer just not java.
    Java Plug-in 1.6.0_24
    Using JRE version 1.6.0_24-b07 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Ethan
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class loader.class not found.
    java.lang.ClassNotFoundException: loader.class
    at sun.plugin2.applet.Applet2ClassLoader.fi… Source)
    at sun.plugin2.applet.Plugin2ClassLoader.lo… Source)
    at sun.plugin2.applet.Plugin2ClassLoader.lo… Source)
    at sun.plugin2.applet.Plugin2ClassLoader.lo… Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.lo… Source)
    at sun.plugin2.applet.Plugin2Manager.create… Source)
    at sun.plugin2.applet.Plugin2Manager$Applet… Source)
    at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.ClassNotFoundException: loader.class

    845681 wrote:
    Hi, I was trying to play a game and came up with this java error (below), I uninstalled and reinstalled still no fix. I think i need a new class?, If anyone can explain the potential problem to me and help me fix it, that would be much appreciated. I'm a complete NEWB when it comes to java, I'm not even sure how to edit that code. so please remember to explain in the newbiest of newby answers. I am proficient with features of a computer just not java.If you want to learn how to program java, which is not the same as playing that particular game then you can start with the following link.
    http://download.oracle.com/javase/tutorial/getStarted/index.html

  • New to Java: requires help possible tutor plz read

    Ok, i ma very keen to learn the basics of java, however my experience is limited. When i was studying at the university of london i completed an object orientated programming module based on the the book "javagently". Since that time i have not been programming and am really keen to get into it and make my first (simple) application. i have set up java on my pc and have done a few tutorials around but would really like a reconmendation for a good text book that can take me to this level.
    Let me explain what i intend on building, i play a wargame online called "Medieval:TotalWar - Viking Invasion" basically in this game you buy units for fighting and to make them more effective you can add "valor", "weap" or "armour" all of which increase the cost of the unit. a unit has base stats for different attributes and all of these variables adjust the attributes accordingly.
    All the stats for the units i have in excell and text file format, i would ideally like to have scroll down bars that let you select "unit type", "valor", "weap" and "armour" default being 0 and then the app will display all the attributes that apply to those selected options. In theory i cannot see this being too hard but i just dont know where to start.
    I am looking for a good text book that would help acheive this goal and also possibly a kind person that would be able to answer my silly questions privately without me looking like a fool in front of everyone here ;) on a serious note though i am deadly serious about completing this even if it takesa few months to get a grasp, if you have any inptu whatsoever it would be greatly appreciated no matter how small it may seem. if you want to see the txt file it is available here http://kenchi.mysite.freeserve.com/VIKINGS_UNIT_PROD.TXT as an example i also can get it on an excel sheet if it is easier to handle but at moment i can just about copy a txt file let alone do anything else with it.
    thanks in advance
    Baz
    please feel free to reply or email me at [email protected] or if you are really keen visit www.clankenchikuka.com, Baz is my profile.

    i m not sure, if sombody will read ur Q.
    this is not a Q, this is a history.
    who care if u study or u still.
    we ask like this.
    hi, // this is ok :)
    i use xxx // for example JFrame.
    i get Error xxxx // for example class not found.
    please help.
    enough.
    and now filter ur Q, if u would like to get an answer. minimum from me.

  • New to java, plz help

    Well I'm not that new. I've been working with java for two years using jcreator in school. Its been great, we make lots of programs and run em and stuff. But the one thing we didn't learn is how to distribute the programs to other people. For instance, if I make a program to help with math homework......and I wanna give that to my friend........i'd hafta send em the source files and they'd hafta open it up in jcreator and run it........that seems kinda not good........how do u make it into an actual thing that I can click on and it runs like any normal program (exe?)

    yea, heres a lot of code that calculates the Flesch readability of a piece of writing.
    import java.io.*;
    public class Flesch
         private int mySentences, myWords, mySyllables, temp, flag, tempSyl;
         private char check,hold,back;
         private String myFile,myLevel;
         private double myScore;
         public Flesch()
              mySentences=0;
              myWords=0;
              tempSyl=0;
              mySyllables=0;
              myLevel="";
              myScore=0.0;
              temp=0;
              flag=0;
         public Flesch(String file) throws IOException
              myFile=file+".txt";
         public String getFilename()
              return myFile;
         public double getLegibilityIndex()
              myScore=Math.round(206.835 - (84.6*(((double)(mySyllables+1)/(double)myWords))) - (1.015*((double)myWords/(double)mySentences)));
              return myScore;     
         public String getEducationalLevel()
              if(myScore>=91)
                   myLevel="5th Grade";
              else if(myScore>=81)
                   myLevel="6th Grade";
              else if(myScore>=71)
                   myLevel="7th Grade";
              else if(myScore>=61)
                   myLevel="8th and 9th Grade";
              else if(myScore>=51)
                   myLevel="10th to 12th Grade";
              else if(myScore>=31)
                   myLevel="College Student";
              else myLevel="College Graduate";
              return myLevel;
         public int getNumSentences()throws IOException
              FileReader sent=new FileReader(myFile);
              temp=sent.read();
              while(temp!=-1)
                   check=(char)temp;
                   if(check=='?'||check=='!'||check=='.')
                        mySentences++;
                   temp=sent.read();
              sent.close();
              return mySentences;
         public int getNumWords()throws IOException
              FileReader word=new FileReader(myFile);
              hold='@';
              temp=word.read();
              while(temp!=-1)
                   check=(char)temp;
                   if((check==' '||check=='\n'))
                        myWords++;
                   hold=check;
                   temp=word.read();
                   if(temp==-1)
                        myWords++;
              word.close();
              return myWords;
         public boolean isVowel(char c)
              if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='y'||c=='A'||c=='E'||c=='I'||c=='O'||c=='U'||c=='Y')
                   return true;
              return false;
         public boolean isPunc(char c)
              if(c=='.'||c=='!'||c=='?'||c==','||c==':'||c=='-'||c==';')
                   return true;
              return false;
         public int getNumSyllables() throws IOException
              FileReader syl=new FileReader(myFile);
              tempSyl=mySyllables;
              hold='@';
              back='@';
              temp=syl.read();
              while(temp!=-1)
                   check=(char)temp;
                   System.out.print(check);
                   if(isVowel(check)&&!isVowel(hold))
                        mySyllables++;
                   if(hold=='e'&&(check==' '||isPunc(check)||check=='\n'||check=='\r'||check=='\f'))
                             mySyllables--;
                   if(tempSyl==mySyllables&&(check==' '||check=='\n')&&hold!=' ')
                             mySyllables++;
                   if(check==' '||check=='\n')
                        tempSyl=mySyllables;
                   if(flag>=1)
                        back=hold;
                   hold=check;
                   temp=syl.read();
                   flag++;
              syl.close();
              System.out.println("");
              return mySyllables;

  • M new to this forum + new to java please help me with file handling program

    hi i want to make a file handling program where in i want to input a text file say f1 whose style is mentioned as below
    aaa...bcd
    aaabbc
    acdce
    a..dd
    abbcd
    now i want to write d out put of file f1 to file f2 but only those string entries widout any ... in them how to do that :-(( please help :((

    import java.io.*;
    import java.lang.*;
    class javcsse{
             void javsce (){
              BufferedReader in;
            PrintWriter out;
            String line;
            try
                in = new BufferedReader(new FileReader("e:\\cntcs\\n7.txt"));
                out = new PrintWriter("e:\\cntcs\\n8.txt");
               line = in.readLine();
               while(line != null)
                     if(line.contains("...") && line.contains("....")){
                         break ;                
                         else{
                               if(line.contains("cc"))
                              System.out.println(line+"\n");
                                      out.println(line);
                    line = in.readLine();
                in.close();
                out.close();
            } catch (Exception ex)
                System.err.println(ex.getMessage());
      public class javcse{
        public static void main(String[] args) {
            new javcsse();
    }hey i wrote this code yet could u tell y is it still not working :((

Maybe you are looking for

  • Crystal 2008 - Selected table names are blank or end in 1

    I am creating a new report in Crystal 2008.  I am connecting to a database using ODBC.  The tables show up correctly in the available tables column of the Database Expert.  Once I select a table the table shows up in the selected tables list as an ic

  • Voice memos to GarageBand

    Can voice memos be exported to GarageBand?

  • [SOLVED] Blank screen starting new Xorg (ATI)

    Yes, it's another blank screen problem with xorg.  Sorry.  After months of sticking with an older Xorg (due to problems with my ATI Radeon X1550 card and the new Xorg w/ dual head), I decided to make a jump and update to the latest Xorg and ati drive

  • Installing AS: special problem with OPMN Process Manager...

    Hi everybody, Actually, i'm trying to install a Grig control 10.2.0.1 on an existing database (10.2.0.1 patched to 10.2.0.4). OS is RHEL5. I have the following problem during setup IAS for 3 days. Note that my database is open and that didn't succeed

  • Using layers in cc

    I realize layers are a thing of the past in cc, but I am now updating my site I created in MX (yes, my program was that old), and I used layers...so, now I cannot create new ones. Is it easy to just convert the whole page to a table, hopefully creati