αƞjiβ
αƞjiβ

Reputation: 3256

JAR doesn't include root files

I have simple Java Application and trying to create JAR to distribute using eclipse.

Project Structure

But when I look inside JAR it doesn't contain the test.txt file. I created JAR as Export>Runnable JAR File

Upvotes: 0

Views: 244

Answers (2)

Sumit Singh
Sumit Singh

Reputation: 15906

See the following image: Choose the file which you want to add in jar file.

enter image description here

Upvotes: 0

Thilo
Thilo

Reputation: 262824

You need to put that file into one of your source folders (such as src). Only those get copied into the jar file (by default).

Upvotes: 2

Related Questions