简体   繁体   中英

How to integrate external packages in java?

I'm trying to develop an app that uses Bluetooth technology, so I need javax.bluetooth & javax.obex & javax.microedition packages. I've downloaded it but I don't know how to properly place it and where so the Java can see it while compilation. How do I integrate it?

It depends on what tool you're using to create your jar. For example: Maven , Eclipse or IntelliJ . Usually you can find an answer that is relevant to your build method by simply googling it.

However, if you want to permenantly add them to your JDK, you'll have to paste them in your JDK's integrated jre into the following folder: \\jre\\lib\\ext

For me that would be: C:\\Program Files\\Java\\jdk1.8.0_231\\jre\\lib\\ext

我的文件夹

As you can see, I added RXTX (a serial comm library) to mine and I can now use it in my code.

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