Java Fundamentals 1: Setting Up Your Development Environment

 

Starting our journey in Java. Beyond Coding, A Thriving Community




Welcome to the journey of Programming in Java. We together going on an exciting journey of learning Java from scratch. As we learn to write code that not only works but also shines with elegance and logic.

Before we start this journey, I want to let you know that in learning of Java I face lots of challenges like inconsistency, loose interest and so on. I am still learning and that's why I started to write blogs and create this awesome community of Java Developers. I am telling this because you may also face this kind of challenges, but we'll overcome it one by one. So, let's get started...

What is Java? 

Java is High-Level, Object-oriented programming language that allows you to build amazing things like games, apps, and websites. 

too technical right? Let's breakdown the definition.

  • High-level: - High-level Languages means that are closer to human readable. HLL (High Level Languages) are easier for human to read, write and understandable.
  • Object-oriented programming: - Object oriented means Java heavily utilizes Classes and Objects. for now, considered: - 

  • Classes: - They define the properties (data) and methods (functions) that objects of that class will have.
  • Objects: - objects are instances of a class. They represent real-world entities and hold specific values for the properties defined in the class.
Don't worry if you don't understand it. We will dive dipper into this in our dedicated blog post.

Why Java?

Not all languages are created equal, but the best one for you depends on what you want to do.

Sometimes, people might say they chose Java because it's "secure" or because it gets mentioned during job interviews (placements). But these aren't always the best reasons. Security is more about how you write code, not the language itself. And getting a good job depends more on your skills and problem-solving abilities than the specific language you use.

Instead of jumping on the bandwagon, here are some things to think about when choosing a programming language:

What do you like? Are you into games, websites, or maybe something else entirely? Pick a language that lets you build things you're interested in.

What do you want to achieve? Do you want to help others, build your own projects, or maybe get a job in a specific field? Different languages are better suited for different goals.

How easy is it to learn? Some languages, like Python, are easier for beginners, while others might take longer to get the hang of.

By thinking about your interests, goals, and learning style, you can find the perfect language to kickstart your coding journey!

Choice is yours. consider this to your first exercise. But if you choose Java then let's start our exciting journey.

Setting Environment for Java

This is the First step toward our journey. Setting the environment is a crucial step. We are going to use some terminology like JDK, JRE, JVM and IDE. These are simple but important term in Java.

JDK: - Java Devlopment Kit
  • JDK is a collection of software tools for anyone who wants to write, test, and fix (debug) Java programs.
  • Similar to a toolbox including a hammer, saw, nails, etc., the JDK has tools for turning your code into a runnable program.
Now if you want to write and compile code you need JDK, just like that if you want to run a Java program you need JRE (Java Runtime Environment).  

JRE: - Java Runtime Environment
  • It's designed for people who just want to run already built Java programs.
It contains...
 
JVM: - Java Virtual Machine
  • JVM: The magic machine that makes your Java code run on any device.
IDE: - Integrated Development Environment.
  • IDE is a software in which you write you Java code. IDE provides some extra features: -
    • Code Editor: A special text editor with extra features like:
      • Syntax highlighting: Colors your code to make it easier to read.
      • Auto-completion: Suggests code as you type, saving time.
      • Error-checking: Spots mistakes as you write.
    • Compiler or Interpreter: Turns your code into something the computer understands.
    • Debugger: Helps you find and fix problems (bugs) in your code.
    • Project Management Tools: Keeps all your code files organized.
    • And more: Many IDEs offer extra goodies like version control, testing tools, and even visual design tools.
We now have better understanding of common terminology which are used in Java. So, let's start to be setting up Environment.

1) Download and Install the JDK (Java Development Kit):
  • Visit the Oracle website: Go to https://www.oracle.com/java/technologies/downloads/
  • Find the right version: Select the latest JDK version that's compatible with your operating system (Windows, macOS, Linux).
  • Download: Click the download button and accept the license agreement.
  • Run the installer: Double-click the downloaded file and follow the on-screen instructions.
2) Set Environment Variables (Windows):

  • Search for "environment variables": Open the Start menu and search for "Edit the system environment variables".
  • "Environment Variables" window: Click on the "Environment Variables..." button.
  • Create "JAVA_HOME": Under "System variables", click "New".
  • Variable name: JAVA_HOME
  • Variable value: The path to your JDK installation (e.g., C:\Program Files\Java\jdk1.8.0_361)
  • Edit "Path": Find the "Path" variable under "System variables". Click "Edit..." then "New". Add the path to your JDK's "bin" folder (e.g., C:\Program Files\Java\jdk1.8.0_361\bin)
3) Verify Installation

  • Open a command prompt or terminal: Search for "cmd" (Windows) or "Terminal" (macOS, Linux).
  • Type: java -version and press Enter. You should see the installed Java version.
4) Downloading and Installing IntelliJ IDEA

  • Visit the JetBrains website: Go to https://www.jetbrains.com/idea/download/
  • Choose the edition: Select "Community" (free and open-source) or "Ultimate" (paid, with more features). Click "Download."
  • Run the installer: Double-click the downloaded file and follow the on-screen instructions.

Conclusion: A Thriving Community Awaits

We've embarked on the exciting journey of learning Java together! This blog post has equipped you with the foundational knowledge of what Java is, why it might be a good choice for you, and how to set up your development environment.

Remember, learning to code is a marathon, not a sprint. There will be challenges and moments where you feel discouraged. But don't fret! The Java community thrives on helping others. Reach out to online forums, communities, or even this blog's comment section if you get stuck.

As we progress through this journey, we'll delve deeper into coding concepts, solve challenging problems, and build exciting projects. This blog will be your companion, providing guidance and support every step of the way. So, buckle up, embrace the challenges, and most importantly, have fun! The vibrant world of Java awaits!

Comments