Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Rep Power

    Default Trouble executing a file!

    I am trying to read characters from the console and check for the uppercase letters in the input..

    Check the following code:

    Java Code:
    class CharacterRead{
    	public static char main(String args[]) throws IOException{
    		BufferedReader br = new BufferedReader(new InputStreamReader(;
    		char ch; 
    		System.out.println("Enter your name:");
    		for(int i = 0 ; i<8; i++)
    It is compiling fine , but giving the following error:

    Exception in thread "main" java.lang.NoSuchMethodError: main

    Can anyone tell me whats wrong with this code.

  2. #2
    SRaith is offline Member
    Join Date
    Oct 2011
    Rep Power

    Default Re: Trouble executing a file!

    The main method needs to be "void" and not "char"

Similar Threads

  1. Executing a jar file
    By peiceonly in forum New To Java
    Replies: 7
    Last Post: 02-14-2014, 09:02 AM
  2. Making and executing jar file using eclipse
    By Shabber102 in forum New To Java
    Replies: 0
    Last Post: 02-06-2012, 01:18 PM
  3. Problem executing jar file
    By gio123bg in forum New To Java
    Replies: 4
    Last Post: 06-30-2009, 11:37 AM
  4. Problems executing jar file outside of netbeans
    By 2potatocakes in forum New To Java
    Replies: 4
    Last Post: 04-29-2009, 09:53 PM
  5. executing the java file
    By TheBayWatchMan in forum New To Java
    Replies: 4
    Last Post: 01-12-2008, 09:31 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