Build Java entire project jar using JDeveloper

16,407

Solution 1

Please follow the below instructions..

  1. Right-click project and select properties.
  2. Click on Deployment, setup new Deployment by entering Deployment Profile type and name.
  3. Now edit Deployment profile on screen.
  4. Select Jar Options and specify your main class.

If you have 3rd party jar then follow

  1. Select File group the click on New.
  2. Select Dependency Analysis and Ok.
  3. Then select the Contributors under new file group you have created.
    1. Files tab for Files
    2. Libraries tab for Libraries, Include the Libraries you using in your project.
  4. Then Ok.

If you don't have 3rd party jar then ignore the above

  1. Then right-click on project, select the profile under deploy.
  2. 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.

Share:
16,407
Shantanu Banerjee
Author by

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, 2022

Comments

  • Shantanu Banerjee
    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