Configuring development environment for Java Advanced Imaging API with Eclipse
About me:
Hi! This is Krishna Bhargava Vangapandu(you can call me Krish or Bhargav). I am currently working as a Software Associate at Kanbay Software India(now part of CapGemini). Though I am currently on Mainframes platform working with COBOL,VSAM, CICS and boring-what-not; I always have this free time to pursue my interests which keep changing from time to time. One interest that has been with me since long is Image Processing and I dream of writing everyday applications that makes use of Image Processing techniques to do excellent things. As a part of it, I created this blog to maintain a dairy of what I did when learning the JAI. I intend to post all the code, all the knowledge I get from the internet regarding the JAI here. The main intention behind this blog is to let those programmers interested in Image processing but got no time or patience to search through the internet to collect information to learn the API.
In this post:
In this post, I will provide the preliminary steps to get started writing Java applications that makes use of Java Advanced Imaging API. There is no theory or explanation as of now in this post. Its all about system setup to write JAI applications.
Pre-requisites:
I expect the readers to have little working knowledge of Java, by working knowledge I mean that the reader should know how to install jdk, eclipse IDE. I use Eclipse and so all my further posts will be with respect to Eclipse.
Getting Started (assuming you already have the JDK installed)
Step 1: Download the Eclipse from http://www.eclipse.org (the direct link for eclipse sdk is http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.2.1-200609210945/eclipse-SDK-3.2.1-win32.zip )
Step 2: Download the Java Media Framework from the link :
http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=7372-jmf-2.1.1e-oth-JPR&SiteId=JSC&TransactionId=noreg
Choose the JDK version, as we intend to develop applications with the library. Run the set up and you are done with installation of JMF libraries.
Step 3: Download the JAI Libraries from the following link :
http://java.sun.com/products/java-media/jai/downloads/download-1_1_2_01.html
Run the setup and show your JDK; you are now ready to write simple JAI applications. Before going further, lets install another set of libraries called the JAI Image I/O aPI. Download from :
http://java.sun.com/products/java-media/jai/downloads/download-iio-1_0_01.html
Step 4: Now if you already have eclipse and started an eclipse workspace, you will have the package explorer when you use the Java Perspective (Window->Show Perspective->Java), you can see the Package Explorer with JRE listed as one of the libraries. Expand the JRE System Library in the Package explorer. Make sure you see the jai and jmf related jars listed as shown.

If you have installed JMF, JAI and do not find the JARs listed in the package explorer, then you need to add them to your project as external JARS (from Project Properties->Add External Jars). But the better way for this is to show the correct JRE on which you have installed the JMF and JAI/Image-IO libraries (remember! it asks during installation to show the JDK, the libraries will then, I think, be installed into %jdk&/jre/lib/ext/). So to use this latest JRE, go to Project -> Properties -> Java Build Path->Libraries then select the JRE system library and then click on Edit. Select alternate JRE and click on "Installed JREs". Now it searches for the JREs and then select the one which has your libraries. After you apply the settings (ofcourse by clicking correct buttons ;) during the process i just gave), Eclipse rebuilds the workspace.
If you did not use Eclipse earlier or creating new Project for your JAI applications, then during creation of project you can repeat the same process and show Eclipse what JRE to use.
Now your development environment is ready to write simple JAI programs. In the next post, I will post a JAI Hello World program and explain some concepts I learn.
Disclaimer: Please forgive me for typos, I dont have time to proof-read my blogs. As far as I know the information I share here is correct, but still I am not responsible for anything that happens to your exisiting settings. You know, I am a developer and we always say "But it works on my system!". Your feedback is welcome at krishnabhargav@yahoo.com, or if you have a similar information to share on this blog, please mail me so that I will post it here.
PLEASE DO NOT COPY THE INFORMATION AND POST AS YOURS! THATS BAD! :D
0 Comments:
Post a Comment
<< Home