Java Swing

Hi,

Just installed Haiku with JDK and Netbeans from the package manager. I’m impressed, that’s greats progress for Haiku. And as a Java developer I’m happy about this.

46

So the next questions are:

  • Do you have any plans for Java to support the Haiku windowing toolkit? ( So that Java apps will look native to Haiku )

  • Do you have any plans for Java to support JavaFX on Haiku?

Thanks,
Aubrey

8 Likes

As far as I know nobody is working on Java at all right now on Haiku in an active sense. The build of openjdk is kept updated by HaikuPorts however.

1 Like

I would imagine no to both. Swing is dead, and I doubt Java FX has the critical mass to warrant porting to Haiku.

Hi,
That’s up to Java developers :slight_smile:
The Haiku team cannot be responsible for everything to happen. If you know about Java programming, you are in a better position than most of us to start working on this. We will provide support on the Haiku side. There was some work towards getting SWT ported, and that uses native widgets, and it led to additions to the native API, for example to get buttons with bitmaps on them.

This is how we usually try to work: by bringing new technologies to Haiku (Java, SWT, but also WebKit for example), we are trying to see how they can be implemented in a way that also benefit the main C++ BeOS compatible API, which is what we (of course) care about most.

I don’t know what happened to that early work on an SWT port, it was not far enough to be useful for running apps but it may be a nice base to work from.

3 Likes

This is impressive and looks nice. I vote for Eclipse, which might be a bit harder to port. :confused:

1 Like

That would need SWT… Can you not look at IntelliJ which uses pure Swing?

1 Like

I am currently into game development so I am in as soon as Haiku has hardware 3d support.
I could look also into IntelliJ then as I am using C++ mainly and it seem to be supported.

I am a huge fan and cant await Haikus progress. Was a BeOS lover too.

3 Likes

IntelliJ could be quite a formidable IDE on Haiku as it already is elsewhere… for more than just Java and C++… Rust,Python and Ruby as well.

1 Like

Native implementation is not needed. All swing lafs have own component painters (windows, mac, linux, etc)

I can start my IDEA fork. It’s work almost well. There some problems which i reported

Need haiku keymap, rebuild jna library, some internal native libraries too.

For now there some problem with shortcuts - i can’t handle any ALT combinations.

Will test later.

6 Likes

IDEA Intellij Community is available as a package, see Java & Python IDE packages

@korli,
I tried installing the package, but it wouldn’t run. Out of memory error.
However, Netbeans did work for me.

@VISTALL
Hey that app looks great.
But, I don’t understand what you are saying about SWING. If I run a java app on Haiku I get the Metal look & feel. Is there some way to get Haiku L&F in Java?

Thanks guys
Aubrey

There no way. Haiku need own LaF implementation, but in Swing way (withou native bindings).
Maybe now you don’t understand why we can’t use native bindings - too big topic will be :slight_smile:

You can help Haiku team writing own Haiku LaF. It’s painful due need re-implement all haiku component painters. (you need understand JDK not use any native bindings in Swing)

Current situation. Netbeans use Metal LaF as fallback (but you can install another laf like Darcula etc)

IntelliJ IDEA - use own LaF with hacks to jdk implementation.

I think awt has the native look (not really the feel, but close enough). Swing doesn’t. SWT would have the native look and feel as it uses native controls directly, but we don’t have a complete port of it (it’s a lot more work)