Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Unhandled event loop exception creating Java class
Unhandled event loop exception creating Java class [message #1785973] Mon, 23 April 2018 16:44 Go to next message
Jonathan Gossage is currently offline Jonathan GossageFriend
Messages: 71
Registered: March 2010
Location: Ottawa, ON, Canada
Member
I am running Eclipse Oxygen on Windows 10 and am unable to create a Java class file.

Steps to reproduce:
1. Create a Java project called "test".
2. Create a Java package "net.wiseoldbird.test"
3. Select the package in Package Explorer
4. Try to create a Java class as follows:
File->New->Class

Immediately an "Unhandled event loop exception" appears in the error log.

The file EclipseError.png contains the stack trace from the error log.
The file FullError shows the overall Eclipse state at the time of the error.

What should I do to remedy this situation?
Re: Unhandled event loop exception creating Java class [message #1786001 is a reply to message #1785973] Tue, 24 April 2018 04:19 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
What are your default compliance settings in Preferences -> Java -> Compiler? How is your JRE configured in Preferences -> Java -> Installed JREs? The method where the exception is throws looks like this:
	ASTParser(int level) {
		switch(level) {
			case AST.JLS2_INTERNAL:
			case AST.JLS3_INTERNAL:
			case AST.JLS4_INTERNAL:
			case AST.JLS8_INTERNAL:
			case AST.JLS9_INTERNAL:
			case AST.JLS10_INTERNAL:
				break;
			default:
				throw new IllegalArgumentException();
		}
		this.apiLevel = level;
		initializeDefaults();
	}

That suggests to me that somehow it's being called with a level that's not supported by the implementation you actually have. Are you sure you have the latest Oxygen update installed? I ask because the line number of the exception is off by one compared to the version of ASTParser.java that I have, so perhaps you're trying to use Java 10 with a version of JDT that doesn't support that.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Debug and compile environment
Next Topic:Newbie: Eclipse product icons not showing in windows (Tycho build)
Goto Forum:
  


Current Time: Thu Mar 28 22:06:27 GMT 2024

Powered by FUDForum. Page generated in 0.03666 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top