I tried running Java on a Mac terminal

I'm studying Java with Progate, so I wanted to make it myself and run it, so I tried it somehow. I referred to the following article https://qiita.com/stupid_student2/items/3e8ffeb33a73ef065a40

Use macOS Mojave The file was created with Atom


  1. Create a "Main.java" file with Atom
    I created a folder called "java" on my desktop and saved the file there.

    Main.java

    
    class Main{
      public static void main( String[] args ){
        System.out.println( "Hello World!" );
      }
    }
    
  2. Run in terminal
    cd desktop/java
    
    javac Main.java
    

    → "Main.Class" is generated

    java Main
    

    → "Hello World!" Has come out!


It ’s okay because something went wrong!

Recommended Posts

I tried running Java on a Mac terminal
I tried running Ansible on a Docker container
I tried using Log4j2 on a Java EE server
I built a Java EE environment on AWS and tried running a web application
I tried running a Docker container on AWS IoT Greengrass 2.0
I tried running WordPress with docker preview on M1 Mac.
I tried running a DB access application on IKS + Db2 on IBM Cloud (6. Preparation of DB access application (java))
I tried running Docker on Windows Server 2019
Build a Java development environment on Mac
I tried using Junit on Mac VScode Maven
Install Java on Mac
I tried running Autoware
java I tried to break a simple block
I tried hitting a Java method from ABCL
I tried to break a block with java (1)
Create a Java development environment using jenv on Mac
I tried to create a Clova skill in Java
I tried to make a login function in Java
I tried OCR processing a PDF file with Java
I tried scraping a stock chart using Java (Jsoup)
Launch a terminal on VScode
I tried Drools (Java, InputStream)
I tried metaprogramming in Java
I want to implement it additionally while using kotlin on a site running Java
I tried to create a java8 development environment with Chocolatey
I tried adding a separator line to TabLayout on Android
I tried to modernize a Java EE application with OpenShift.
Links that I referred to before running Elasticsearch 7.7 on Java 11
I tried to convert a string to a LocalDate type in Java
I tried to make a client of RESAS-API in Java
I tried OCR processing a PDF file with Java part2
[Java] I tried to make a rock-paper-scissors game that beginners can run on the console.
I created a PDF in Java.
I made a shopify app @java
A person writing C ++ tried writing Java
I tried to interact with Java
I tried UDP communication with Java
I tried the Java framework "Quarkus"
I tried using Java8 Stream API
I tried using JWT in Java
I tried to summarize Java learning (1)
I tried installing CentOS 8 on ESXi 6.7
I tried to summarize Java 8 now
I tried using Java memo LocalDate
Install Java development environment on Mac
I tried using GoogleHttpClient of Java
I tried Tribuo published by Oracle. Tribuo --A Java prediction library (v4.0)
I tried running a letter of credit transaction application with Corda 1
I just want to write Java using Eclipse on my Mac
How to switch Java version with direnv in terminal on Mac
I tried deploying a Docker container on Lambda with Serverless Framework
[Java] I tried to make a maze by the digging method ♪
I tried to display the calendar on the Eclipse console using Java.
How to check Java installed on Mac
I tried using Elasticsearch API in Java
I tried learning Java with a series that beginners can understand clearly
I tried Cassandra's Object Mapper for Java
I tried to summarize Java lambda expressions
Java9 was included, so I tried jshell.
Java development environment construction memo on Mac
I tried the new era in Java