centos 6.5 JDK1.8配置信息和造数java

前端之家收集整理的这篇文章主要介绍了centos 6.5 JDK1.8配置信息和造数java前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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();

}

}

}

原文链接:/centos/378709.html

猜你在找的CentOS相关文章