<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Corey Jones on Medium]]></title>
        <description><![CDATA[Stories by Corey Jones on Medium]]></description>
        <link>https://medium.com/@corey.jones?source=rss-e8a239f54e4a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ay6-zrJOTSGb7X3cDKppvw.png</url>
            <title>Stories by Corey Jones on Medium</title>
            <link>https://medium.com/@corey.jones?source=rss-e8a239f54e4a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:51:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@corey.jones/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Leaving the IDE Safety Net]]></title>
            <link>https://medium.com/@corey.jones/leaving-the-ide-safety-net-73baa5dbe87?source=rss-e8a239f54e4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/73baa5dbe87</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Corey Jones]]></dc:creator>
            <pubDate>Sat, 02 Sep 2017 04:38:52 GMT</pubDate>
            <atom:updated>2017-09-02T04:41:29.047Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve seen how to run my programs in the command prompt (or terminal for mac), but never really had a reason to do so outside the warm, comfortable, debugging IDE environment. “Yeah, you just go to your folder where the source code is, type ‘javac ProgramName.java’ and viola, it’s just like the IDE.” Yeah… right.</p><h3>First Things First</h3><p>After typing “run java…” into YouTube, you instantly get your options of “… in cmd/terminal”. The instructions will include navigating to the directory where your program’s .java files are found, then using the javac command to compile it. This is where we figure out if the Java Development Toolkit (JDK) is installed or not. The negative outcome being a prompt that the command is not valid. While the affirmative can be checked by opening a fresh command prompt window, type “javac” and press ENTER, and you should see the below ouput.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*0fOYFKApiu_Z9Dm42EwGAw.png" /></figure><p>Setting up Java in your IDE is <em>not</em> the same thing as installing JDK on your machine. Once you download the most recent version from <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Oracle’s website</a>, the installation is a simple setup wizard.</p><h3>The Plot Thickens</h3><p>Now I have the JDK installed on my machine and there’s nothing to stop me now. Start up cmd, get to my directory, javac MyProgram.java, and I should see a prompt for…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*5RsWIKn3h5QYmUwBrn8IRg.png" /></figure><p>Oh, the good ol’ “ ‘javac’ is not recognized as an internal or external command, operable program or batch file.”-error. How could I have been so careless?</p><p>Even though the JDK is installed on my computer, Windows doesn’t necessarily know to go looking for all those executable files that we’ve downloaded and installed. We need to “set the path” in order for that to happen. Well, we actually have to set two paths.</p><p>The first is the path to the JDK bin folder. This path is called an <em>environment variable</em>, which can be changed and set permanently through Windows System Properties. Search for “Edit the system environment variables”, and that should bring up the window below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*FIuWm2JmbKWuEaTFj6QUwQ.png" /></figure><p>Next, click on the <em>Environment Variables</em> button. Under <em>System Variables</em>, find the <em>Path </em>variable, select it and click the <em>Edit </em>button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*IthNFOBufT2pSIhIMC3lMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*tfpItxyXamPVrMoHlzWChg.png" /></figure><p>Now, you may already have some things in the <em>Variable value </em>field. However, what you <em>don’t</em> have is the path for your JDK. This path is simply the file path to the bin folder which should look something like this: C:\Program Files (x86)\Java\jdk1.8.0_121\bin. Copy that file path and paste it into the <em>Variable value</em> field. Don’t forget to add a semi-colon after the last value if there was something in there already. Oh semi-colons….Click <em>OK</em> on all those windows and you’re done.</p><p>The last path we have to set is the classpath. This is similar to the previous path. Go ahead and navigate to your Java folder again, but this time to the JRE folder. Open the lib folder, then locate the rt.jar file and copy its file path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*ugeGreg4VqF-Ti-cboijzw.png" /></figure><p>This time, we’re actually going to open the command prompt again. Let’s navigate again to the folder where the Java source code is located. Try the “javac MyProgram.java” again. This time it should work, and by work I mean it will just think for a second and go to the next line. We still need to set our classpath. We can do so by typing “ set classpath= “C:\Program Files (x86)\Java\jre1.8.0_144\lib\rt.jar”; ”. If you notice, that is the JRE file path we copied.</p><h3>This is It. Don’t Get Scared Now.</h3><p>Finally. At this point, we’ve installed the JDK, set path and class path, and compiled our program. If you use the <em>dir</em> command now, you can see that there is now a .class file in the source code folder. This is your compiled source code and what is about to be put through the Java Virtual Machine. Then next command is <em>java</em> and that .class file’s name. This file name <strong>IS CAPS SENSITIVE</strong>! You also do not need to put “.class” at the end. Otherwise, you will get an error saying that it couldn’t find or load the main class. The other reasons you may get this error would be missing source code files or folder location issues. Below is a final overview of a successful run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*gmau8nmJ1LJv_c1RtuSXvA.png" /></figure><p>It’s very interesting to me that I found tutorials for all the individual errors or pitfalls (e.g. javac not recognized, main class not found, etc.), and examples of the process executed flawlessly, but nothing that started from a beginner’s stage and tackled all these (apparently) common issues. I felt the need for a meta-tutorial, and I hope this helps others from start to finish.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73baa5dbe87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Totally Know Java]]></title>
            <link>https://medium.com/@corey.jones/i-totally-know-java-e8982d43ab54?source=rss-e8a239f54e4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8982d43ab54</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Corey Jones]]></dc:creator>
            <pubDate>Mon, 28 Aug 2017 06:21:03 GMT</pubDate>
            <atom:updated>2017-08-28T06:21:03.170Z</atom:updated>
            <content:encoded><![CDATA[<p>I know enough about the Java programming language to be dangerous. How dangerous? Let’s just say if you need some program to calculate workers’ hours and spit out some basic analytical data, or something that manages train departure and arrival times, I got you. Mind-blowing, right? All this programming prowess, but I don’t really know how to get my source code from the rugged terrain of a command line or IDE, into a file that can be downloaded, double-clicked and there’s the GUI. This week, I’ll figure out how to take my code from the IDE and locally executed command line, to a user friendly, executable program.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8982d43ab54" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>