Working with Java

I woul add the Python one already, as the QtPy based programs sports the basic executable icon right now. So it could be a great GCI task to add icons for those.
Please, do it.

i’ve been test you wrapper and it works… but compiling java source is the one issue i need to tackle when try to make recipe for it…

You have to be very strong now, @extrowerk: GCI is no more. Even with the numbers of students and finished task rising every year, Google decided that 10 years is enough. :slightly_frowning_face:

Oh, that is bad. Thanks.

For everything at haikuports we could try Hacktoberfest which is a bit similar, but requires things ot happen on Github.

1 Like

One useful note for people wanted to run Java based program on haiku: you have to install at least the Dejavu fonts and liberation-fonts to be able to use them correctly, otherwise they will present to you with just squares and squares but no characters at all!

BTW, from my own observation it seemed java based program doesn’t scale on haiku at all. They are very slow and it seemed the multithreading doesn’t work, they also used one cpu core and let other cores idle.

Also because of this multithreading issue, I can’t run the latest version of Netbeans (12.0 LTS) downloaded from Apache on haiku. The whole system become unresponsive and the only way to escape this is shutdown -r.

Hi kim. I don’t know why your java font rendering is too good. On my Java 8, the font is broken and looks very ugly. Could you let me know which patches you have done? Thanks.

screenshot400

screenshot399

screenshot401

1 Like

Update: after updating to openjdk13, I still can’t run Apache Netbeans but this time it allow me to peacefully terminate itself, without having to reboot.

Openjdk13 seemed to be more stable than openjdk8, the java applications seemed to be faster and there are less errors and warnings showed.

1 Like

thanks for your info… i always use openjdk8 …because some java application i have seem refuse to run in openjdk11…

since java 8 (i guess) major versions are not 100% binary compatible

@giahung.1997tn: Thanks for the note about installing the Dejavu and liberation fonts for Java GUIs to work and display properly. I was having that squares problem with Java GUI apps, that were created on Windows, running on Haiku R1B2.

IMHO if those fonts are required for proper app display, the package dependencies should be updated to make sure there’re also installed…

3 Likes

It would be better to update the Java code to not need these fonts and properly use what the OS is configured with, instead.

1 Like

There is an issue for that https://github.com/haikuports/haikuports/issues/5031
We just need to change font name and rebuild java packages.

1 Like

I’d have to learn how to do that, and it is probably the best way. Yet since a few Java programming books I have looked at don’t show how to do that, so I’m probably not the only one that doesn’t have it in my Java code. My Java code ran okay on Windows, MacOS, and Linux Mint; it was only on Haiku R1B2 that it showed squares instead of the fonts.

Hi. Could you patch openjdk to have font antiliasing properly worked? The font is very ugly now. Someone tried to increase the general font size and his screenshot looked good but I can’t do the same as him since it will waste screen space.

BTW, when would the openjdk port stable enough for the Netbeans IDE (12.0 LTS) to run properly on Haiku? The last time I tried, it just crashed.

Please consider improving the stability of openjdk on Haiku. Java based apps are a great source of good apps for platform like Haiku. I hope someday complex Java apps like Netbeans could be run with ease on Haiku.

p/s: I know openjdk is huge and requires a lot of patches to work, but it’s indeed a very important piece to the development of Haiku as a viable operating system.

This is a bad way to make attention for your problems because:

  • this is a forum, not a bug reporting page, and because this your wishes and bugs will be guaranteed forgotten
  • Java doesn’t maintained here, but at Haikuports.
  • telling to main Haiku contributors to consider better java support also not the best way. Why should they listen or care about it? It is just a 3rdparty program, not part of Haiku and Haiku doesn’t require Java

Yes, i know it is important for you and for other users, so if you want to make things better at least you should create an issue at the haikuports github page, like this one: java application .. font become square block · Issue #5031 · haikuports/haikuports · GitHub

1 Like

OK. I will go to haikuports. You know, for people who don’t have coding skills like me, this is the only way to get people’s attention to our problems. Sometimes we are being hatred for whining too much without actual help. I know it but doing so at least I have some attentions!