30 Jul 2014, 23:16
Generic-user-small

Ryan Kilkenney (2 posts)

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.

31 Jul 2014, 14:28
Andy-talking_pragsmall

Andrew Hunt (199 posts)

Hi Ryan,

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.

thanks!

/\ndy

02 Aug 2014, 21:47
Generic-user-small

Ryan Kilkenney (2 posts)

I’m so dumb! It was a silly typo. Sorry!

02 Aug 2014, 21:58
Andy-talking_pragsmall

Andrew Hunt (199 posts)

No problem ;) Typos are a fact of life. I usually make a dozen before breakfast…

/\ndy

19 Aug 2014, 02:56
Generic-user-small

Max Silberztein (1 post)

Hello Andrew,

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

20 Aug 2014, 14:13
Andy-talking_pragsmall

Andrew Hunt (199 posts)

Hey 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,

/\ndy

14 Mar 2015, 11:47
Generic-user-small

Jack Warr (2 posts)

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

14 Mar 2015, 15:05
Andy-talking_pragsmall

Andrew Hunt (199 posts)

You need to download the files as described on pages xiv and 5…

/\ndy

14 Mar 2015, 17:16
Generic-user-small

Jack Warr (2 posts)

what file(s) do i change from .java to .class

15 Mar 2015, 12:44
Andy-talking_pragsmall

Andrew Hunt (199 posts)

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).

/\ndy

  You must be logged in to comment