我从github下载了一个开源项目后,导入到自己Eclipse之后,遇到了这个烦人的错误消息:
The declared package "com.sap.smartService" does not match the expected package "main.java.com.sap.smartService"
这是我的项目文件目录:
解决方案:对项目点击右键,选择Properties->Build Path, 发现src文件夹被设为build path。
首先右键src文件夹,选择Remove from Build Path将其从build path中移除:
然后选择src/main下面的java文件夹,设置成build path,重启Eclipse:
错误即消失:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
Shiro Filter Chain 配置决定了哪些URL需要经过哪些Filter处理。 - 编写登录和登出接口,调用Shiro提供的API进行操作。 - 如果使用Web环境,可以配置Shiro的Web支持,包括`ShiroFilterFactoryBean`等。 3. **...
The declared package does not match the expected package appendixaStringer.java Thinking in Java/appendixaline 12022 年 11 月 11 日 14:11:20 3870 可以添加 package appendixa 命令来解决。 在运行程序时...
- **包声明不匹配**:如果出现类似`The declared package does not match the expected package appendixa Stringer.java Thinking in Java/appendix`这样的错误,说明源代码中的包结构与实际存放位置不符。...
在Code::Blocks中遇到“'to_string' was not declared in this scope”的错误,通常是由于编译器版本过低或者没有包含正确的头文件所导致的。`std::to_string`是C++11标准引入的一个函数,用于将数字转换为字符串。...
5. **package**:执行Default生命周期中的`package`阶段,调用`maven-jar-plugin`的`jar`目标来打包项目。 6. **install**:执行Default生命周期中的`install`阶段,将构建好的包安装到本地仓库。 通过这种方式,...
The book does not assume prior knowledge of Go nor experience with any specific language, so you'll find it accessible whether you're most comfortable with JavaScript, Ruby, Python, Java, or C++. ...
The vision is “To produce the best UNIX-like operating system package possible, with due respect to the original software tools ideology as well as usability, performance and stability.” The ...
The book does not assume prior knowledge of Go nor experience with any specific language, so you’ll find it accessible whether you’re most comfortable with JavaScript, Ruby, Python, Java, or C++. ...
A plugin for the Eclipse IDE to add content assist features for the Thymeleaf standard dialect processors and expression utility objects, using the Eclipse Web Tools Platform HTML source editor. ...
_HID does not match the predefined PCI Root Bridge IDs, the _CID list (if present) is now obtained and also checked for an ID match. Implemented additional support for the PCI _ADR execution: up...
然而,当出现错误“ORA-04063: package body 'SYS.DBMS_REGISTRY_SYS' has errors”时,表明`DBMS_STATS`包或与其相关的`SYS.DBMS_REGISTRY_SYS`包体存在错误,这可能对数据库性能和正常操作造成影响。 **问题症状*...
* The Shell Extension components does not support C++ Builder 4. For some strange reason the components causes a link error. * There appear to be sporadic problems compiling with C++ Builder 5. ...
variable declared but not used(解决方案).md
Suppose if we have declared an array of type int then the array will take only the int values and not any other data types. We can find find out the length of the variable by using the variable ...
The software contains all files of the installation package except for the "Dump" folder contents. This LICENSE AGREEMENT ("LICENSE") defines what the USER may do with the SOFTWARE, and contains ...
•Q584524 - Ribbon - QAT doesn't display the double arrow if the Ribbon control's PopupMenuItems set does not include items •Q581962 - Ribbon - Switching between maximized MDI child windows using the...
The PRBS checker verifies the integrity of received data by comparing it against an expected PRBS pattern, while the error injector intentionally introduces errors into the data stream to test the ...
- **Unchecked Exceptions and Threads:** In Java, if an unchecked exception is thrown by a thread, it does not cause the program to terminate immediately but rather propagates up the call stack until ...
- **正确答案**:(b) println appends a newline to the end of its output, but print does not - **解析**:`println`方法会在输出结束后自动添加一个换行符,而`print`方法则不会添加换行符。 #### 5. What will...