Java Reference
In-Depth Information
In this chapter you'll add several new applications to your computer,
and add these tools to your toolbox:
• The Java language compiler, javac , and the runtime application,
java
• The Minecraft graphical client
• The Minecraft server that we'll be modifying
CHAPTER 2
Add an Editor and Java
To write programs in Java, you need something to write with: some way of
editing Java text files. While you could use a bare-bones text editor like
Notepad or TextEdit, that's a really painful way to do it.
And you can't use Microsoft Word or another office-style word processor.
Those applications aren't designed for programming, and they don't store
files in a format that Java can use—Word files are filled with fonts, colors,
sizes, and all sorts of formatting information.
What you need is a text editor that's designed for programming. I've got a
good one for you, which we'll see next. You'll also need to install Java to build
and run plugins, and you'll need Minecraft, of course. With all that installed,
you'll be set to build a plugin in the next chapter.
This chapter may contain some new (and possibly cryptic) commands and
potentially confusing concepts. It's okay if you don't know what these mean
and don't understand fully right now; these aren't things you'll run into day-
to-day when writing plugins; they're just a few necessary evils you need to
get everything installed.
Let's start with the editor.
Install an Editor to Write Code
You write plugins and programs by typing in kinda-English words and some
funny punctuation. Most things you write will be longer than a text message
but shorter than an essay in English class. You need a proper editor to type
in your programs. My suggestion is an editor called Sublime Text , shown in
the following screenshot.
 
 
 
Search WWH ::




Custom Search