Eclipse:项目未构建,因为其构建路径不完整

问题描述 投票:0回答:5

我正在使用 Eclipse IDE。 当我尝试构建应用程序时,它在问题视图下给了我这个错误

描述

The project was not built since its build path is incomplete. Cannot find the class file for javax.ejb.EJBObject. Fix the build path then try building this project 

类型

Java Problem
The type javax.ejb.EJBObject cannot be resolved. It is indirectly referenced from required .class files
eclipse
5个回答
3
投票

听起来您有一个简单的 Java 项目,而不是 Web 项目。您缺少为您的项目提供 EjbObject 的服务器运行时。

尝试通过右键单击“转换为”、“分面项目”来转换项目,然后为您的用例选择适当的 Java EE 配置,或者创建一个具有 Java EE 性质的新项目并将代码复制到其中。


0
投票

如果是 weblogic,您必须添加服务器运行时 POM 依赖项 - wlthint3client :

<dependency>
        <groupId>com.oracle.weblogic</groupId>
        <artifactId>wlthint3client</artifactId>
        <version>10.3.5</version>
    </dependency>

0
投票
   I went through same error and i found solution.You can import external jar file JAVAX.ejb.jar and configure it in your project.

http://www.java2s.com/Code/Jar/j/Downloadjavaxejbjar.htm


0
投票

我也遇到了同样的问题。

我缺少在项目方面选择服务器。这样做之后就解决了。


0
投票

在我的例子中,问题出在库的配置上,所以基本上 Eclipse 试图在 Properties -> Libraries 中使用 Eclipse 中嵌入的 JRE,所以我只是更改了 JRE 的路径以指向我下载的 JRE 和错误消失了

© www.soinside.com 2019 - 2024. All rights reserved.