简体   繁体   中英

How do I deploy a Java program in Eclipse?

I have a program I am making for a friend. It contains one class, references two libraries (sqlite4java and poi by Apache), and sqlite4java contains many native libraries (.so, .dll, .jnilib) that are within my lib folder. The program also reads and writes from a swimTeam.db file. My question is how do I package this all into one program that can be run cross-platform? I have tried exporting the project as a runnable jar, but when I ran it it couldn't access the native libraries because they weren't exported. Any idea how to do this?

First thing is create a java project remove all the java files and copy all the Jar file you need to import into that project.

now add the the created project to your working project as "project references" (right click on the project and click on properties)

now add all the Jars in the Java buildpath->libraries

now export your project as JAR. open it and make sure that all the JARs u need are in it.

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