-
HOME / 06.20.2019
SUMMER MEETING 1 | INSTALLING JAVA
Today, we started learning to program! We chose java as our programming language since its relatively easy to learn and teaches lots of core principles that other languages have.
Before start programming lets discuss a little about why we are using java and not any other language. Officially FRC only supports three languages. Java, C/C++ and LabView a rock well automation competitor. Now when I say officially supports that probably raises the question of what other languages roborio supports? Well students! Kids like me and you have ported a language called Python, a simple math and science based language over to FRC by rebuilding the library's and distributing them to the mass. But for all needs we wont touch python.
Back to the question, Why Java? Whats so great about Java? Well to start java is relatively a simple language to learn. Its human readable which many program languages some times lack. But the method in which you write code is relatively straight forward and easy to comprehend. Java at one point was also a industry standard. Supported by every major computer and all of the web. While today thats less true but java is still relevant.
Now that we know what java is, lets start learning to code! We will need to start by installing the java compiler. This happens to be the largest barrier to entry when learning to program any language. On different Operating systems its a bit different.
If you need help; feel free to contact me on whatsapp or email me.Installing The JDK (Java Development Kit)
To start programming you will need two major tools, the Java Compiler (javac) and the Java executor (Java). These both come packed in the JDK so first well want to navagate to their website. You can start by searching in google for JDK 12 Download. Then selecting the first page. You should be presented with a screen like this! Be sure to select the license agreement. As well as download the bin, Not the exe.
Now this download will take a while, Give it some time. If your internet is slow I applogize. One thing I would suggest for the team is to buy a cheap 8gb usb stick and put all the programming installation on there as a emergency back if we have to uninstall and reinstall things on a pc. While your waiting make a sandwich or make a nice cup of tea! Maybe watch some of our matches at The Blue Alliance.
Once the download is complete unzip it to your desktop or some where you can find it! This is important because we will need to find it again later. After unziping navigate to
C:\Program Filesand create a new folder called Java. After doing that enter the directory and drag the unziped jdk folder you placed on your desktop or where ever and place it inside this folder Java.You may think that were done installing java! But actually were not. While its true we have the program. Our computer has no idea where its at. I made up some arbitrary place for the program files that I and you will remember in the case we need to upgrade or uninstall. But the computer dosent know where to find it. To fix that were going to edit our System Enviorment Variables.
Warning When doing this you may damage something in your system so I advise you to follow these steps exactly and you should be fine.Press your Windows Key and start typing this env you should see something like this :
Select That and you should be presented with something like this! Select the highlighted section of the photo.
Select PATH
Next you should click NEW and paste in C:\Program Files\Java\jdk-12.0.1\bin atleast thats what mine is. Get it from your file browser. After that you should be good. In order to test it We can open the cmd and type javac and java. You should get something back in return.
Congratulations 🎉🎉🎉 If you got it installed and you get something returned. Then you did great. If not, email me or text me on whatsapp. You most likely messed up on the last step. But thats okay. This was pretty hard so far. The next meeting well start programming and running through basic concepts.