在Linux环境中运行Java应用程序时获得Bad file descriptor
异常,该环境可以在Windows中正常运行。下面是代码:
Properties ProgramConfig = new Properties();
try
{
InputStream in = new FileInputStream("application.properties");
//loading properties file now
ProgramConfig.load(in);
IpAddressPort = ProgramConfig.getProperty("ip");
System.out.println("Ip address "+IpAddressPort);
}