Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » package statements that work using jdk-8u144 do not working in Eclipse(The declared package "bfs.beans" does not match the expected package "beans")
package statements that work using jdk-8u144 do not working in Eclipse [message #1771819] Wed, 30 August 2017 22:17 Go to next message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 64
Registered: October 2014
Member
I have java software which has been on hold the last two years and I'm just getting back to it. The original development was done using Eclipse Juno and worked there.

I have installed the Oxygen release and created a project where the source code points back to my development area on my file system. I have over a 1000 error messages. I have looked at a sample of the error messages and a good number of them are identical to or relate to the error message:

The declared package "bfs.xxx" does not match the expected package "xxx"

where 'xxx' is the name of the directory containing the class file and 'bfs' is the parent directory.

How do I let Eclipse know that "bfs.xxx" really is the package name that I want to use?

[Updated on: Sat, 02 September 2017 01:09]

Report message to a moderator

Re: package statements that work using jdk-8u144 not working in Eclipse [message #1771820 is a reply to message #1771819] Thu, 31 August 2017 00:02 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1528
Registered: July 2009
Senior Member
Just organize your folder structure in a way that the type declaring "package bfs.xxx;" sits in a folder bfs/xxx relative to your source folder.
I.e., when your Java Build Path configures "YourProject/src" as a source folder, the correct location would be "YourPorject/src/bfs/xxx/".

See also:
- http://help.eclipse.org/oxygen/topic/org.eclipse.jdt.doc.user/gettingStarted/qs-DetectingExistingLayout.htm?cp=1_1_1_0
- http://help.eclipse.org/oxygen/topic/org.eclipse.jdt.doc.user/gettingStarted/qs-OrganizingSources.htm?cp=1_1_1_1
Re: package statements that work using jdk-8u144 not working in Eclipse [message #1771867 is a reply to message #1771820] Thu, 31 August 2017 13:53 Go to previous message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 64
Registered: October 2014
Member
I don't think that I can. When I created the project, it allowed me to link to my source directory 'bfs', but it placed the link in the project directory as a sibling to source. It looks like:


                   <project directory>
                    |             |
                   src          bfs



I have tried going into the workspace and creating a link from the <workproject>/src/bfs ---> myfile_system/bfs, but that sysbolic link on the file system does not show up in Eclipse. I used to do that in the Eclipse Juno, but Oxygen does not seem to recognize that link.

I'm wondering if there is a way to create that symbolic link in Eclipse Oxygen?

Jim

[Updated on: Sat, 02 September 2017 01:00]

Report message to a moderator

Previous Topic:Monitoring threads
Next Topic:Namespaces and java mapping in WSDL
Goto Forum:
  


Current Time: Sun Dec 17 13:50:24 GMT 2017

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

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