Packaging java code in eclipse

I created a java project in Eclipse and I want to put it on another machine, however there are a lot of dependencies in my project. If I just copy and paste the project folder and add it to another machine, then it gives me a path path error and a library error link ... what is the most efficient way to transfer my code and then with the source code to another machine? Does eclipse provide this feature?

+3
source share
3 answers

The easiest way to create a basic project that you can use to copy and paste between machines once is to set up the project in a specific way:

1) :

alt text

2) JAR " " → . alt text

, . , .

+1
  • java
  • export
  • java node->runnable jar file, next
  • Java launch configuartion, .
  • Copy required into a sub folder next to generated jar...
  • -

, c:\temp\myproject , jar - test.jar, test.jar lib, -.... test.jar , jar .

Manifest-Version: 1.0 Class-Path:. regx_lib/a.jar regx_lib/b.jar regx_lib/c.jar regx_lib/d.jar : d.c.Main

, ....

+2

eclipse, maven java- ( ) /.

+1

Source: https://habr.com/ru/post/1778566/


All Articles