how to add an xml file to the java application's classpath in eclipse?

后端 未结 3 1420
盖世英雄少女心
盖世英雄少女心 2021-02-19 01:02

I need an xml file to be accessed via the classpath in a java application i am creating . how to achieve it in eclipse

3条回答
  •  难免孤独
    2021-02-19 01:54

    I'd generate a separate resources folder, right-click it and select Build Path > Use as Source Folder. That way it's on the class path, but you're not mixing it with your Java source files

提交回复
热议问题