Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » package error(Don't understand error)
package error [message #690058] Tue, 28 June 2011 22:11 Go to next message
Andy  is currently offline Andy
Messages: 16
Registered: May 2011
Junior Member
My Java application works fine. But my package line is underlined in red with the message: The declared package "ppr_tv.javaSrc" does not match the expected package "".
I am not sure why this is happening. All my java files are indeed in the ppr_tv/javaSrc directory. I have my java build path set to the 'src' directory which contains the aforementioned directories. Again my project works, but this error irks me.
Re: package error [message #690059 is a reply to message #690058] Tue, 28 June 2011 22:18 Go to previous messageGo to next message
Andy  is currently offline Andy
Messages: 16
Registered: May 2011
Junior Member
Um, this has resolved itself...? Sorry for the post I guess.
Re: package error [message #690134 is a reply to message #690059] Wed, 29 June 2011 03:15 Go to previous messageGo to next message
paulsvejda55 is currently offline paulsvejda55
Messages: 1
Registered: June 2011
Junior Member

The package name must correspond to the directory name, otherwise it's not found by the classloader. The only way you could have the situation you describe is if everything is in the default package, which is incredibly bad practice.
Re: package error [message #690447 is a reply to message #690134] Wed, 29 June 2011 14:34 Go to previous message
Andy  is currently offline Andy
Messages: 16
Registered: May 2011
Junior Member
My java files are in the src/ppr_tv/javaSrc directory. The issue went away after the ProjectExplorer window went from displaying a plain java file the could not be expanded, to expandable java files where I could view the classes and members.
Previous Topic:Eclipse for Java EE doesn't load past Splash Screen
Next Topic:Birt-viewer in tomacat
Goto Forum:
  


Current Time: Wed Oct 22 05:04:40 GMT 2014

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

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