Skip to content

Wolven531/JavaFun

Repository files navigation

JavaFun

This repository is for messing around with Java

Reference Materials

Useful Tips

  • Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  • Install JDK
choco install jdk8 -params 'installdir=C:\\java8' -y
  • Install Maven
choco install maven -y
  • Install netbeans
choco install netbeans -y
  • Line endings fix
Get-ChildItem -Path . -Filter '*.*' -Recurse | ForEach-Object { dos2unix.exe $_.FullName }
  • Generate JDK 8 project using Maven
cmd /c mvn archetype:generate -DarchetypeArtifactId="archetype-quickstart-jdk8" -DarchetypeGroupId="com.github.ngeor"
  • List contents of JAR (J-ava AR-chive file)
jar tf .\target\javafun-1.0-SNAPSHOT.jar
  • Run project using command line (from repository root)
runProgram.cmd
  • Make PowerShell scripts runnable
Set-ExecutionPolicy Bypass -Scope LocalMachine
  • Run project using PowerShell (from repository root)
Set-ExecutionPolicy Bypass -Scope Process -Force; ./runProgram.ps1
  • Quick and dirty environment setup (using Chocolatey)
choco install copyq git maven jdk11 netbeans -y
  • Maven commands
    • mvn clean - Delete ./target directory (previous builds)
    • mvn install - Create ./target directory (new build)
    • mvn clean install - Delete AND create ./target directory (💯 new build)
    • mvn compile - ???
    • mvn assembly:single - ???
    • mvn jar:jar - ???

Releases

No releases published

Packages

No packages published

Languages