How do I create a jar file, which includes xml and html files?

后端 未结 5 982
猫巷女王i
猫巷女王i 2021-01-14 17:54

I am trying to create a jar file which includes some class and java files needed, but I also would like to include some extra xml, xsl, html, txt (README) files.

I a

5条回答
  •  心在旅途
    2021-01-14 18:33

    Add the files to a source folder and they can be included in the jar.

    One common way is to have, at the root of your project, a src folder. Within that, folders for java files, and others. something like:

    src/
        css/
        java/
        html/
        images/

    Then you can make each of those subfolders a source folder (Right click, Use as Source Folder) and they should be available to add to the jar.

提交回复
热议问题