Hieroglyphical languages not displaying in the report - Zulu

117 views Asked by At

I have recently migrated my application to Zulu from Oracle JDK. My application generates MS-WORD documents using BIRT.

Now after the zulu migration the reports are fine in the windows environment, but when the same application is deployed in a Linux box the report are not displaying fonts of other languages like Japanese, Chinese, Korean etc. Its blank in the places of the font.

Only the English font is seen in the report.

I'm thinking its something to do with the windows zulu JDK and Linux zulu JDK.

Is there any library which needs to be included for the Linux version ??

Help needed!!

1

There are 1 answers

0
Vladislav Karnaukhov On

Please consider the following example:

import javax.swing.*;
import javax.swing.plaf.metal.MetalLookAndFeel;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.lang.reflect.InvocationTargetException;

public class japaneseTest extends JFrame {

    japaneseTest() {
        try {
            UIManager.setLookAndFeel(new MetalLookAndFeel());
        } catch (UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        }

        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

        getContentPane().add(new JLabel("日本 日本 日本"), BorderLayout.NORTH);

        JButton button = new JButton("Close");
        button.addActionListener(new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                dispose();
            }
        });
        getContentPane().add(button, BorderLayout.SOUTH);

        setPreferredSize(new Dimension(300, 300));
        pack();
    }

    public static void main(String[] args) {
        try {
            SwingUtilities.invokeAndWait(new Runnable() {
                @Override
                public void run() {
                    japaneseTest app = new japaneseTest();
                    app.setVisible(true);
                }
            });
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
}

This will create a JFrame with a label with some Japanese text ("Japan") and "Close" button. I tested it on RHEL 6.6 against Zulu 6.6, Zulu 7.7 and Zulu 8.4, with no additional fonts installed.

Does this represent your problem?