Build Java entire project jar using JDeveloper
Solution 1
Please follow the below instructions..
- Right-click project and select properties.
- Click on Deployment, setup new Deployment by entering Deployment Profile type and name.
- Now edit Deployment profile on screen.
- Select Jar Options and specify your
main
class.
If you have 3rd party jar then follow
- Select File group the click on New.
- Select Dependency Analysis and Ok.
- Then select the Contributors under new file group you have created.
- Files tab for Files
- Libraries tab for Libraries, Include the Libraries you using in your project.
- Then Ok.
If you don't have 3rd party jar then ignore the above
- Then right-click on project, select the profile under deploy.
- Then Click finish to start deployment.
After finish deployment you see the jar in your project/deployment folder.
Solution 2
Yes, you can do so. Have a look here - Java create standalone jar with external jars and also here - Put external library to the JAR?
The simple way is to use a tool, but you can use ant too, to recompile a set of JAR's into one big-fat JAR.
Shantanu Banerjee
*** Main Functions *** C and C++ int main(void); int main(); int main(int argc, char **argv); int main(int argc, char *argv[]); int main(int argc, char **argv, char **envp); JAVA public static void main(String[] args) public static void main(String... args) public static void main(String args[]) PYTHON def main(): # the main code goes here if __name__ == "__main__": main() PIKE int main(int argc, array(string) argv) SCALA def main(args:Array[String]) RUBY self # => main self.class # => Object self.class.ancestors # => [Object, Kernel]
Updated on June 04, 2022Comments
-
Shantanu Banerjee almost 2 years
I am using JDeveloper 11g to develop a desktop application. I want to make entire project jar which is run-able in java environment.. if I use only standard Java library jar works fine but my project contains external library like JfreeChart, Comm, Hibernate3 etc etc... when I try to make jar Its shows errors how can I make entire jar of my projects along with external library's.
thank you