我一直在关注入门教程,但在使用Maven导入playn项目后卡住了.我正在使用在64位Windows 7上运行的Eclipse Indigo.
所有导入的项目都有相同的错误:
Missing Artifact com.sun:tools:jar in all the pom.xml files.
经过几个小时的搜索论坛,我尝试过:
安装最新的Java 1.6.029更改JAVA_HOME环境变量以指向\program files\Java\jdk1.6_029
更改Eclipse Java首选项以使用JRE jdk1.6_029.
我真的想尝试playn,但为什么有一些帖子我似乎无法找到解决方案的共识答案.有人说Sun从64位jdk中删除了一些东西,其他人说你必须编辑你的xml文件,很多人说你已经改变了你的JAVA_HOME,另一个人说你必须改变Eclipse的VM选项.
任何有关清除此功能的帮助都会受到赞赏,并且可能对许多人有用,因为我这里没有特别奇怪的设置.
(编辑)这是第一个项目中的pom.xml.Eclipse标记行中的错误:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.googlecode.playn</groupId>
    <artifactId>playn-project</artifactId>
    <version>1.1-SNAPSHOT</version>
  </parent>
  <artifactId>playn-android</artifactId>
  <name>PlayN Android</name>
  <packaging>jar</packaging>
  <repositories>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>com.googlecode.playn</groupId>
      <artifactId>playn-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <!-- needed because Android uses the same JSON code as playn-java;
         that should be factored into a library shared by both backends -->
    <dependency>
      <groupId>com.googlecode.playn</groupId>
      <artifactId>playn-java</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency> …我正在尝试通过这样做来使用 checkstyle 和 findbugsmvn checkstyle:checkstyle但我有这个错误 
这个错误
[ERROR] Failed to execute goal on project my-project: Could not resolve dependencies for project default:my-project:jar:1.1: Could not find artifact com.sun:tools:jar:0 at specified path C:\Program Files\Java\jdk-11.0.2/../lib/tools.jar -> [Help 1]
我的 JDK 中没有 tools.jar(我有 jdk-11.0.2)。
我从 2H 开始使用它,请帮助:/