Hey guys, I am having trouble making a plugin specifically when I export it to a JAR file and try to run a server to test it. The plugin is just a basic plugin so I can see how it turns out. Here is the log when I try to run it:
C:\Users\John\Desktop\Bukkit Server>java -Xms1024M -Xmx1024M -jar craftbukkit.ja
r -o true
229 recipes
27 achievements
19:24:18 [INFO] Starting minecraft server version 1.5.2
19:24:18 [INFO] Loading properties
19:24:18 [INFO] Default game type: SURVIVAL
19:24:18 [INFO] Generating keypair
19:24:19 [INFO] Starting Minecraft server on *:25565
19:24:19 [INFO] This server is running CraftBukkit version git-Bukkit-1.5.2-R0.1
-b2771jnks (MC: 1.5.2) (Implementing API version 1.5.2-R0.1)
19:24:19 [SEVERE] Could not load 'plugins\TestPlugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: com.
gmail.John.Alexiades.TestPlugin
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:184)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
java:305)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:230)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.ja
va:239)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:21
7)
at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55)
at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11
)
at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.jav
a:106)
at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java
:382)
at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:5
73)
Caused by: java.lang.ClassNotFoundException: com.gmail.John.Alexiades.TestPlugin
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
.java:80)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:53)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:173)
... 9 more
19:24:19 [INFO] Preparing level "world"
19:24:20 [INFO] ----- Bukkit Auto Updater -----
19:24:20 [INFO] It appears that you're running a Beta Build, when you've specifi
ed in bukkit.yml that you prefer to run Recommended Builds.
19:24:20 [INFO] If you would like to be kept informed about new Beta Build relea
ses, it is recommended that you change 'preferred-channel' in your bukkit.yml to
'beta'.
19:24:20 [INFO] With that set, you will be told whenever a new version is availa
ble for download, so that you can always keep up to date and secure with the lat
est fixes.
19:24:20 [INFO] If you would like to disable this warning, simply set 'suggest-c
hannels' to false in bukkit.yml.
19:24:20 [INFO] ----- ------------------- -----
19:24:20 [INFO] Preparing start region for level 0 (Seed: -8753948271163627962)
19:24:21 [INFO] Preparing spawn area: 8%
19:24:22 [INFO] Preparing spawn area: 24%
19:24:23 [INFO] Preparing spawn area: 33%
19:24:24 [INFO] Preparing spawn area: 49%
19:24:25 [INFO] Preparing spawn area: 62%
19:24:26 [INFO] Preparing spawn area: 78%
19:24:27 [INFO] Preparing spawn area: 99%
19:24:27 [INFO] Preparing start region for level 1 (Seed: -8753948271163627962)
19:24:28 [INFO] Preparing spawn area: 87%
19:24:28 [INFO] Preparing start region for level 2 (Seed: -8753948271163627962)
19:24:29 [INFO] Server permissions file permissions.yml is empty, ignoring it
19:24:29 [INFO] Done (9.345s)! For help, type "help" or "?"
>
I am using Eclipse when I am exporting and I am I select, "Export generated class filed and resources" Before when I selected, "Export all output folders for checked projects" I get a problem with the plugin.yml file not being detected. I am really not sure what the problem is though, help is greatly appreciated!
Hey guys, I managed to figure out the problem. It turn's out the plugin.yml file had a problem like I suspected before. What I forgot to do was write the name of the class in the main part. Instead I only went up to the package.
I am using Eclipse when I am exporting and I am I select, "Export generated class filed and resources" Before when I selected, "Export all output folders for checked projects" I get a problem with the plugin.yml file not being detected. I am really not sure what the problem is though, help is greatly appreciated!