Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Netbeans IDE and JAI

 
Dasha Gilmore
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to install JAI into Netbeans IDE 7.12 on a 64 bit Windows 7 system and don't seem to be getting it done correctly. I am new to Java, so this may be part of the problem. Here's what I have done so far:

[1] I downloaded the JAI executable files:
o jai-1_1_3-lib-windows-i586.exe
o jai-1_1_3-lib-windows-i586-jre.exe
o jai-1_1_3-lib-windows-i586-jdk.exe

[2] Double-clicked on the jai-1_1_3-lib-windows-i586.exe. Thru the doc say it would install at

C:\Program Files\Sun Microsystems\Java Advanced Imaging 1.1.3

it installed at c:\jai_1_1_2_01

[3] Double-clicked on the jai-1_1_3-lib-windows-i586-jre.exe and it installed at

c:\Program Files (x86)\Java\jre7

[4] It was unclear whether JRE was needed, but I double-clicked on the jai-1_1_3-lib-windows-i586-jdk.exe and it said

This program requires the installation of Java 2 SDK version 1.3 Aborting Setup

[5] I went into Netbeans and under libraries added the paths:

c:\Program Files (x86)\Java\jre7\bin
c:\jai_1_1_2_01

(JDK 1.7 was already there as a default)

[6] I then looked at my code:

import javax.media.jai.NullOpImage;
import javax.media.jai.OpImage;
import com.sun.media.jai.codec.SeekableStream;
import com.sun.media.jai.codec.FileSeekableStream;
import com.sun.media.jai.codec.TIFFDecodeParam;
import com.sun.media.jai.codec.ImageDecoder;
import com.sun.media.jai.codec.ImageCodec;

and it says for all these imports that "Package javax.media.jai does not exist".

Any insights? Perhaps my libraries are wrong or I need to download something else?

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[5] I went into Netbeans and under libraries added the paths:

c:\Program Files (x86)\Java\jre7\bin
c:\jai_1_1_2_01

This step I think is where the problem is. Firstly, you shouldn't be adding anything from the JRE or JDK. There is stuff in there to go into the PATH (where executables reside), but what you're dealing with here is the CLASSPATH (where Java libraries reside). Secondly, while I'm not sure how JAI organizes its classes (or how NetBeans expects them to be added), I'm guessing that you need to add the actual jar files that make up JAI, however many there may be - and not the directories in which these jar files reside.
 
Dasha Gilmore
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the insights Ulf.

I made the changes, but still can't get JAI running. I then uninstalled the x64 version of IDE and installed the x86 version in hopes being all x86 would make a differnence, but it hasn't.

Perhaps JAI is overkill. All I really wnat to do is read in a TIFF image. I'd prefer to do it in x64 IDE so I can make use of more memory. Is there a better way to read TIFF that using JAI?

Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic