#java中字符串替換 String s = "my.test.txt"; System.out.println(s.replace(".", "#")); #Maven使用 [1] [2] mvn archetype:generate -DgroupId=com.companyname.bank -DartifactId=consumerBanking -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false mvn clean package cd target\classes java com.companyname.bank.App #修改java文件後 mvn clean compile #代碼中包含中文時編譯 javac -encoding utf-8 SocketService.java