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

kathy025

New member
Pro User
VIP
Local time
2:02 AM
Messages
310
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:

type_name_is_empty.png


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

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
ASUS N45SF
OS
Windows 7 Professional SP1 x64 (OEM)
CPU
Intel® Core™ i5 2430M/2410M Processor
Motherboard
Intel® HM65 Express Chipset
Memory
DDR3 1333 SODIMM (8GB)
Graphics Card(s)
NVIDIA® GeForce® GT 555M (2GB)
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
14.0" LED Backlight
Screen Resolution
16:9 HD (1366x768)
Hard Drives
640GB Seagate (internal), 1TB Toshiba Canvio Portable, 2TB x 2 WD My Book Essential (external)
Antivirus
Malwarebytes Anti-Malware Home (Premium)
Browser
Waterfox
Other Info
Optical Drive: Slimtype DVD A DS8A5SH (Super-Multi DVD);
Audio: Bang & Olufsen ICEpower®, SonicMaster
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

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
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

Computer type
Laptop
Computer Manufacturer/Model Number
ASUS N45SF
OS
Windows 7 Professional SP1 x64 (OEM)
CPU
Intel® Core™ i5 2430M/2410M Processor
Motherboard
Intel® HM65 Express Chipset
Memory
DDR3 1333 SODIMM (8GB)
Graphics Card(s)
NVIDIA® GeForce® GT 555M (2GB)
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
14.0" LED Backlight
Screen Resolution
16:9 HD (1366x768)
Hard Drives
640GB Seagate (internal), 1TB Toshiba Canvio Portable, 2TB x 2 WD My Book Essential (external)
Antivirus
Malwarebytes Anti-Malware Home (Premium)
Browser
Waterfox
Other Info
Optical Drive: Slimtype DVD A DS8A5SH (Super-Multi DVD);
Audio: Bang & Olufsen ICEpower®, SonicMaster
Back
Top