اضافه کردن library به jar کامپایل شده توسط netbeans برای ساخت single standalone jar application
how to make a java application standalone single file:
(when your jar file depend upon external library , how to add those lib to main jar file so it can be ported as a single standalone executable jar) :
1- extract all jar files in "lib" folder using winrar (Extract here in context menu)
2- you normally will have the folder named "org" and another folder named "META-INF".
3- open your main jar file using winrar and add folder "org" as well as other folder obtained in previous step except for the folder "META-INF". add those folder to root of archive. (add all folders of step 2 except "META-INF" to the root of archive . DO NOT add "META-INF" because it overwrite "MANIFEST.MF" of main application. )
4- you can also edit "manifest.mf" in your jar application by deleting "class-path" line in that file. but this is not important as i test my application , it work well without editing "manifest.mf". you may edit that or leave it intact.
5- close winrar and now you can run your single jar application anywhere without external library . now you have your complete application in only 1 jar file.