forked from ascholerChemeketa/ThinkCPP2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrjava.ptx
More file actions
52 lines (45 loc) · 2.29 KB
/
Copy pathdrjava.ptx
File metadata and controls
52 lines (45 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<section xml:id="drjava">
<title>Installing DrJava</title>
<p>
The easiest way to start programming in Java is to use a website that compiles and runs Java code in the browser.
Examples include \url{https://repl.it/}, \url{https://trinket.io/}, \url{https://jdoodle.com/}, and others.
</p>
<p>
If you are unable to install software on your computer (which is often the case in public schools and Internet cafés), you can use these online development environments for almost everything in this book.
</p>
<p>
But if you want to compile and run Java programs on your own computer, you will need the following:
<ul>
<li><p>The <em>Java Development Kit</em> (JDK), which includes the compiler, the <em>Java Virtual Machine</em> (JVM) that interprets the compiled byte code, and other tools such as Javadoc.
<idx><h>JDK</h></idx>
<idx><h>JVM</h></idx>
<idx><h>virtual machine</h></idx>
<idx><h>Javadoc</h></idx>
<idx><h>text editor</h></idx>
<idx><h>DrJava</h></idx></p></li>
<li><p>A <em>text editor</em> such as Atom, Notepad++, or Sublime Text, and/or an IDE such as DrJava, Eclipse, jGrasp, or NetBeans.</p></li>
</ul>
</p>
<p>
The JDK we recommend is OpenJDK, an open source implementation of Java<nbsp/>SE (Standard Edition).
The IDE we recommend is DrJava, which is an open source development environment written in Java (see <xref ref="fig_drjava1">Figure</xref>).
</p>
<p>
To install OpenJDK, visit \url{https://adoptopenjdk.net}.
Download and run the installer for your operating system.
</p>
<p>
<idx><h>JAR</h></idx>
To install DrJava, visit \url{http://drjava.org/} and download the <em>JAR</em> file.
We recommend that you save it to your <c>Desktop</c> folder or another convenient location.
Simply double-click the JAR file to run DrJava.
Refer to the DrJava documentation (\url{http://drjava.org/docs/quickstart/}) for more details.
</p>
<figure xml:id="fig_drjava1" >
<caption>DrJava editing the Hello World program.</caption>
<image width="95%" source="images/drjava-hello.png" />
</figure>
<p>
When running DrJava for the first time, we recommend you change three settings from the <em>Edit <m>></m> Preferences</em> menu under <em>Miscellaneous</em>: set the <em>Indent Level</em> to 4, check the <em>Automatically Close Block Comments</em> box, and uncheck the <em>Keep Emacs-style Backup Files</em> box.
</p>
</section>