Skip to content

Commit

Permalink
Added Java support
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-bateman committed Sep 24, 2017
1 parent 5d213d7 commit ab7e2f2
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
12 changes: 12 additions & 0 deletions _data/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
# status: (If there is TravisCI or no)[bool]
# ruby: (If the project uses Ruby)[bool]
# python: (If the project uses Python)[bool]
# java: (If the project uses Java)[bool]
# languages: (All the other languages)[bool]
# html:
# css:
# javascript:
# python:
# applescript:
# apache:
# java: (Name of main file)[string]
# license: (The type of license)[string - gpl, apache, mit]

michaelbateman.ca:
Expand All @@ -36,6 +38,16 @@ michaelbateman.ca:
apache: True
license: gpl

Math-Calculator:
name: Math Calculator
description: My first java project which is a simple math calculator for some simple formulas.
github: Math-Calculator
link: math-calculator
status: False
java: True
languages:
java: Calculator


beta.michaelbateman.ca:
name: Beta personal website
Expand Down
37 changes: 36 additions & 1 deletion _includes/cloning.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ <h2 class="card-title">Development Guide</h2>
Python
</li>
{% endif %}
{% if project.java %}
<li>
Java
</li>
{% endif %}
<br />
Most modern computers come with Git installed. If you do not have it installed, you can download it at <a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a>.
<br /><br />
Expand All @@ -32,7 +37,7 @@ <h2 class="card-title">Development Guide</h2>
<b>Note</b> - To install Jekyll you must have already installed Ruby.
{% endif %}
{% if project.python %}
Make sure you have Python downloaded on your machine. Most modern Mac's come with Python pre-installed. You can check to see if Python is installed by typing:
Make sure you have Python installed on your machine. Most modern Mac's come with Python pre-installed. You can check to see if Python is installed by typing:
<br /><br />
<code>
$ python
Expand All @@ -49,6 +54,9 @@ <h2 class="card-title">Development Guide</h2>
<br /><br />
Press <kbd><kbd>control</kbd> + <kbd>z</kbd></kbd> to exit the Python interpreter.
{% endif %}
{% if project.java %}
Make sure you have Java installed. Java does not usually come installed with your computer. To install it, head to <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a>. Now, click on the Java only download, not the Net Beans one. Follow the prompts, to ensure that Java is fully installed.
{% endif %}
<br /><br />
<b>Note</b> - Do not type the <code>$</code> as it is a reminder that it is a command, to be entered on the command line.
<br /><br />
Expand Down Expand Up @@ -90,6 +98,33 @@ <h2 class="card-title">Development Guide</h2>
$ python &lt;file_name&gt;
</code>
{% endif %}
{% if project.java %}
Navigate to the project directory by using the <code>cd</code> command. Type:
<br /><br />
<code>
$ cd {{ project.github }}
</code>
<br /><br />
Since this project was made with Eclipse, you will need to <code>cd</code> into the <code>src</code> direcory. Enter:
<br /><br />
<code>
$ cd src/
</code>
<br /><br />
Now, we type the following to compile the code:
<br /><br />
<code>
$ javac {{ project.languages.java }}.java
</code>
<br /><br />
Then run the code by typing:
<br /><br />
<code>
$ java {{ project.languages.java }}
</code>
{% endif %}
<br /><br />
Now, the program should work!
</p>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion _includes/project-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2 class="card-title">Project Links</h2>
</div>
<br />
{% endif %}
{% if project.languages.html or project.ruby or project.languages.css or project.languages.javascript or project.python or project.languages.applescript or project.languages.apache %}
{% if project.languages.html or project.java or project.ruby or project.languages.css or project.languages.javascript or project.python or project.languages.applescript or project.languages.apache %}
<div class="card">
<div class="card-block">
<h2 class="card-title">Badges</h2>
Expand Down Expand Up @@ -56,6 +56,9 @@ <h2 class="card-title">Badges</h2>
{% if project.languages.apache %}
<img src="https://img.shields.io/badge/Language-ApacheConf-lightgrey.svg">
{% endif %}
{% if project.java %}
<img src="https://img.shields.io/badge/Language-Java-b07219.svg">
{% endif %}
{% if project.license == "mit" %}
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
{% endif %}
Expand Down
8 changes: 8 additions & 0 deletions projects/math-calculator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: project
title: Math Calculator
permalink: /math-calculator/
project: Math-Calculator
---

This was one of my first projects I made in Java. It contains 3 calculators, a Pythagorean Theorem calculator, Mod simplifier, and Volume of a Sphere calculator.

0 comments on commit ab7e2f2

Please sign in to comment.