Giter VIP home page Giter VIP logo

annotations-exercise's Introduction

Annotations exercise

Installation

  1. Fork this repository.
  2. Clone your fork using IntelliJ.

Configuration

IntelliJ compiles and executes our code from the terminal without our direct intervention. For this exercise we will not use it, because it would hide the warnings that we want to fix. For this exercise we will use the terminal instead.

Compilation

To compile we will use the Java Compiler javac. javac generates the byte code used by the Java Virtual Machine by creating files with the extension .class. Those .class files are the ones executed by the JVM.

You will need to run the following command several times for the exercises in this lesson.

javac -d out/ src/*

In the previous command, the option -d specifies the directory where the .class files are going to be saved, out for this example. src/* tells the compiler to compile all the .java files in the src directory.

Sometimes the compiler produces unrelated error messages when there are existing .class files in the output directory. In order to avoid this issue, it is very recommended to cleanup the out directory before compiling.

rm out/*.class

Execution

In order to execute a Java class you will use the java command as follows.

java -cp out/ Main

The option -cp tells Java where to look for the class to be executed, in this case the out folder, which is where our .class files are. Main is the name of the class with the main method.

Finally

  1. Follow the instructions in the curriculum.
  2. Enjoy!

annotations-exercise's People

Contributors

montealegreluis avatar suffa07 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.