r/learnjava • u/[deleted] • May 11 '20
Tutorials on learning how to build/compile Java and understanding Java environments
I've been coding in Java for school for a year now and feel like I understand the language quite well, but the one part of the language that has always mystified me was understanding how to build the projects. Acronyms like JDK, JRE and tools like gradle and maven and getting them set up in super complex IDEs like Eclipse or Intellij (I'm use to vim so just generally allergic to huge IDEs).. even after a year I don't really have a firm grasp on what any of these mean. Can anyone please recommend some tutorials that will help me to finally understand how it all works? Thanks!!
7
u/Merry_Macabre May 11 '20
Use beginnersbook.com for easily understandable explanations on Core Java.
Use hyperskill.org for applying what you know by building actual programs. There are varying difficulties of projects that you can do from building an easy chat bot program to building your own text editor. There is a plethora of projects and the main aim of the website is to teach by applying knowledge. The website does not concentrate on the theory side of things as it wants the user to research it themselves. It only gives a small but sufficient amount of theory on each concept. The website has a map of all the concepts that you have applied in your projects and will highlight them green if the concept has been mastered. (Side note: the website has an online editor, but if you have Intellij then just download EduTools add-on and then you can complete the project entirely from your IDE)
2
5
u/Camel-Kid May 11 '20
I don't know about tutorials but I learned most of it by just doing, trial and error is your best friend. There might be some pluralsight training videos out there but these things come with experience in my opinion. They really aren't that difficult and I know that maven courses exist, that's probably the hardest of the things you mentioned.
-2
28
u/Slickbock May 11 '20
As a head start, I'll throw a few hints.
Maven and Gradle are build tools, they basically each have a file that describes how the application should compile (it can do more advanced things like deploy stuff etc). Gradle uses a build.gradle file and maven uses a pom.xml file. On a basic level, they contain usually the applications dependencies and the goals (package into Jar, War etc).
The applications can be built using maven and Gradle by doing something like "mvn clean package" or "gradle clean build" as examples. They both really do the same thing so it doesn't matter which you choose. I'd research one and get comfortable with it, then move onto another if you feel the need. I started with maven and now use Gradle for work.
In terms of JDK and JRE:
JDK stands for Java Development Kit and is required to do any Java dev basically.
JRE stands for Java Runtime Environment and is required to run any java application.
I will say it's probably worth your while to pickup something like Eclipse or IntelliJ and get used to using an IDE, you'll find that once comfortable, your speed of dev will increase and it catches a lot of errors/issues you'd otherwise miss. Theres a reason they're industry standard. I dont have any tutorials I'm afraid other than knowing what all these things are and googling any specific issues I come across when working on something, I learnt by doing.
Apologies if this is a bit of a ramble, I've typed it on mobile while still half asleep at 7am haha. Hope it is helpful anyway.