Java “constant string too long” compile error. Only happens using Ant, not when using Eclipse

前端 未结 11 2127
抹茶落季
抹茶落季 2020-12-01 15:25

I have a few really long strings in one class for initializing user information. When I compile in Eclipse, I don\'t get any errors or warnings, and the resulting .jar runs

11条回答
  •  北海茫月
    2020-12-01 16:00

      String theString2 = IOUtils.toString(new FileInputStream(new     
      File(rootDir + "/properties/filename.text")), "UTF-8");
    

提交回复
热议问题