First, install the relevant Java-related operating environment
1, Jdk-6u45-windows-i586.exe
2, Jre-6u45-windows-i586.exe
can be installed directly. Environment variable configuration:
Take the mounting position D:\Dev\Java\jdk1.6.0_45 as an example:
Java_home=d:\dev\java\jdk1.6.0_45
Path=%java_home%\bin
Second, install Ant
Unzip to the specified location, environment variable configuration:
Take the mounting position D:\Dev\apache-ant-1.9.4 as an example:
ant_home=d:\dev\apache-ant-1.9.4
Path=%ant_home%\bin
Third, install Eclipse
Install directly, the first time you open eclipse you need to specify a working directory, such as: D:\Dev
Four, download replicatorg
Unzip the downloaded Replicatorg-master.zip to the Eclipse working directory with the following directory structure:
D:\Dev\ReplicatorG
D:\Dev\ReplicatorG\build.xml
V. Import replicatorg into Eclipse and configure the replicatorg environment
- Start Eclipse and select "File>new>project ..." from the menu. Select "Java Project from Ant buildfile" from the wizard.
- Select the "build.xml" file from the ReplicatorG directory as the Ant buildfile. Click "Finish" to create the project.
- all the additional libraries needed for build were automatically added by Ant, they should be manually re I Ncluded from within "replicatorg/build" directory:
- Right click on the project name, and select "Properties ".
- in the Properties dialog, select "Java Build Path".
- Select the Libraries tab.
- Press "Add External JARs ..." (On the right side of the window).
- Add All the JARs from within "build/shared/lib" directory.
- Optional:remove all the duplicated JARs.
If you intend to run replicatorg from Eclipse, you'll need to the set up a launch configuration. When you do, being sure to add the native libraries for your platform to the VM arguments.
- Still in the properties dialog, select "Run/debug Settings". Click "New" and then "Java application". This would bring up the Edit configuration dialog.
- On the Main tab, for a main class select "Base-replicatorg.app"
- on the Arguments tab, add the library paths to the VM Arguments.
- for a Linux x86 build (tested on Linux Ubuntu 11.10), add:-ea-djava.library.path=${workspace_loc:replicatorg }/build/linux/dist/lib-i686-dreplicatorg.app-resources=${workspace_loc:replicatorg}/build/shared/lib- Djava.library.path=/usr/lib/jni
- for a Linux x86-64 build (tested on Linux Ubuntu 11.10), add:-ea-djava.libr Ary.path=${workspace_loc:replicatorg}/build/linux/dist/lib-x86_64-dreplicatorg.app-resources=${workspace_loc: Replicatorg}/build/shared/lib-djava.library.path=/usr/lib/jni
- for a Windows build, add:-EA-DJAVA.LIBRARY.P ath=${workspace_loc:replicatorg}/build/windows/dist-dreplicatorg.app-resources=${workspace_loc:replicatorg}/ Build/shared/lib
- for the OS X build, add:-d32-ea-xmx1g-djava.library.path=${workspace_loc:replicatorg}/bui Ld/macosx/dist-dreplicatorg.app-resources=${workspace_loc:replicatorg}/build/shared/lib
Translation:
- After launching Eclipse, select the menu "File>new>project ...". From the popup menu, select Java Project from Ant buildfile.
- Specifies that the ant buildfile is a "build.xml" file from the ReplicatorG directory. Click the "Finish" button to create the project.
- All the additional libraries needed for build were automatically added by Ant but they should is manually re included from Within "Replicatorg/build" directory:
- Right-click the project name and select Properties.
- In the Properties dialog box, select Java Build Path.
- Select the Libraries page.
- Click the "Add External JARs ..." button.
- Add all the jar suffixes files from the "Build/shared/lib" directory.
- Delete if duplicate files are available.
If you intend to run replicatorg from Eclipse, you'll need to the set up a launch configuration. When you do, being sure to add the native libraries for your platform to the VM arguments.
- Still in the Properties dialog box, select Run/debug Settings. Click "New" and select "Java Application". The Edit Configuration dialog box opens.
- on the main page, specify the main class as: "Base-replicatorg.app"
- on the Arguments page, add the library path to the VM Arguments.
- for a Linux x86 build (tested on Linux Ubuntu 11.10), add:-ea-djava.library.path=${workspace_loc:replicatorg }/build/linux/dist/lib-i686-dreplicatorg.app-resources=${workspace_loc:replicatorg}/build/shared/lib- Djava.library.path=/usr/lib/jni
- for a Linux x86-64 build (tested on Linux Ubuntu 11.10), add:-ea-djava.libr Ary.path=${workspace_loc:replicatorg}/build/linux/dist/lib-x86_64-dreplicatorg.app-resources=${workspace_loc: Replicatorg}/build/shared/lib-djava.library.path=/usr/lib/jni
- for a Windows build, add: -ea-djava.library.path=${workspace_loc:replicatorg}/build/windows/dist-dreplicatorg.app-resources=${workspace _loc:replicatorg}/build/shared/lib
- for OS X build, add:-d32-ea-xmx1g-djava.library.path=${workspac E_loc:replicatorg}/build/macosx/dist-dreplicatorg.app-resources=${workspace_loc:replicatorg}/build/shared/lib
Right-click on the "Build.xml" file and click "Run as", "External Tools configurations ..." In the Popup shortcut menu.
In the Edit Configuration dialog box that pops up, tick the "Run", "Debug", "Dits-windows" entry in the "Targets" page:
Right-click on the "Build.xml" file and click "Run as", "1 Ant Build" to build the project in the popup shortcut menu.
Building replicatorg with Eclipse