Eclipse IDE: "Type name is empty" error when creating new Class


  1. Posts : 312
    Windows 7 Professional SP1 x64 (OEM)
       #1

    Eclipse IDE: "Type name is empty" error when creating new Class


    Hi guys,

    I have always used Notepad++ for basic Java development and have manually compiled via cmdline. I am new to Eclipse IDE.

    When I try to add a new class to a package, this error shows up:



    The "Finish" button is greyed out because of this. I am unsure what to do.
      My Computer


  2. Posts : 2,468
    Windows 7 Ultimate x64
       #2

    You should fill the new class name, as this wizard will create all the basic structure for you. Afterwards you may want to rename to something else if some refactoring comes by.
      My Computer


  3. Posts : 312
    Windows 7 Professional SP1 x64 (OEM)
    Thread Starter
       #3

    Our first homework with the IDE:
    Code:
    package ph.edu.iacademy.regform;
    
    public class RegForm {
    	
    	void printHeader() {
    		System.out.println("\t\t      Information and Communications"
    				+ " Technology Academy");
    		System.out.println("\t\t\t     6764 Ayala Avenue, Makati City 1226");
    		
    		System.out.println("\n\t\t\t\tASSESSMENT/REGISTRATION FORM");
    	}
    	
    	void printHR() {
    		for(int ctr = 0; ctr < 93; ctr++) {
    			System.out.print("-");	
    		}
    	}
    	
    	void printStudentDetails() {
    		
    	}
    	
    	void printSchedule() {
    		System.out.println("\nSECTION\t\tSUBJECT NAME\t\t\t\tUNITS\tDAY\tTIME"
    				+ "\t\tROOM#");
    		System.out.println("SE21\t\tLinear Algebra\t\t\t\t3\tTHU\t14:45-17:45"
    				+ "\t502");
    		System.out.println("SE21\t\tSoftware Engineering Elective 4\t\t3\tTHU"
    				+ "\t18:00-21:00\tCL1");
    		System.out.println("SE21\t\tEmerging Communications Technologies\t3"
    				+ "\tFRI\t14:45-17:45\tCL1");
    		System.out.println("SE21\t\tSoftware Engineering 2\t\t\t3\tSAT"
    				+ "\t11:30-14:30\tMMA3");
    		System.out.println("SE21\t\tCore Java\t\t\t\t3\tSAT\t14:45-17:45"
    				+ "\tMMA3");
    		System.out.println("\t\tTOTAL UNITS: 15/15");
    	}
    
    	public static void main(String[] args) {
    		RegForm rf = new RegForm();
    		
    		rf.printHeader();
    		rf.printHR();
    		rf.printSchedule();
    		rf.printHR();
    	}
    }
    Just prints stuff to console. Thanks for your help again!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:57.
Find Us