Reputation: 23
I have une Java application, and I use in it the openCv(opencv_java259.jar). It work correcly in Eclipse. For pack the application in a executable .jar file, I use One-Jar (Command Line Approch) but it don't work correctly and I have this errors:
C:\Users\User\Desktop\Tool> jar -cvfm ../one-jar.jar boot-manifest.mf .java.io.FileNotFoundException: boot-manifest.mf
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at sun.tools.jar.Main.run(Main.java:171)
at sun.tools.jar.Main.main(Main.java:1177)
I have done these steps :
I have create from Eclipse an runnable .jar file : right clik on the project-->Export--->Runnable Jar File
I Create a working directory "Tool" contains directories main and lib
Copy my main application jar file (create on step 1) into root/main (named MyApplication.jar) and library dependencies into root/lib (the opencv_java259.jar)
I have Unjar the one-jar-boot-0.97.jar file into the root directory
Edit the boot-manifest.mf :
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: One-Jar 0.97 Ant taskdef
One-Jar-Main-Class: main.MyApplication
Main-Class: com.simontuffs.onejar.Boot
But I have the errors when i execute the command line:
C:\Users\User\Desktop\Tool> jar -cvfm ../one-jar.jar boot-manifest.mf .
Have you suggestions? Thanks for all.
Upvotes: 0
Views: 741