This repository supports Gradle. While you don't need it, it will make everything much easier. Testing is all done with JUnit 5. If you don't have Gradle, you have to download JUnit, as well as a couple dependencies listed below. If you do have Gradle, you're fine.
- JUnit 5
- Apache Commons Lang
- JBlas
If you have gradle, to run everything it simply uses this command:
./gradlew build This checks for lots of things, like running the tests, check for compile errors, check for correct google java style guide, etc. If you only want to run a single file, then go to the build.gradle file and add this line at the bottom.
mainClassName = 'sorting.bubblesort.BubbleSort' and run ./gradlew run. Replace sorting.bubblesort.BubbleSort with the file you want to run. Make sure you exclude the src.main.java part. If you want to run the tests, simply run this command:
./gradlew test Compile a file like this:
javac <path-to-file> Then run it like this:
java <class-name>