1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Merge pull request #203 from dmitry-zhuravlev/master

* file encoding should be set. This will allow to inherit the right encoding from process which execute wrapper. This will fix invalid encoding on Windows (Ancii art drawing in Kobalt logger)
This commit is contained in:
Cedric Beust 2016-05-19 08:46:21 -07:00
commit 12b07e0bb6

View file

@ -3,6 +3,7 @@ package com.beust.kobalt.wrapper;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.file.*;
import java.util.*;
import java.util.zip.ZipEntry;
@ -460,6 +461,7 @@ public class Main {
private int launchMain(Path kobaltJarFile, String[] argv) throws IOException, InterruptedException {
List<String> args = new ArrayList<>();
args.add("java");
args.add("-Dfile.encoding=" + Charset.defaultCharset().name());
args.add("-jar");
args.add(kobaltJarFile.toFile().getAbsolutePath());
Collections.addAll(args, argv);