Anda di halaman 1dari 9

Installation Guide:

1. Check your system configuration, whether it is a 32 bit processor or a 64 bit processor. 2. Download and install Java Development Kit (JDK) accordingly (x84 for 32 bit and x64 for 64 bit). It is available for free on its official web page (also present in the project folder). http://www.oracle.com/technetwork/java/javase/downloads/index.html 3. After installing Java, add Javas bin folder to your System Environment Variables, this can be done as : Navigate to the Folder where Java is installed. This is by default, C:\Program Files\Java\jdk1.7.0\bin

Right click on my computer and select the Properties option from the dropdown menu. The System Properties dialog box appears

Click the Advanced system tab and then click the Environment Variables button. A new tab named Environment Variables pops up. In the System variables section, scroll down to the Path option, select it and click Edit.

After clicking the Edit button, add the Java bin path that we have navigated earlier to the Variable value tab. By default, the Path variable is already set to multiple locations. To set the Java directory path to the Path variable, append the Java directory path in the Variable value text box, separated by a semi-colon, as shown in the figure.

Click OK on all the tabs after you are done.

4. Copy or download the project folder to your hard drive. 5. In the project folder, navigate to the 32 bit folder or 64 bit folder according to your processor architecture and install the Matlab MCR (Matlab Compiler Runtime). 6. Matlab MCR is the Compiler just like any other compilers, say for C or Java, used to run Matlab programs without Matlab being installed in your computer. 7. Download Eclipse, a Java Development Platform from the following link (please take note of your processor architecture and download the appropriate version accordingly). http://www.eclipse.org/downloads/ (It is also available in the project folder) Note: The steps till now described are one time processes. Once done, it is not needed to do again.

Running the Program:


1. Open Eclipse, Click File New Java Project. 2. Note in 32 bit processor, Java Project is not directly visible. Click on Project and then select Java Project in the box that follow, an image of it is given below.

For 32 bit:

3. Name the Project, SlewingBearing and click Finish. 4. Note: Sometimes you may have to manually set the location to any preferred path by unchecking the use default location and using the browse button.

5. In the Package Explorer tab, right click on the SlewingBearing project folder you have just created and click NewClass.

6. Name the class SlewBearing. Make note that the class name is EXACTLY the same as mentioned.

7. Also make sure that the source folder is as mentioned in the figure above and click finish.

8. A new java file called SlewBearing.java is created. Delete the content of the file if there exists any.

9. After clearing the contents of the SlewBearing.java file, go to File Open File. Navigate to the project folder and open the SlewBearing.java file present in the project folder. Click Open after selecting.

10. Copy the contents of the SlewBearing.java file you just opened. To copy, press Ctrl + A and then Ctrl + C. Then paste in the class file SlewBearing.java that we created in eclipse by pressing Ctrl + V. 11. After copying the code, right click on the project folder in the Package Explorer tab, and click Build Path Add External Archives

12. In the JAR Selection tab that opens after clicking Add External Archives, Navigate to the Project folder which has the distrib folder in which the demo.jar file is to be opened. (remember to navigate according to you system architecture).

13. Follow the step 9, to open the Matlab MCR javabuilder.jar file. The file can be navigated to a folder which somewhat looks similar to this : C:\Program Files\MATLAB\MATLAB Compiler Runtime\v717\toolbox\javabuilder\jar

14. After Exporting the JAR files, hit the Run command displayed just below the Menu bar to run the program. 15. After clicking run, Eclipse may ask you to run as showing several options, select run as Java Application. If the program still doesnt run, showing some error, save the program once again by Crtl+S and run again. The output of the program should look like the one shown in the figure below.

Proceed further with the GUI. Thank You.

Anda mungkin juga menyukai