IBM JVM 1.6 SR14: java.lang.UnsatisfiedLinkError: fontmanager (Not found in com.ibm.oti.vm.bootstrap.library.path) -
we upgraded ibm java on our aix machine java 1.6 sr 9 java 1.6 sr14 , have following error during start of our applications:
exception in thread "main" java.lang.unsatisfiedlinkerror: fontmanager (not found in com.ibm.oti.vm.bootstrap.library.path) @ java.lang.classloader.loadlibrarywithpath(classloader.java:1030) @ java.lang.classloader.loadlibrarywithclassloader(classloader.java:994) @ java.lang.system.loadlibrary(system.java:507) @ sun.font.fontmanager$1.run(fontmanager.java:240) @ java.security.accesscontroller.doprivileged(accesscontroller.java:273) @ sun.font.fontmanager.<clinit>(fontmanager.java:235) @ java.lang.j9vminternals.initializeimpl(native method) @ java.lang.j9vminternals.initialize(j9vminternals.java:200) @ sun.swing.swingutilities2.iscomplexlayout(swingutilities2.java:203) @ javax.swing.text.abstractdocument.handleinsertstring(abstractdocument.java:736) @ javax.swing.text.abstractdocument.insertstring(abstractdocument.java:704) @ javax.swing.text.rtf.rtfreader$documentdestination.delivertext(rtfreader.java:1610) @ javax.swing.text.rtf.rtfreader$texthandlingdestination.handletext(rtfreader.java:1546) @ javax.swing.text.rtf.rtfreader.handletext(rtfreader.java:186) @ javax.swing.text.rtf.rtfparser.write(rtfparser.java:163) @ javax.swing.text.rtf.abstractfilter.readfromreader(abstractfilter.java:116) @ javax.swing.text.rtf.rtfeditorkit.read(rtfeditorkit.java:122) @ rtf.convert(rtf.java:17) @ rtf.main(rtf.java:29)
following code allows reproduce problem:
import java.io.stringreader; import javax.swing.text.defaultstyleddocument; import javax.swing.text.document; import javax.swing.text.rtf.rtfeditorkit; public class rtf { public rtf() { } static public string convert(string rtf) throws exception { defaultstyleddocument styleddoc = new defaultstyleddocument(); rtfeditorkit rtfkit = new rtfeditorkit(); stringreader reader = null; reader = new stringreader(rtf); rtfkit.read(reader, styleddoc, 0); document doc = styleddoc.getdefaultrootelement().getdocument(); string txt = doc.gettext(0, doc.getlength()); return txt; } public static void main(string[] args) throws exception { system.getproperties().store(system.out, "current system props"); system.out.println("fontmanger lib: "+ system.maplibraryname("fontmanager")); string rtf="{\\rtf1\\deff0{\\fonttbl{\\f0 times new roman;}{\\f1 courier new;}}{\\colortbl\\red0\\green0\\blue0 ;\\red0\\green0\\blue255 ;}{\\*\\listoverridetable}{\\stylesheet {\\ql\\f1\\fs2 0\\cf0 normal;}{\\*\\cs1\\f1\\fs20\\cf0 default paragraph font;}{\\*\\cs2\\sbasedon1\\f1\\fs20\\cf0 line number;}{\\*\\cs3\\ul\\f1\\fs20\\cf1 hyperlink;}}\\sectd\\pard\\plain\\ql{\\f1\\fs20\\cf0 draw 2 6ml lav. label chart labels\"}\\f1\\fs20\\par\\pard\\plain\\ql{\\f1\\fs20\\cf0 ?when transfuse: when avl}\\f1\\fs20\\par}"; string txt = rtf.convert(rtf); } }
there no exceptions if run rtf class without jvm arguments:
java rtf
but if run rtf class "-dcom.sun.management.jmxremote" jvm argument there exception "exception in thread "main" java.lang.unsatisfiedlinkerror: fontmanager (not found in com.ibm.oti.vm.bootstrap.library.path)":
java -djava.awt.headless=true -dcom.sun.management.jmxremote rtf
does know how fix problem?
the workaround add directory /usr/java6_64/jre/lib/ppc64/xawt current libpath.
Comments
Post a Comment