When I use the build.sh command the shell it says that bukkit.jar is not installed at the server file. When I open the server file (through the command prompt and actually opening the file it says bukkit.jar is there. Sorry if the answer to my problem is really simple I’m new here. Thanks in advance.
You’ll need to share some details. Odds are it’s just a simple typo somewhere, a missing backslash, that sort of thing.
Show us your build.sh and an ls of the server directory, and a pwd there as well.
I’m so dumb! It was a silly typo. Sorry!
No problem ;) Typos are a fact of life. I usually make a dozen before breakfast…
thanks for your great book! We are studying it with my child Avram.
In chapter 3, the .jar file that is copied to the server/plugins directory has the wrong filename.
More precisely: we stored the HelloWorld.java file in the following directory: /Users/avram/Desktop/JavaProgs/src
Top of p. 38, you mention that the file in the server/plugins created by build.sh should be “HelloWorld.jar”. However, for us it is “JavaProgs.jar”.
I am concerned that as we create several plugins in our JavaProgs/src directory, they will all get copied to server/plugins as “JavaProgs.jar”, instead of having each their own right filename.
How can we modify build.sh so that we can write more than one plugin in the src directory ?
Again: thanks for the exciting time I am having with my son! Best –Max
You’re right, that won’t work. You need to create plugins according to the conventions of Java (which frankly I find ugly, but I don’t run the asylum ;).
So you can’t store HelloWorld.java in /JavaProgs/src. You need to make a subdirectory for each plugin, and a src/ under that which contains a subdirectory with the package name, and in THERE you have the .java file.
Take a look at the picture at the top of page 7 in the “Move around in File Directories” section. That shows the correct layout. You need a top level directory named for the plugin (in this case, HelloWorld), and under that the src/ and then helloworld/ (the package name) and finally in that directory the HelloWorld.java.
There are ways to get around all that and do it “flatter”, but that just confuses all the other Java tools that expect this sort of file layout.
Hope this helps,
Hey Andy, You’re book is great and its an awesome start to the java language. i am just struggling a little on pg 37 with the three steps. what is the .java source files and where are they. many thanks Jack
You need to download the files as described on pages xiv and 5…
what file(s) do i change from .java to .class
build.sh will do that for you (also, this is the forum for the 1st edition – the Bukkit version, which is not supported any more).
|You must be logged in to comment|