Results 1 to 8 of 8
  1. #1
    peterdfl is offline Member
    Join Date
    Mar 2008
    Posts
    8
    Rep Power
    0

    Unhappy [Solved] Same error msg with every program Java Textpad

    Hi I'm having a problem with my java textpad, Everytime I run a program I get this error msg, I dont know if its a problem with my setup. I havent used it for about 3 months. I know when a program compiles correctly it suppose to read Tool Complile Successfully.

    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are used
    -classpath <path> Specify where to find user class files and annotation processors
    -cp <path> Specify where to find user class files and annotation processors
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -proc:{none,only} Control whether annotation processing and/or compilation is done.
    -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
    -processorpath <path> Specify where to find annotation processors
    -d <directory> Specify where to place generated class files
    -s <directory> Specify where to place generated source files
    -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -Akey[=value] Options to pass to annotation processors
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system

    Tool completed with exit code 2
    Last edited by peterdfl; 04-19-2009 at 10:41 PM. Reason: wan to indicate solved

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Seems to me this is whole javac options. Can you show your one the code here workout on textpad?

  3. #3
    peterdfl is offline Member
    Join Date
    Mar 2008
    Posts
    8
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    Seems to me this is whole javac options. Can you show your one the code here workout on textpad?
    yeah simple code and any other code such as the one below, gives the same error.
    Java Code:
    import java.util.Scanner;
    
    public class Average
    
    {
       public static void main(String[] args)
    
       {
          Scanner keyboard = new Scanner (System.in);
          System.out.println("Enter Exam Test 1 ");
          double Test1 = keyboard.nextInt();
          System.out.println("Enter the Weighted Average");
          double Percent = keyboard.nextDouble();
    
    
          System.out.println("Enter Midterm Exam ");
          double Midterm = keyboard.nextInt();
          System.out.println("Enter the Weighted Average");
    
    
          System.out.println("Enter Exam Test 2 ");
          double Test2 = keyboard.nextInt();
          System.out.println("Enter the Weighted Average");
    
    
          System.out.println("Enter Final Exam ");
          double Final = keyboard.nextInt();
          System.out.println("Enter the Weighted Average");
    
          System.out.println("Your Average Grade is  ");
    
    
    
          // Calculating the Average
          double AverageTest1 = Test1 * .15;
          double AverageMidterm = Midterm * .30;
          double AverageTest2 = Test2 * .15;
          double AverageFinal = Final * .40;
          double FinalAverage = Test1 + Midterm + Test2 + Fianl;
    
    
          // Print formatted results
          System.out.printf(
          "After a calculating of %.1f%%, the average grade from $%,.15f\n $%,.30f\n $%,.15f\n $%,.40\n",
             Test1, MidtermExam, Test2, FinalExam);
    
       }
    
    }

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  5. #5
    peterdfl is offline Member
    Join Date
    Mar 2008
    Posts
    8
    Rep Power
    0

    Default

    No I compiling it within Java textpad using external tools- compile Java

  6. #6
    peterdfl is offline Member
    Join Date
    Mar 2008
    Posts
    8
    Rep Power
    0

    Default

    Problem resolved my parameters for java compile were missing. Thanks everyone

  7. #7
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    6

    Default

    yeah, i was gonna say. that's what the compiler tells you when you just type in "java" with no parameters. haha. nice catch, sometimes programs that automatically compile may be confusing to configure.

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Compiles in Netbeans, error in textpad
    By Npcomplete in forum New To Java
    Replies: 2
    Last Post: 11-21-2008, 04:50 AM
  2. How to get error codes using java program
    By kasipandian in forum Web Frameworks
    Replies: 10
    Last Post: 05-25-2008, 05:00 PM
  3. Help with using .jar files (in textpad)
    By arlemberg in forum New To Java
    Replies: 1
    Last Post: 11-20-2007, 12:34 AM
  4. about textpad
    By fred in forum New To Java
    Replies: 3
    Last Post: 08-06-2007, 06:02 PM
  5. Replies: 2
    Last Post: 07-30-2007, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •