JAVA_HOME=/usr/local/java/jdk1.8.0_112
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export PATH JAVA_HOME CLASSPATH
造数:
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class text{
public static void main(String[] args) {
String lujing = "/usr/local/555.txt";
File file = new File(lujing);
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
try {
FileWriter fw = new FileWriter(file,true);
BufferedWriter bw = new BufferedWriter(fw);
for(int i=0;i<50000000;i++){
bw.write(i+","
+"wu"+i+","
+"wu"+i+","
+"\r\n");
}
bw.flush();
bw.close();
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}