0

I'm having this issue while developing in Java using Eclipse as my IDE

I have this class path:

src\main\java\com\server\wsname\path\to

When i write "package ..." like

package com.server.wsname.path.to 

it gives me this error:

The declared package "com.server.wsname.path.to" does not match the expected package "main.java.com.server.wsname.path.to"

but if i write "package ..." like:

package main.java.com.server.wsname.path.to

everything works fine.

I have the same issue with the import statement, but in this case the error message is "the import cannot be resolved."

Am i missing any configuration property in the IDE related to this?

Thanks in advance.

Javi
  • 19
  • 1
  • 7

1 Answers1

1

Right click the project, go on Configure Build Path.. and set 'java' folder as the source location.

Marcos Vasconcelos
  • 18,136
  • 30
  • 106
  • 167