summaryrefslogtreecommitdiff
path: root/www/java-setup.html
diff options
context:
space:
mode:
Diffstat (limited to 'www/java-setup.html')
-rw-r--r--www/java-setup.html190
1 files changed, 0 insertions, 190 deletions
diff --git a/www/java-setup.html b/www/java-setup.html
deleted file mode 100644
index b98f516..0000000
--- a/www/java-setup.html
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.6.0">
- <link rel='stylesheet' type='text/css' href='/index.css'>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Java Setup for Windows</title>
-</head>
-<body id="tutorial">
- <h1>Java Setup - Windows</h1>
- <div id="toc">
- <h2>Table of contents</h2>
- <ol>
- <li>
- <a href="#InstallingJava">Installing Java</a>
- <ol>
- <li>
- <a href="#InstallingJava">Downloading the JDK</a>
- </li>
- <li>
- <a href="#InstallingJavaEnv">Setting up your environment</a>
- </li>
- </ol>
- </li>
- <li>
- <a href="#IntelliJSetup">Setting up IntelliJ Community Edition</a>
- <ol>
- <li>
- <a href="#IntelliJSetup">Why IntelliJ</a>
- </li>
- <li>
- <a href="#IntelliJSetupDownload">Downloading</a>
- </li>
- </ol>
- </li>
- <li>
- <a href="#UsingIntelliJ">Using IntelliJ</a>
- <ol>
- <li>
- <a href="#UsingIntelliJPrjCreate">Creating a project</a>
- </li>
- <li>
- <a href="#UsingIntelliJClassCreate">Creating a class</a>
- </li>
- <li>
- <a href="#UsingIntelliJRun">Running your program</a>
- </li>
- <li>
- <a href="#UsingIntelliJDebug">Debugging your program</a>
- </li>
- </ol>
- </li>
- <li>
- <a href="#help">Help</a>
- </li>
- </ol>
- </div>
- <article id="main">
- <h1 id="InstallingJava">Installing Java</h1>
- <p>To install Java you need to install the Java Development Kit (JDK). It
- can be downloaded from here: <a href=
- "https://jdk.java.net/13">https://jdk.java.net/13</a></p>
- <p>You will want to select the zip download for Windows.<br>
- <span class='scaled-half'><img src=
- "/imgs/java-setup/ScreenShot-JavaInstall-1.PNG"></span><br>
- <i>Hover to zoom</i></p>
- <p>After downloading the zip you will want to unzip it (into a folder,
- should by default) and then copy that folder into <code class=
- 'inline'>C:\Program Files\Java\</code></p><br>
- <span class='scaled-half'><img src=
- "/imgs/java-setup/ScreenShot-JavaInstall-2.PNG"></span><br>
- <i>Hover to zoom</i>
- <p>When I did this myself, it unzipped into a folder <code class=
- "inline">jdk-13.0.1</code>. By the end you should have the following folder
- structure: <code class='inline'>C:\Program Files\Java\jdk-13.0.1</code></p>
- <h2 id="InstallingJavaEnv">Setting up your environment</h2>
- <p>In order to make the JDK discoverable by your programs you need to add
- the JDK folder to your PATH environment varible. This is best done by first
- setting up a varible for the java directory <code class=
- 'inline'>JAVA_HOME</code> that points directly to the directory you copied
- the unzipped files into.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-3.PNG'></span><br>
- <i>Hover to zoom</i>
- <p>Once you&#39;ve setup the <code class='inline'>JAVA_HOME</code> variable
- you can add that varible to your PATH point to the subdirectory
- <code class='inline'>/bin</code>. This can be confusing if you haven&#39;t
- done this before. <a href=
- "https://stackoverflow.com/questions/44272416/how-to-add-a-folder-to-path-environment-variable-in-windows-10-with-screensho">
- Here is a StackOverflow article</a> how to add environments variables in
- Java 10.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-4.PNG'></span><br>
- <i>Hover to zoom</i>
- <p>Optionally, if you want to test that this worked, you can open up the
- command prompt (or powershell) by opening the start menu and typing/looking
- for cmd.exe. Then you can type <code class='inline'>java -version</code>
- which will output the version and some additional information. You should
- see <code class='inline'>java version 13.0.1</code>.</p>
- <h1 id="IntelliJSetup">IntelliJ Community Edition</h1>
- <p>I recommend using IntelliJ Community Edition instead of Eclipse.
- They&#39;re both open source but I use IntelliJ at my job daily and its a
- fantastic, out of the box editor. Where Eclipse requires a lot more setup
- steps and plugins to get it to be &quot;complete&quot;. Feature wise they
- do the same things, so everything they do in Udemy via Eclipse should work
- in IntelliJ.</p>
- <h2 id="IntelliJSetupDownload">Downloading</h2>
- <p>To Download go to <a href=
- "https://www.jetbrains.com/idea/download/#section=windows">www.jetbrians.com/idea/download</a>
- and click the Exe download for community edition.</p><br>
- <span class="scaled-half"><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-5.PNG'></span><br>
- <i>Hover to zoom</i>
- <p>Once the download is complete you can run the installer. You should
- select your theme, then just use the &quot;Install defaults&quot; option at
- the bottom, or just Next through the rest of setup, as you shouldn&#39;t
- need any additional plugins. And if you do they all can be installed
- later</p>
- <p><b>You&#39;re Done! You can start Udemy now just ignoring their
- install/setup instructions. I have some additional steps below to help
- verify everything works and do some basic operatoins in IntelliJ (Create a
- Project, Create a class, Run/Debug) but you can refer back to here once you
- get there in Udemy</b></p>
- <h1 id="UsingIntelliJ">Using IntelliJ</h1>
- <p>Jetbrains actually has a whole <a href=
- "https://www.jetbrains.com/help/idea/guided-tour-around-the-user-interface.html">
- FAQ/Tutorial section</a> that can help you with any questions too. But here
- is a brief overview of the core functions of IntelliJ</p>
- <h2 id="UsingIntelliJPrjCreate">Creating a project</h2>
- <p>When you first open IntelliJ it shows a splash screen where you can open
- an existing project or create a new one. You will at first want to create a
- new project.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-6.PNG'></span><br>
- <i>Hover to zoom</i>
- <p>You want to choose a java (the default) and select the version of the
- JDK (should default to 13.0.1, if not click browse and navigate to the
- folder you copied it to from the first step: <code class=
- 'inline'>C:\Program Files\Java\jdk-13.0.1</code>.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-7.PNG'></span><br>
- <i>Hover to zoom</i>
- <p>Then you can name the project and choose the directory you want to files
- in.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-8.PNG'></span><br>
- <i>Hover to zoom</i>
- <p>Now you should have a project setup that you can create your program
- in!</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-9.PNG'></span><br>
- <i>Hover to zoom</i>
- <h2 id="UsingIntelliJClassCreate">Creating a class</h2>
- <p>To create a class in IntelliJ you should expand the projects menu on th
- left side and right click the <code class='inline'>src</code> folder. You
- then select &quot;create class&quot;. This will add it directly into your
- src folder.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-10.PNG'></span><br>
- <i>Hover to zoom</i>
- <p>From here you can start writing code!</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-11.PNG'></span><br>
- <i>Hover to zoom</i>
- <h2 id="UsingIntelliJRun">Running a Program</h2>
- <p>Java code is executed from the main method <code class='inline'>public
- static void main(String[] args)</code>. You can run your main method by
- either right clicking within it and selecting run. Or when the file
- containing your main method is open using the Run button at the top right
- of the editor.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-12.PNG'></span><br>
- <i>Hover to zoom</i>
- <h2 id="UsingIntelliJDebug">Debugging a Program</h2>
- <p>To debug you can set breakpoints in your code by selecting the left hand
- side by the line numbers. This will add a red dot which tells the program
- to pause executing when it reaches the code at that line. To do this you
- need to run in debug mode (rather than plain run mode) by right clicking
- your main method and choosing Debug, or by using the debug icon at the top
- right of the editor window.</p><br>
- <span class='scaled-half'><img src=
- '/imgs/java-setup/ScreenShot-JavaInstall-13.PNG'></span><br>
- <i>Hover to zoom</i>
- <h1 id="help">Additional Help</h1>
- <p>If you need any help at all feel free to text or email. If its a code
- issue, either a screenshot of the code or the code itself will help!</p>
- </article>
-</body>
-</html>