Build and Install with

The commands you’ve been typing in your terminal window can also be saved into a file; that way you can run them over and over again without having to retype them each time. We call this a shell script, and it’s another way to program the computer.

Building a plugin is only a little more complicated than compiling a single Java file as we did last chapter, but even so, it involves a lot of commands we don’t want to have to type out every time.

To make it easier, I’ve made a shell script for you named that will do the three main steps:[15]

  1. Use javac to compile the .java source to .class files.

  2. Use jar to archive the class files, manifest, and configuration file.

  3. Copy the jar file to the server. ...

Get Learn to Program with Minecraft Plugins, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.