简体   繁体   中英

Export custom library to importable jar file java

I have created a custom package in Java. The directory structure is like this:-

wolpha

   /Stream>Stream.java

   /Word/Stream.java

   /Pattern/Stream.java

   /Stream/Stream.java

So I just made a non runnable jar file and tried to import the package but it gave a error that the package wolpha does not exist. Tried with a main class with imports included but gave the same error.

How can I add all these classes into a single.jar file such that all classes can be imported into any file. I expect some step-by-step instructions with some down-to-earth language.

If you are using eclipse, go to File > Export and follow the instructions as per the screenshots given below:

在此处输入图像描述

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM