I recently acquired the source code for an old bukkit plugin and I was wondering how to compile it into a usable JAR file. Specifically, there are seven .java files in here with different names and I'm not sure what role each one serves in the compilation process. I'm not even entirely sure that they're all related to the same plugin. The files' names are:
commands.java
confighandler.java
converter.java
functions.java
gold2economy.java
permissions.java
server.java
The name of the plugin is Gold2economy
Rollback Post to RevisionRollBack
416 stone 296 stone slab (150 blocks) 149 stone stairs (228 blocks)
Search engine results almost invariably told me a bunch of bullcrap about how I had to download and run Buildtools, install Eclipse, blah blah blah... but I think those were all based on the assumption that the reader wanted to actually write and compile their own code, not just download someone else's stuff from Github and compile it. When I removed all references to bukkit and plugins from my search terms, and just asked about compiling java source code, it SEEMED like the solution was pretty simple: navigate to wherever the .java file was and run javac on it. I tried that and this was what the terminal gave me:
wds@X-23:~/Desktop/Gold2iConomy-5d787b1d8789ba2d1c6d81ce861b353e36a93904/src/com/edtheloon/gold2economy$ javac gold2economy.java
gold2economy.java:9: error: package org.bukkit.event.Event does not exist
import org.bukkit.event.Event.Priority;
^
gold2economy.java:10: error: package org.bukkit.event.Event does not exist
import org.bukkit.event.Event.Type;
^
gold2economy.java:11: error: package org.bukkit.plugin does not exist
import org.bukkit.plugin.PluginManager;
^
gold2economy.java:12: error: package org.bukkit.plugin.java does not exist
import org.bukkit.plugin.java.JavaPlugin;
^
gold2economy.java:13: error: package com.iConomy does not exist
import com.iConomy.*;
^
gold2economy.java:14: error: package com.nijiko.permissions does not exist
import com.nijiko.permissions.PermissionHandler;
^
gold2economy.java:15: error: package cosine.boseconomy does not exist
import cosine.boseconomy.BOSEconomy;
^
gold2economy.java:17: error: cannot find symbol
public class gold2economy extends JavaPlugin {
^
symbol: class JavaPlugin
gold2economy.java:26: error: cannot find symbol
public static configHandler config;
^
symbol: class configHandler
location: class gold2economy
gold2economy.java:27: error: cannot find symbol
public static iConomy iConomyPlugin = null;
^
symbol: class iConomy
location: class gold2economy
gold2economy.java:28: error: cannot find symbol
public static BOSEconomy BOSEconomyPlugin = null;
^
symbol: class BOSEconomy
location: class gold2economy
gold2economy.java:29: error: cannot find symbol
public static PermissionHandler permissionHandler = null;
^
symbol: class PermissionHandler
location: class gold2economy
gold2economy.java:31: error: cannot find symbol
public static PluginManager pm = null;
^
symbol: class PluginManager
location: class gold2economy
gold2economy.java:40: error: cannot find symbol
config = new configHandler(this);
^
symbol: class configHandler
location: class gold2economy
gold2economy.java:50: error: cannot find symbol
pm = getServer().getPluginManager();
^
symbol: method getServer()
location: class gold2economy
gold2economy.java:51: error: cannot find symbol
pm.registerEvent(Type.PLUGIN_ENABLE, new server(this), Priority.Monitor, this);
^
symbol: variable Type
location: class gold2economy
gold2economy.java:51: error: cannot find symbol
pm.registerEvent(Type.PLUGIN_ENABLE, new server(this), Priority.Monitor, this);
^
symbol: class server
location: class gold2economy
gold2economy.java:51: error: cannot find symbol
pm.registerEvent(Type.PLUGIN_ENABLE, new server(this), Priority.Monitor, this);
^
symbol: variable Priority
location: class gold2economy
gold2economy.java:52: error: cannot find symbol
pm.registerEvent(Type.PLUGIN_DISABLE, new server(this), Priority.Monitor, this);
^
symbol: variable Type
location: class gold2economy
gold2economy.java:52: error: cannot find symbol
pm.registerEvent(Type.PLUGIN_DISABLE, new server(this), Priority.Monitor, this);
^
symbol: class server
location: class gold2economy
gold2economy.java:52: error: cannot find symbol
pm.registerEvent(Type.PLUGIN_DISABLE, new server(this), Priority.Monitor, this);
^
symbol: variable Priority
location: class gold2economy
gold2economy.java:55: error: cannot find symbol
getCommand("gi").setExecutor(new Commands());
^
symbol: class Commands
location: class gold2economy
gold2economy.java:55: error: cannot find symbol
getCommand("gi").setExecutor(new Commands());
^
symbol: method getCommand(String)
location: class gold2economy
gold2economy.java:58: error: cannot find symbol
log.info("[Gold2Economy] Version " + this.getDescription().getVersion().toString() + " enabled.");
^
symbol: method getDescription()
gold2economy.java:63: error: cannot find symbol
log.info("[Gold2Economy] Version " + this.getDescription().getVersion().toString() + " disabled.");
^
symbol: method getDescription()
25 errors
So, halp?
Rollback Post to RevisionRollBack
416 stone 296 stone slab (150 blocks) 149 stone stairs (228 blocks)
Search engine results almost invariably told me a bunch of bullcrap about how I had to download and run Buildtools, install Eclipse, blah blah blah... but I think those were all based on the assumption that the reader wanted to actually write and compile their own code, not just download someone else's stuff from Github and compile it. When I removed all references to bukkit and plugins from my search terms, and just asked about compiling java source code, it SEEMED like the solution was pretty simple: navigate to wherever the .java file was and run javac on it. I tried that and this was what the terminal gave me:
So, halp?
you actually do need all that, plugins require libraries to build against. buildtools gives you these libraries and Eclipse handles all the compiling and issues. also, you are going to have to learn coding to compile that for a new version as IConomy no longer exists. (one of the missing libraries referenced in your error log)
you actually do need all that, plugins require libraries to build against. buildtools gives you these libraries and Eclipse handles all the compiling and issues. also, you are going to have to learn coding to compile that for a new version
Who said anything about a new version? This is for my Bukkit 1060 (beta 1.7.3) server.
Rollback Post to RevisionRollBack
416 stone 296 stone slab (150 blocks) 149 stone stairs (228 blocks)
Who said anything about a new version? This is for my Bukkit 1060 (beta 1.7.3) server.
do you have a working copy of iconomy? (not iconomy reloaded) you will need that before you can hope to get this to compile for any version. last i checked iconomy died in 1.6, it MIGHT still work it might not
I'm not sure what went wrong but I can give you a couple of clues. First, the version of Gold2economy that works with Bukkit 1337 is only 11.8 kb, and your jar is three times that size. It seems like you compiled some things that you probably shouldn't have. Second, why did your jar have "vault" in the name? Did you try to throw the Vault plugin into the compilation process somewhere? I don't think that Vault even existed back in the Beta days :\
EDIT: The Adventure Update occurred on September 14, 2011. The Vault project did not begin until five and a half weeks later, on October 21, according to the bukkit website. So Vault should definitely not be part of this in any way.
All right, I have another idea. Judging by the commit dates, it's quite likely that the plugin's author sent me the wrong commit. Try this one instead:
I recently acquired the source code for an old bukkit plugin and I was wondering how to compile it into a usable JAR file. Specifically, there are seven .java files in here with different names and I'm not sure what role each one serves in the compilation process. I'm not even entirely sure that they're all related to the same plugin. The files' names are:
commands.java
confighandler.java
converter.java
functions.java
gold2economy.java
permissions.java
server.java
The name of the plugin is Gold2economy
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
Search engine results almost invariably told me a bunch of bullcrap about how I had to download and run Buildtools, install Eclipse, blah blah blah... but I think those were all based on the assumption that the reader wanted to actually write and compile their own code, not just download someone else's stuff from Github and compile it. When I removed all references to bukkit and plugins from my search terms, and just asked about compiling java source code, it SEEMED like the solution was pretty simple: navigate to wherever the .java file was and run javac on it. I tried that and this was what the terminal gave me:
So, halp?
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
you actually do need all that, plugins require libraries to build against. buildtools gives you these libraries and Eclipse handles all the compiling and issues. also, you are going to have to learn coding to compile that for a new version as IConomy no longer exists. (one of the missing libraries referenced in your error log)
Who said anything about a new version? This is for my Bukkit 1060 (beta 1.7.3) server.
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
do you have a working copy of iconomy? (not iconomy reloaded) you will need that before you can hope to get this to compile for any version. last i checked iconomy died in 1.6, it MIGHT still work it might not
Yes, I have an appropriate iConomy jar, though I cannot remember where I got it
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
Oh, right, the Wayback machine had an archived copy of the Bukkit website.
Anyway, how do I compile this plugin?
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
Send me the sources, I can probobly compile it.
I don't know how to send you anything but I can point you to the same "commit" on Github that the plugin's author pointed me to:
https://github.com/EdTheLoon/Gold2iConomy/commit/5d787b1d8789ba2d1c6d81ce861b353e36a93904
If you need appropriately old versions of Craftbukkit and iConomy to "build against" or whatever, I can point you to those too.
Thanks.
EDIT:
old iConomy version 6.0.5b for Bukkit 1060: https://web.archive.org/web/20130125203555/http://dev.bukkit.org/server-mods/iconomy/files/5-6-0-5b/
Lots of old versions of Craftbukkit (requires you to accept Google's evil cookies): https://drive.google.com/drive/folders/0B3_qSeCQW2vKSy13TVdKWWhNQ3M
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
Can't compile it, as versions below I think 1.8 do not compile and don't exist in that google drive file. (If you can please send me your .jar file)
It's definitely in there. I just downloaded it again to be sure. It's the one labeled "craftbukkit-1060-6f67ce03005ab3f51cb0f6401c5bd8a1996497f0.jar"
The oldest Craftbukkit that's available from that archive is 705, which corresponds to Beta 1.5, definitely below 1.8.
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
Huh, ok I'll find it.
https://www.mediafire.com/file/j958g8dpii6b9bv/Gold2Economy-Vault-DEV-source.jar/file
Didn't work
I'm not sure what went wrong but I can give you a couple of clues. First, the version of Gold2economy that works with Bukkit 1337 is only 11.8 kb, and your jar is three times that size. It seems like you compiled some things that you probably shouldn't have. Second, why did your jar have "vault" in the name? Did you try to throw the Vault plugin into the compilation process somewhere? I don't think that Vault even existed back in the Beta days :\
EDIT: The Adventure Update occurred on September 14, 2011. The Vault project did not begin until five and a half weeks later, on October 21, according to the bukkit website. So Vault should definitely not be part of this in any way.
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)
Can't really help you any more as its a problem with the source code, Sorry.
All right, I have another idea. Judging by the commit dates, it's quite likely that the plugin's author sent me the wrong commit. Try this one instead:
https://github.com/EdTheLoon/Gold2iConomy/tree/f3c761dc00a9908123a8b596f3590f7c0e61838d
416 stone
296 stone slab (150 blocks)
149 stone stairs (228 blocks)
794 total stone
1082 blackstone
174 blackstone slab (87 blocks)
52 blackstone stairs (78 blocks)
1247 total blackstone
(not counting drawbridges and portcullises)