Setting up JMonkeyEngine in Intellij IDEA
Asked Answered
C

2

7

How do you set up JMonkeyEngine in Intellij IDEA. It was not specified in the documentation (http://hub.jmonkeyengine.org/wiki/doku.php/).

Cornuted answered 16/4, 2014 at 11:13 Comment(0)
B
9

now it's easy if you use maven or gradle. Maven simple 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

Note 1: The JMonkeyEngine official wiki is moved to 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 :)

Belinda answered 4/1, 2015 at 21:40 Comment(3)
@RicardovandenBroek , I've updated the link to the article. Thanks. If you still have problems - show me you pom.xml and maven logs after 'mvn clean package'Belinda
The problem was that i was trying to use the latest version (3.1.0) which has a different groupId (org.jmonkeyengine instead of com.jme3). When I switched back to version 3.0 it worked. Thank you @BelindaLuau
@Programmer400 fixed.Belinda
W
3

I recommend that you learn using the jMonkeyEngine3 with the jMonkeyEngine SDK, as that is well documented.

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

Of course, you must consider different terminology and UI for setting up things in IDEA. Basically all you have to do is add the correct .jar files to your classpath.

If you have problems and need more information, you should probably read more about IntelliJ IDEA Project settings and Java Classpath.

As I said, I recommend "starting" with the 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!)

Wastebasket answered 14/9, 2014 at 14:7 Comment(1)
Note: To get your assets recognized, go into Project Structure > Modules and select your assets folder as "Resources"Fleam

© 2022 - 2024 — McMap. All rights reserved.