简体   繁体   English

在Intellij IDEA中设置JMonkeyEngine

[英]Setting up JMonkeyEngine in Intellij IDEA

How do you set up JMonkeyEngine in Intellij IDEA. 你如何在Intellij IDEA中设置JMonkeyEngine。 It was not specified in the documentation ( http://hub.jmonkeyengine.org/wiki/doku.php/ ). 它没有在文档中指定( http://hub.jmonkeyengine.org/wiki/doku.php/ )。

now it's easy if you use maven or gradle. 现在,如果你使用maven或gradle,这很容易。 Maven simple pom.xml: Maven简单的pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mycompany</groupId>
    <artifactId>jme3-example</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>JME3 maven project</name>

    <properties>
        <jme3.version>3.0.10</jme3.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.jme3</groupId>
            <artifactId>jme3-core</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jme3</groupId>
            <artifactId>jme3-desktop</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jme3</groupId>
            <artifactId>jme3-lwjgl</artifactId>
            <version>${jme3.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>jme3-repo</id>
            <name>JME3 maven repo</name>
            <url>http://updates.jmonkeyengine.org/maven/</url>
        </repository>
    </repositories>
</project>

Note 0: JME 3.1 is deployed at JCenter 注0: JME 3.1部署在JCenter上

Note 1: The JMonkeyEngine official wiki is moved to https://jmonkeyengine.github.io/wiki/ 注1: JMonkeyEngine官方维基被移至https://jmonkeyengine.github.io/wiki/

Gradle config and other maven dependencies documented here: https://jmonkeyengine.github.io/wiki/jme3/maven.html If you didn't use maven or gradle before, please, learn it :) Gradle配置和其他maven依赖关系记录在这里: https ://jmonkeyengine.github.io/wiki/jme3/maven.html如果您之前没有使用过maven或gradle,请学习它:)

I recommend that you learn using the jMonkeyEngine3 with the jMonkeyEngine SDK, as that is well documented. 我建议你学习使用jMonkeyEngine3和jMonkeyEngine SDK,因为这有很好的文档记录。

If you want to then use jMonkeyEngine with IntelliJ IDEA, you can get all relevant information from this tutorial for eclipse: http://hub.jmonkeyengine.org/wiki/doku.php/jme3:setting_up_jme3_in_eclipse 如果你想将jMonkeyEngine与IntelliJ IDEA一起使用,你可以从本教程中获取eclipse的所有相关信息: http//hub.jmonkeyengine.org/wiki/doku.php/jme3setting_up_jme3_in_eclipse

Of course, you must consider different terminology and UI for setting up things in IDEA. 当然,您必须考虑使用不同的术语和UI来设置IDEA中的内容。 Basically all you have to do is add the correct .jar files to your classpath. 基本上您所要做的就是将正确的.jar文件添加到类路径中。

If you have problems and need more information, you should probably read more about IntelliJ IDEA Project settings and Java Classpath. 如果您遇到问题并需要更多信息,您应该阅读有关IntelliJ IDEA项目设置和Java Classpath的更多信息。

As I said, I recommend "starting" with the jMonkeyEngine SDK. 正如我所说,我建议使用jMonkeyEngine SDK“启动”。 (Keep in mind that you lose support for jMonkey file types, such as .j3m (jmonkey materials) and .j3o (jmonkey models) when you use IntelliJ IDEA!) (请记住,当您使用IntelliJ IDEA时,您将失去对jMonkey文件类型的支持,例如.j3m(jmonkey材料)和.j3o(jmonkey模型)!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM