Replace JAF in JDK with activation.jar

Q

Why do I need to replace JAF in JDK with activation.jar? JAF {JavaBeans Activation Framework} has been included in JDK 6 to 8.

✍: FYIcenter.com

A

Yes, JAF (JavaBeans Activation Framework) has been included in JDK 6 to 8. But there are several reasons why you may need to use the JAF provided in activation.jar instead the JAF provided in JDK.

1. Your application is still running with JDK 1.5 or older.

2. Your application may need to use an older version of the API, like JAF 1.0.

3. Your application may need to use some Sun implementation class offered in the activation.jar, like com.sun.activation.viewers.TextViewer or com.sun.activation.viewers.ImageViewer.

For example, if you run JAFApp.java with activation.jar, you can view the JAFApp.java file:

fyicenter> java -version
java version "1.7.0_45"

fyicenter> java -classpath .;\local\jaf-1.1.1\activation.jar JAFApp

If you run JAFApp.java with JDK only, without activation.jar, you can not view the JAFApp.java file, because there is no viewer class for text files:

fyicenter> java -classpath . JAFApp

 

What Is jaf-1_1_1.zip

Older Releases of JAF (JavaBeans Activation Framework)

Older Releases of JAF (JavaBeans Activation Framework)

⇑⇑ activation.jar - JAF (JavaBeans Activation Framework)

2016-07-09, 3083🔥, 0💬