Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Brand new to Eclipse using Java. HelloWorld spawns immediate error.
Brand new to Eclipse using Java. HelloWorld spawns immediate error. [message #1805382] Fri, 12 April 2019 21:00 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: January 2010
Junior Member
Using Eclipse 2019-03 (4.11.0); build id: 20190314-1200
Java sdk 12
MacOS 10.3.6

Opened eclipse after install.
I followed the "Create HelloWorld application" guided-walkthrough. Immediately after I created the Java project HelloWorld, it gave me a build error: Errors occurred during the build.
Errors running builder 'Java Builder' on project 'HelloWorld'.
java.lang.NullPointerException

So I deleted the project and deleted all files from my "eclipse-workspace" (so it was empty) and I tried again. Now, immediately after I click "finish" on the guided walkthrough for the "Create HelloWorld application", I get the following error:
"Periodic Workspace save.' has encountered a problem. Could not write metadata for '/'
Detailed info: "Could not write metadata for '/'.
/Users/dJames/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap (No such file or directory)"

And it is true when I check for that directory, there is a folder "org.eclipse.org.resources" which only contains two items: a "projects" folder, and a file: "0.snap", but not the ".root" folder.

Since I got a different error than the first time I tried to load the HelloWorld application, it seems like I have deleted something important when I emptied the "eclipse-workspace" folder, but I really don't know how to return it to good.

Any help with the two problems above, greatly appreciated.
Jim
Re: Brand new to Eclipse using Java. HelloWorld spawns immediate error. [message #1805390 is a reply to message #1805382] Sat, 13 April 2019 02:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30299
Registered: July 2009
Senior Member
Don't ever touch anything in the <workspace>/.metadata folder unless you know exactly what you are doing. If you've corrupted something there, best you create a new workspace in a new location (or move the broken one to a different location and create a new one at the old location). You can use File -> Import... -> General -> Existing Projects into Workspace to import your projects from the broken workspace into a clean new workspace.
Re: Brand new to Eclipse using Java. HelloWorld spawns immediate error. [message #1805414 is a reply to message #1805382] Sun, 14 April 2019 20:31 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: January 2010
Junior Member
Thanks for that information.

Also, I resolved my original problem about the nullpointer exception:
This error was thrown during building but there was an additional error highlighted in the Eclipse IDE at line 1 (before any of my java code) of my HelloWorld program:
"must declare a named package eclipse because this compilation unit is associated to the named module HelloWorld."

This was resolved by deleting the "module-info.java" per the following thread:

https://stackoverflow.com/questions/53033899/must-declare-a-named-package-eclipse-because-this-compilation-unit-is-associated

Thanks,
Jim
Previous Topic:Just a little bit grey background for white allergic... please?
Next Topic:Eclipse does not work please help asap
Goto Forum:
  


Current Time: Tue Jul 16 11:02:34 GMT 2019

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

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

Back to the top