为什么我的eclipse项目没有构建路径?

时间:2023-02-05 18:10:28

What is the advantage with not having a build path in eclipse? Why is that setting default when it's like something you'd never use? It seems eclipse indigo was developed to make software development as obscure as possible. I just checked out a fresh copy of the project I checked in (called dungeonworld) this afternoon from another computer and automatically nothing works, can't compile, can't choose build path, can't add jre, can't add jdk, can't add that to project properties.

在eclipse中没有构建路径的优势是什么?为什么设置默认值时,它是你永远不会使用的?似乎eclipse indigo的开发是为了使软件开发尽可能地晦涩。我刚刚从另一台计算机上检出了我今天下午检入的一个项目的新副本(名为dungeonworld),自动地什么都不工作,不能编译,不能选择构建路径,不能添加jre,不能添加jdk,不能将它添加到项目属性中。

为什么我的eclipse项目没有构建路径?

Is my eclipse broken? I can't believe this is happening, such an easy thing not feasible.

我的eclipse断了吗?我真不敢相信会发生这种事,这么简单的事是行不通的。

9 个解决方案

#1


10  

It looks like you did not add Eclipse project metadata files to your source control system, so Eclipse doesn't know what your build path is or whether it is even a java project. You can see that the little folder on your dungeonworld project is missing the little 'j', which means Eclipse doesn't think it's a java project.

看起来,您没有将Eclipse项目元数据文件添加到源代码控制系统中,因此Eclipse不知道您的构建路径是什么,也不知道它是否甚至是一个java项目。您可以看到dungeonworld项目上的小文件夹缺少“j”,这意味着Eclipse不认为它是一个java项目。

Go back to your other computer and look for the following files in your original project root...

回到您的另一台计算机,在您的原始项目根目录中查找以下文件……

  1. .project
  2. . project
  3. .classpath
  4. . classpath
  5. .settings/*
  6. .settings / *

Make sure all of the end up in your source control system or nothing will work right.

确保所有的结果都在源代码控制系统中,否则什么都不能正常工作。

#2


12  

Nothing above solutions worked for me so i tried below

以上的解决方案对我都不起作用,所以我在下面尝试

Right click on project >> properties >> project facets >> click on java

右键点击项目>>属性>>项目facet >>点击java。

为什么我的eclipse项目没有构建路径?

#3


4  

I have same problem, but i have solved

我有同样的问题,但我已经解决了

project right click -> properties -> java build path -> src/main/sources

项目右击->属性-> java构建路径-> src/main/source

all remove items on "Excluded", and then that item turn the status "(None)"

所有删除“排除”项,然后该项将状态变为“(无)”

#4


3  

I tried below steps and it works for me.

我尝试了下面的步骤,它对我有效。

Right click on project >> properties >> project facets >> click on java

右键点击项目>>属性>>项目facet >>点击java。

#5


2  

Eclipse has a build path. It's stored in a (by default hidden) .classpath file in your project. You can also access it through the UI in project properties (right click on your project, properties, java build path).

Eclipse有一个构建路径。它存储在项目中的(默认隐藏).classpath文件中。您还可以通过项目属性中的UI(右键单击项目、属性、java构建路径)访问它。

#6


1  

Well, this is probably not your problem, but similar is happening if you are in Eclipse different perspective (for example for Python).

这可能不是您的问题,但是如果您在Eclipse不同的透视图(例如Python)中,也会发生类似的情况。

为什么我的eclipse项目没有构建路径?

vs.

vs。

为什么我的eclipse项目没有构建路径?

#7


0  

There where no entrys after right click on my projekt in Eclipse. How to click something, wenn build path entries are missing. So my Eclpise didn't detect my java project. I used following Maven command and after that I cleaned the project too. Now Projekt works as expected. So...

在那里,当我在月蚀时右键点击我的产品时没有入口。如何点击某样东西,我们缺少构建路径条目。所以我的Eclpise没有检测到我的java项目。我使用了以下Maven命令,之后我也清理了项目。现在Projekt正常工作。所以…

If you are using Maven, try mvn eclipse:eclipse in cmd console in your project directory! Make sure to use the path to your Maven folder for the command.

如果您正在使用Maven,请在项目目录的cmd控制台中尝试mvn eclipse:eclipse !确保在命令中使用到Maven文件夹的路径。

For example:

例如:

cd C:\yourEclipseProject\

C:\yourPathToMaven\apache-maven-2.2.1\bin\mvn eclipse:eclipse

This was helping me. After unsuccessful web research, a coworker told me this tip.

这是帮助我。在一次失败的网络调查之后,一位同事告诉了我这个建议。

#8


0  

Don't know the reason. But this works for me, so posting it.

不知道的原因。但这对我很有效,所以贴出来吧。

Right click on project -> 'Properties' -> 'Java Build Path'.

右键单击project -> 'Properties' -> 'Java Build Path'。

为什么我的eclipse项目没有构建路径?

为什么我的eclipse项目没有构建路径?

#9


0  

It's not a good practice to commit IDE related files into source control. What if someone in team uses different IDE? It might have been only option at a time when OP asked this question.

将IDE相关文件提交到源代码控制中并不是一个好的实践。如果团队中有人使用不同的IDE怎么办?在OP问这个问题的时候,这可能是唯一的选择。

New versions on eclipse (4.x) takes care of this automatically. Probably by observing what kind of source and build files you have in your project.

eclipse上的新版本(4.x)会自动处理这个问题。可能通过观察您的项目中有哪种源文件和构建文件。

#1


10  

It looks like you did not add Eclipse project metadata files to your source control system, so Eclipse doesn't know what your build path is or whether it is even a java project. You can see that the little folder on your dungeonworld project is missing the little 'j', which means Eclipse doesn't think it's a java project.

看起来,您没有将Eclipse项目元数据文件添加到源代码控制系统中,因此Eclipse不知道您的构建路径是什么,也不知道它是否甚至是一个java项目。您可以看到dungeonworld项目上的小文件夹缺少“j”,这意味着Eclipse不认为它是一个java项目。

Go back to your other computer and look for the following files in your original project root...

回到您的另一台计算机,在您的原始项目根目录中查找以下文件……

  1. .project
  2. . project
  3. .classpath
  4. . classpath
  5. .settings/*
  6. .settings / *

Make sure all of the end up in your source control system or nothing will work right.

确保所有的结果都在源代码控制系统中,否则什么都不能正常工作。

#2


12  

Nothing above solutions worked for me so i tried below

以上的解决方案对我都不起作用,所以我在下面尝试

Right click on project >> properties >> project facets >> click on java

右键点击项目>>属性>>项目facet >>点击java。

为什么我的eclipse项目没有构建路径?

#3


4  

I have same problem, but i have solved

我有同样的问题,但我已经解决了

project right click -> properties -> java build path -> src/main/sources

项目右击->属性-> java构建路径-> src/main/source

all remove items on "Excluded", and then that item turn the status "(None)"

所有删除“排除”项,然后该项将状态变为“(无)”

#4


3  

I tried below steps and it works for me.

我尝试了下面的步骤,它对我有效。

Right click on project >> properties >> project facets >> click on java

右键点击项目>>属性>>项目facet >>点击java。

#5


2  

Eclipse has a build path. It's stored in a (by default hidden) .classpath file in your project. You can also access it through the UI in project properties (right click on your project, properties, java build path).

Eclipse有一个构建路径。它存储在项目中的(默认隐藏).classpath文件中。您还可以通过项目属性中的UI(右键单击项目、属性、java构建路径)访问它。

#6


1  

Well, this is probably not your problem, but similar is happening if you are in Eclipse different perspective (for example for Python).

这可能不是您的问题,但是如果您在Eclipse不同的透视图(例如Python)中,也会发生类似的情况。

为什么我的eclipse项目没有构建路径?

vs.

vs。

为什么我的eclipse项目没有构建路径?

#7


0  

There where no entrys after right click on my projekt in Eclipse. How to click something, wenn build path entries are missing. So my Eclpise didn't detect my java project. I used following Maven command and after that I cleaned the project too. Now Projekt works as expected. So...

在那里,当我在月蚀时右键点击我的产品时没有入口。如何点击某样东西,我们缺少构建路径条目。所以我的Eclpise没有检测到我的java项目。我使用了以下Maven命令,之后我也清理了项目。现在Projekt正常工作。所以…

If you are using Maven, try mvn eclipse:eclipse in cmd console in your project directory! Make sure to use the path to your Maven folder for the command.

如果您正在使用Maven,请在项目目录的cmd控制台中尝试mvn eclipse:eclipse !确保在命令中使用到Maven文件夹的路径。

For example:

例如:

cd C:\yourEclipseProject\

C:\yourPathToMaven\apache-maven-2.2.1\bin\mvn eclipse:eclipse

This was helping me. After unsuccessful web research, a coworker told me this tip.

这是帮助我。在一次失败的网络调查之后,一位同事告诉了我这个建议。

#8


0  

Don't know the reason. But this works for me, so posting it.

不知道的原因。但这对我很有效,所以贴出来吧。

Right click on project -> 'Properties' -> 'Java Build Path'.

右键单击project -> 'Properties' -> 'Java Build Path'。

为什么我的eclipse项目没有构建路径?

为什么我的eclipse项目没有构建路径?

#9


0  

It's not a good practice to commit IDE related files into source control. What if someone in team uses different IDE? It might have been only option at a time when OP asked this question.

将IDE相关文件提交到源代码控制中并不是一个好的实践。如果团队中有人使用不同的IDE怎么办?在OP问这个问题的时候,这可能是唯一的选择。

New versions on eclipse (4.x) takes care of this automatically. Probably by observing what kind of source and build files you have in your project.

eclipse上的新版本(4.x)会自动处理这个问题。可能通过观察您的项目中有哪种源文件和构建文件。