C:\Windows\System32\chcp.com
chcp 65001
set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Invoke-WebRequest
InitializeComponent
Example.java
в файл example
:#!/usr/bin/java --source 11
// openjdk version "11.0.13" 2021-10-19
// OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.18.04)
// OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
/*
NOTE: should switch from shell to java comments beyond the first line
*/
import static java.lang.System.out;
import java.nio.file.Paths;
import java.nio.file.Files;
public class Example{
public static void main(String[] args) throws Exception {
if (args.length > 0){
Files.walk(Paths.get(args[0])).forEach(out::println);
}
}
}
mkdir /tmp/demo
cd /tmp/demo
touch a.txt b.txt c.txt
sergueik@sergueik172:/tmp/demo$
chmod +x example
./example .
.
./a.txt
./b.txt
./c.txt
./example