Abcd ejstt gggb

I asked Andrew Bachman about the JDK port:

There are still some hangups to getting the first bootstrap build
going. It would be really helpful if someone could figure out the
issues between haiku and gcc such that gcc could be built with the
java support, so we could use it for bootstrapping.


So the first hangup seems to be getting OpenJDK to correctly build on Haiku with GCC. But GCC is newer now, so would someone like to get it compiled?

As someone who has worked with, and who continues to work with C, C++, C# and Java, I question the claim that managed languages are slower.

The Hotspot JVM is a compiler. Like every compiler, it has strengths and weaknesses. 100 million JPEG inverse DCTs take 8.5 seconds in optimized GCC, but 18.5 seconds in Java, because GCC makes heavy use of SIMD, while Hotspot currently uses SSE registers only for one value at a time. By comparison, I’ve seen an audio codec, ported from C to Java, be 3-4 times faster in Java, because Hotspot is brilliant at method inlining and it does inter-procedural optimizations that most C compilers still do not do. Also JVMs can do biased locking, adaptive spinning, escape analysis, and other things that AOT copilers with their statically generated code cannot.

LLVM might be able to eventually bring some of those optimizations to JITed C/C++, but they have it much harder, since pointers make correct compiler optimizations very hard. And just like writing C turned out to mostly outperform hand-written assembly, higher level languages will eventually outperform C - and already are getting competitive.

As for the alleged lack of applications in Java someone mentioned, uhm, it is only the leading language on Sourceforge.

By excluding Java from Haiku, you’re not just excluding significant applications and developers, but an entire platform, something a small project really shouldn’t be doing.

1 Like

Its a sucky platform :stuck_out_tongue: while execution speed may be comparable for longer running programs java programs lack the responsivness and lightweightness due to the requirement of a usually heavy VM and especially heavy in the case of OpenJDK VM.

That aside who really cares as long as it says merely optional and I am sure it will. Java isn’t so bad for some things I actually used it in a digital signal processing class recently oddly enough and it was much better than Matlab for our use case.

I will say one thing though Java is alot more fun if you have a decent autocompleting IDE…and if you are doing graphical programs a layout system like netbeans.

Mega-LOL: MATLAB makes heavy use of Java internally :-).

1 Like

How is the above statement (excerpt from the post) judged by haiku developers and haiku ‘users’ today?

Things have changed since 9 years ago. Java JDKs from 8 to 13 are already included as third-party packages on HaikuPorts.

Also with some significant applications running on it: Java & Python IDE packages

1 Like

@return_0e Thank you for your reply!

A long time ago there was a “Haiku apps repository” from Michel Clasquin-Johnson with very interesting and (at that time) executable Java software.
Since then I have been keeping an eye on “Ancestris” for Windows ( , not to be confused with Ancestry).
It was available as version 0.9 (more like 9.x) in the professor’s repository.
I reported about this to Frédéric Lapeyre (President Ancestris Team) and shortly afterwards I found Haiku (albeit incorrectly) under ‘Download Linux’ as an OS + link to the repository of Prof. Clasquin-Johnson.
But that was a flash in the pan, because not long afterwards Ancestris could no longer start under Haiku. Most Java software doesn’t either. What a shame!


That’s also why we ask people to write recipes. A script can be rerun by someone else, modified, fixed…
Experience is much harder to transmit. It doesn’t mean the time spent by people is not appreciated, it’s just that it is more efficient to transmit written stuff.

And it’s totally possible to use haikuporter to repackage binaries btw…

Aaahh, so the professor ‘failed’ to write recipes !?
Despite the availability of OpenJDK + NetBeans for Haiku, the software still has to be ‘rebuilt’ in order to be able to use it with Haiku … this is probably even necessary ‘within’ the different Linux distributions …

No. If the java app is distributed as a JAR package,you only need to open a Terminal and type:
java -jar <filename>

That command could be included in a simple .sh script, and then running the app by doing double click on it.

1 Like

Thank you for your answer!

Unfortunately it doesn’t help me, not even Haiku + JAVA and neither do the answers at Ancestris!
I am primarily a user. All answers received so far, no matter where and from whom, are unfortunately written in such a way that I could only use them if I am a freak or at least an ‘insider’.

It is probably better if I continue to use my old (also an older version) software (sometimes with serious errors, including data loss, but simply brilliant) under Windows.
I would have preferred to use Ancestris via haiku, but there are more important things in life!

One last try. Even if I’m annoying …

Zurga from the Ancestris team gave me the following answer to my answer, which was similar to the previous post.
Are there any similarities or derivations?

OK, I will try to be less technic.

First install Java for Haiku. Prefer OpenJdk 11 rather than 13. (Long term support involved, but technic part).
Then download the zip file with all Ancestris distribution. (generic linux file or v11 package).
Unzip the content of Ancestris zip file in a directory.
In a command line console, go to bin directory inside ancestris directory.
Type ./ancestris

What happens ?

The basic launch installation is there :


I installed openjdk11 from HaikuDepot, which also installed openjdk11_jre. However, ‘java’ could not be found until I also installed openjdk11_default.

Running ./ancentris resulted in… “an illegal reflective access by org.netbeans”

So, probably not very helpful to you but it does try to do something.

Using JDK8, I got the Ancestris splash screen, and then it crashed.

1 Like

This is from the java debug report that got saved, if it helps anybody.
Frame IP Function Name
00000000 0x15bbe5af072 _kern_snooze_etc + 0xa
0x0000015bbe5af068: 4989ca mov %rcx, %r10
0x0000015bbe5af06b: 48c7c0bb000000 mov $0xbb, %rax
0x0000015bbe5af072: 0f05 syscall <–

	0x7ffdba6c8d20	0x15bbe630ce7	clock_nanosleep + 0x67 
	0x7ffdba6c8d40	0x15bbe632493	nanosleep + 0x13 
	0x7ffdba6c8d50	0x1af14933478	/boot/system/lib/openjdk11/lib/server/ + 0xb47478 
	0x7ffdba6c8f10	0x1af149e4c02	/boot/system/lib/openjdk11/lib/server/ + 0xbf8c02 
	0x7ffdba6c90c0	0x1af14b277f3	/boot/system/lib/openjdk11/lib/server/ + 0xd3b7f3 
	0x7ffdba6c9130	0x1af14b27af3	/boot/system/lib/openjdk11/lib/server/ + 0xd3baf3 
	0x7ffdba6c91b0	0x1af14ac12b4	/boot/system/lib/openjdk11/lib/server/ + 0xcd52b4 
	0x7ffdba6c91f0	0x1af1493512e	/boot/system/lib/openjdk11/lib/server/ + 0xb4912e 
	0x7ffdba6c9220	0x15bbe5bea05	pthread_thread_entry(void*, void*) + 0x15 
	00000000	0x7ffffe5ec260	commpage_thread_exit + 0
1 Like

Thank you very much Austin (MrEntropy)!
Because I’m probably overwhelmed, I gave your answers to Zurga from the Ancestris team (forum).
There is great help there, but Haiku is probably unknown and NO Linux, MacOS or Windows.

No problem. I can probably get better and more complete logs if you need them.

1 Like

netbeans in the HaikuDepot = 8.2-1
Aktuell Apache NetBeans = 12.0 (4. Juni 2020)

Can it be related to that?

I think there will be less misunderstanding if I answer directly here.

Which version of Ancestris do you use ?
Only the version 10 and 11 are compliant with Jdk 11.
By the way, Ancestris 10 use Netbeans 8.2
Ancestris 11 use Netbeans 11.3.

If you get the splash screen, could you check the ancestris log file (see the documentation to get the exact location : )



Oh dear, I have to write a prize …
the Olivetti Programma 101 (around 1965, with it, the coordinates were calculated for the first flight to the moon) but I would like to keep …

My Windows machines run Ancestris V11 to get the daily / nightly updates.
It’s similar to Haiku’s nightly’s.

Uh. Let’s see. Ancestris 10, I would say. With JDK 8 I get the splash screen and the log file. I can’t seem to attach files so I can send it to you another way, if you like.

If I use JDK 11 I don’t get a splash screen, but it still crashes.

As far as I can see, netbeans on Haiku is at version 8.2-1

1 Like