Git Product home page Git Product logo

geoff-does-stuff-java's Introduction

Geoff Does Stuff (Java)

This is a Java project to accompany Geoff Does Stuff. Some things are easier to show in code with comments than to document with code snippets. The aim of this project is to show how some Java things work.

It is worth adding that JUnit 5 is being used as well as Gradle Build Tool.

This project is primarily hosted on GitLab at Geoff Lawrence / Geoff Does Stuff - Java but is configured with Repository Mirroring to automatically mirror the project to glawrence/geoff-does-stuff-java on GitHub.

Executing

There are differences when working on different platforms, so they are covered separately. I have not tested this on Linux but the macOS instructions should work.

The first and common step, is to change into the project directory on your local device.

macOS

I hope to find a better way to do this, but for now, I am using this single command on macOS:

./gradlew build && java -cp ./build/libs/geoff-does-stuff-java-1.0-SNAPSHOT.jar com.geoffdoesstuff.java.MainDemoApp

After settings 'Main-Class' in the build.gradle file, inside jar/manifest/attributes you can simplify the above to this:

./gradlew build && java -jar ./build/libs/geoff-does-stuff-java-1.0-SNAPSHOT.jar

Alternatively to run a specific demo you can use the following:

java -cp ./build/libs/geoff-does-stuff-java-1.0-SNAPSHOT.jar com.geoffdoesstuff.java.demo.Optionals

Windows

I have been using these as two separate commands on Windows, so starting with

gradlew build

Followed by

java -jar .\build\libs\geoff-does-stuff-java-1.0-SNAPSHOT.jar

This will run the Demo App and display a menu, alternatively you can run a specific demo direct, as follows:

java -cp .\build\libs\geoff-does-stuff-java-1.0-SNAPSHOT.jar com.geoffdoesstuff.java.demo.Optionals

However, if Java is not on the path then this works if JAVA_HOME is set:

%JAVA_HOME%\bin\java -jar .\build\libs\geoff-does-stuff-java-1.0-SNAPSHOT.jar

Reading JavaDoc

When working on the JavaDoc you don't need to do a complete build by running everything including the unit tests. Here are some instructions for building the JavaDoc and then viewing it in the default browser.

Windows

gradlew javadoc
start .\build\docs\javadoc\index.html

macOS

./gradlew javadoc && open ./build/docs/javadoc/index.html

geoff-does-stuff-java's People

Watchers

 avatar  avatar  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.