Fixed compiling after location change.

Fixed compiling.
Added automatic javac compilation before jar generation.
This commit is contained in:
Kristian Knarvik 2017-11-28 15:30:39 +01:00
parent a5e5750362
commit 907b9e165b
4 changed files with 5 additions and 4 deletions

View File

@ -1 +1,2 @@
jar cvfm Game.jar manifest.txt java/*.class java/config/Pokemon.txt
javac.exe -cp java java/Game.java
jar cvfm Game.jar manifest.txt -C java config/Pokemon.txt java/*.class

View File

@ -1 +1 @@
java -jar Game.jar -Dfile.encoding=UTF-8
java.exe -jar Game.jar -Dfile.encoding=UTF-8

View File

@ -241,7 +241,7 @@ public class Game {
}
/** If the file is compiled as jar, this will prevent an empty list. */
if (pokemon.size() < 1) {
try (Scanner file = new Scanner(Game.class.getResourceAsStream("/Pokemon.txt"))) {
try (Scanner file = new Scanner(Game.class.getResourceAsStream("/config/Pokemon.txt"))) {
while (file.hasNextLine()) {
pokemon.add(new Pokemon(file.nextLine()));
}

View File

@ -1,3 +1,3 @@
Main-Class: Game
Name: pokemon-cmd/package/
Sealed: true
Sealed: true