small medium large xlarge

Generic-user-small
30 Jul 2014, 23:16
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.

Andy-talking_pragsmall
31 Jul 2014, 14:28
Andrew Hunt (214 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

Generic-user-small
02 Aug 2014, 21:47
Ryan Kilkenney (2 posts)

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

Andy-talking_pragsmall
02 Aug 2014, 21:58
Andrew Hunt (214 posts)

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

/\ndy

Generic-user-small
19 Aug 2014, 02:56
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

Andy-talking_pragsmall
20 Aug 2014, 14:13
Andrew Hunt (214 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

Generic-user-small
14 Mar 2015, 11:47
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

Andy-talking_pragsmall
14 Mar 2015, 15:05
Andrew Hunt (214 posts)

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

/\ndy

Generic-user-small
14 Mar 2015, 17:16
Jack Warr (2 posts)

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

Andy-talking_pragsmall
15 Mar 2015, 12:44
Andrew Hunt (214 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