1

I had a correctly working/displaying Java Swing app that manipulated text IO in Arabic. Suddenly today, I find every Arabic text word displayed in reverse direction on my MacBook Pro with a Java8u171. To verify it's not something wrong with my programs, I recreated the app on the Oracle Tutorial page and ran it on my laptop. To my surprise, I am getting the same reversed display! Namely, instead of getting this correct image shown below (extracted from the referenced tutorial page): enter image description here

I am getting this one instead when I build the app as is and run on my laptop:

enter image description here

Could anybody shed light on what happened here please? Thank you.

10
  • Can you share a bit of your code? The part where you set the orientation. Commented Mar 4, 2019 at 20:27
  • 1
    I can confirm everything works fine on Windows, with minor release 181 Commented Mar 4, 2019 at 20:38
  • 1
    Try with the latest 8.* release, if it happens, open a bug report on the OpenJDK bug system or via the Oracle page bugreport.java.com/bugreport Commented Mar 4, 2019 at 20:40
  • 1
    Thank you so much for your verification! Indeed it may just be a bug in the u171 release. Will adjust, try different releases and report back. Commented Mar 4, 2019 at 21:06
  • 1
    Anything Arabic is all garbled, but, updating to Java 11 (or anything past 8 really) could be a fix. Thanks for your pointing about Java releases. Commented Mar 4, 2019 at 22:07

1 Answer 1

1

If you're using a Windows based computer, you're probably fine according to the comments in the original post. For your Mac OS'ers, you need to step away from Java 8 entirely and into Java 11 (or newer going forward). Testing with that gives the desired look shown below. I tested this with my own apps on JTextPane and all those input text components, we're back in business :-)

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

The app works from within the NetBeans IDE. However, when I generate the executable JAR, the reversed display is back again :-( Something the Netbeans environment provides that's missing in the JAR file.
That is really strange. I'll try on Linux tomorrow morning, just out of curiosity

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.