Trouble getting and installing the latest JAI java library - java

I have a couple of questions. I'm trying to install Java JAI libraries on my Eclipse on a PC so that I can create a standalone desktop application to convert TIFF files to JPEGs. I've searched and found links about how to do it but half are broken or very old and I'm not sure which one is the latest. Oracle site is no help and has links to download pages that don't exist. Any help is much appreciated.
Second question I have is will this libary work on a Mac and if so how do I install it there so that my code would work on a Mac.
Thank you!

JAI is native (written in c or c++). That means that you have to take care on which platform your application is running, is it 32bit or 64bit, etc. for each platform you need separate JAI library.
Check if java's javax.imageio.ImageIO utility supports tiff. If it does, you can simply read your tiff, then save it as jpeg. ... again i am not sure if this will work, but it is worth trying

Related

java image reading libraries

I am searching for java libraries which
are able to load/read many image formats
don't want installation
are platform independent
and are not one of these (ImageIO, JAI, Sanselan)
Thank you in advance!
Maybe use ImageJ? At the university we have written plugins for it (a few years ago), but I think you can also use it as a library.

JD2XX Java FTDI library - Where can I get it from?

I'm thinking of writing a little program for my SDR-14 software radio
using Java and had a look
around for a Java library to communicate with the SDR's FTDI USB interface IC. A
quick Google finds loads of mentions of the JD2XX library which used
to be at ..
https://jd2xx.dev.java.net/
Except that that page now gives a 404 error so I wonder if that
project was deleted or left that domain following the Oracle take over
of Sun.
Does anyone know where this project has gone and where I can
download the library from ?
Regards
Ian
The project was evidently lost in the recent (or not so recent) java.net upgrade. The last reasonable archive I found with the source for the project is (oddly enough) at http://fred.bilinski.it/src/Fred-20050525.zip so you may want to download that and archive it. It has the source for the jd2xx classes and the jd2xx dll (not sure whether the dll is 32-bit or 64-bit) but these are dated from 2005, so you might want to reach out to http://bleyer.org/jd2xx/ and see if you can get more recent updates.
Alternatively you may want to look at http://sourceforge.net/projects/ftd2xxj/ which appears to be more recent.
It seems he has made a SourceForge project as well: http://sourceforge.net/projects/d2xx/
And the files can be found in the SVN repository: http://d2xx.svn.sourceforge.net/viewvc/d2xx/

JAI ImageIO-core codecLib source

JAI ImageIO-core comes with a set of native codecs. The codecs come bundled in a set of .so and .dll files. Mainly clib_jiio.dll clib_jiio_sse2.dll clib_jiio_util.dll. I was able to find the source to mediaLib (mlib) but not the source for these codecs. Anyone know where the source resides? or if they are simply not open source?
It's not open source. Read the codecLib licence for more information.
(However, caveat emptor: my answer is based on the best of my knowledge, and not on any inside information. I have no relation to jai-imageio-core nor codecLib.)
Similar to
JAI and ImageIO for 64 bit Windows
Not open source and not plans to be and/or evolve.

Dynamically loading a native library inside Java applet

I am trying to write a Java applet that will read from a user's serial port. For this I am using the Java Comm API in conjuction with the RXTX library. I've successfully managed to read data through a local Java application but I can't seem to do the same from within an applet. The problem is that the RXTX library is a native library and I haven't found a way to load this library inside the Java applet. I've found two interesting articles (Using JNI in Applets which references to this article), but both are over 10 years old and I am wondering if there is a newer solution. Or if you can suggest an alternative, I would love to hear it!
Use Java Web Start. You can include the native library as a signed jar and everything should work.
1) put the native librarys in a jar in the ROOT directory
2) sign ALL the jars
3) write a JNLP referencing all the jars (go do a search on how to write jnlp's)
after that it should work
Firstly I'd suggest doing that in an Applet is probably a bad idea.
If you do go ahead anyway, JNLPAppletLauncher may help.
I don't know about applets, other than they're locked down heavily wrt. security/accessing the machine's resources etc.
If you need a web-deployable solution, have you looked at Java Web Start ? See in particular this FAQ entry
Frankly, trying to access devices from a Java applet is a bad idea even if you could make it work, and loading a dynamic library into the conventional applet is an even worse idea; in fact, I'd be astounded if you could find a way to trick a modern browser into doing it. (Consider the possible security implications.)
You're better off, as suggested on other questions, building an app that can be launched with Web Start.
I'd be real interested in the answer here also. My suggestion would be to install the .jar and .dll for RXTX into the \program files\java\ tree. You could install them on the target system before trying to use the applet. I like the idea of using Java Web Start. If you sign the applet, can't you read/write any file on the machine? So you could install the .jar and .dll and then use them afterward?
For windows, I suggest using "Windows Java Serial Com Port Driver" rather than rxtx.
You can download it from http://www.engidea.com/blog/informatica/winjcom/winjcom.html
I've found it much easier to install and use and much more bug-free.
I was unable to use RXTX with USB serial devices because RXTX would crash when the USB port was unplugged. winjcom solved these problems for me, and more.
I'm still trying to decide how to deploy the DLL, but I'm not sweating it because I don't expect the DLL for "Windows Java Serial Com Port Driver" to change.
-Stosh

Java Media Framework on client side?

If I’m writing an applet that shows a video sequence (eg. streaming from a camera, or the applet itself is running the on the camera), do my clients need to download the Java Media Framework libraries inorder to see the sequence?
They need to install Java Media Framework on their computers, or you'll need to bundle the JMF together with your applet somehow.
If the applet makes use of the JMF libraries they need to be downloaded to the client machine (where the applet executes). However, JMF gets very little development from Sun (read none) and is pretty much legacy now (subjective).
Depending on how modern the camera is and what codecs it can output it may also be worth considering the video support in either javafx of flash.
Distributing the JMF.jar with your applet is sufficient.
Create a JAR ( Java DLL ) and put all the jar files from the install directory, JMF is 32-bit only, so the x86\java\JMF2.1.1e\lib is where it's usually located.
If you customized the customizer.jar you want that one too.
You can download it from a server like an applet and embed the applet inside and then run it. It's worked for me for 14+ years in Adult Pay sites.
Did you consider to use Java FX? This technology is dealing with this problem of downloading media libraries and so no. Of course. It is still in development. If to be first-adopter is option, it will be worth of considering this.

Categories