Running Plugin in IntelliJ

Discussion in 'Plugin Development' started by BungeeTheCookie, Jun 25, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    BungeeTheCookie

  2. Offline

    stirante

  3. Offline

    BungeeTheCookie

    stirante
    Thanks!

    Its not working..
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    Unrecognized option: -P

    Process finished with exit code 1
    I am doing it the exact way the guy in the link did it, so I am doing something wrong most likely..

    Nvm, I fixed it.
    But why do I get this..
    PHP:
    java.lang.NoSuchMethodErrororg.bukkit.configuration.file.YamlConfiguration.loadConfiguration(Ljava/io/Reader;)Lorg/bukkit/configuration/file/YamlConfiguration;
        
    at org.bukkit.craftbukkit.v1_7_R3.help.HelpYamlReader.<init>(HelpYamlReader.java:31) ~[craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
        
    at org.bukkit.craftbukkit.v1_7_R3.help.SimpleHelpMap.<init>(SimpleHelpMap.java:32) ~[craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
        
    at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:201) ~[craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
        
    at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) ~[craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
        
    at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) ~[craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
        
    at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) ~[craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
        
    at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
        
    at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit-1.7.9-R0.2.jar:git-Bukkit-1.7.9-R0.1-6-g4d832c3-b3090jnks]
    [
    14:17:50 ERROR]: This crash report has been saved toC:\Users\Elizabeth\Desktop\Mineworks\Server\Plugins\Cops And Robbers\Test Server\.\crash-reports\crash-2014-06-25_14.17.50-server.txt
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  4. Offline

    mazentheamazin

    BungeeTheCookie
    Try just having the arguments as such:
    Code:
    --nojline
     
  5. Offline

    BungeeTheCookie

    I fixed it. But why do I get the error above? Also, it says this:
    I also get this:
    Code:
    2014-06-25 14:19:44,758 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    mazentheamazin

    Is this a bug with CraftBukkit..? It says NoSuchMethodError so is my set up incorrect?

    Bump.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  6. Offline

    Europia79

    BungeeTheCookie

    if you're using Ant or Maven, you could have it automatically copy the JAR to your server/plugins/ folder:
    HTML:
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <configuration>
                        <tasks>
                            <copy file="../../target/VirtualPlayers.jar" tofile="../../../server/plugins/VirtualPlayers.jar"/>
                        </tasks>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </project>
    Inside my projects folder, I have a /server/ directory that is shared between all my projects.

    BungeeTheCookie

    Can we see all the code ? The full error ? And the crash-report ?

    This is a weird error... Are you sure that your plugin is causing it ? Does the error happen when you don't test thru the IDE ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  7. Offline

    BungeeTheCookie

    My plugin has 6,000 lines of code (it is a minigame) so I don't know if you want to see it. It is not my plugin that is causing it, I think it is the way I have it configured in my IDE. The error does not happen when I do not test through my IDE. I am not using Maven. I am not using Spigot. The way I configured it is the way http://forums.bukkit.org/threads/how-to-easy-test-your-plugin-with-netbeans.124430/ configured it.
     
  8. Offline

    Europia79

  9. Offline

    BungeeTheCookie

  10. Offline

    Europia79

    BungeeTheCookie

    How are you compiling your plugin in IntelliJ ?

    Are you exporting like Eclipse does ? Or do you use a build button like Netbeans ?

    I've never used IntelliJ, but if you're using a build button, then it's possible that IntelliJ is using an Ant build script (behind the scenes) to build your project ? If so, just tell it to automatically copy the JAR to your server/plugins/ folder.
     
  11. Offline

    BungeeTheCookie

    I am now just exporting my jar to my server and I am running it. Thanks, this is now solved.
     
Thread Status:
Not open for further replies.

Share This Page