Error: Could not find or load main class- Novice

后端 未结 4 899
春和景丽
春和景丽 2021-01-24 21:23

Hi I am a novice in JAVA. I have been getting this file not found exception inspite of the file existing in the very location I have specified in the path which is

Initi

4条回答
  •  温柔的废话
    2021-01-24 21:40

    You have to escape the backslash.

    input = RandomAccessFile("C:\\Workspace\\conf.txt",'r');
    

    and also

     input = new RandomAccessFile("C:\\Workspace\\conf.txt",'r');
    

    and why you have two different filename conf.txt and config.txt.

提交回复
热议问题