On 2026-02-28 10:23, Michael Bien wrote:
On 2/28/26 01:14, Joakim Schramm wrote:
Hi,
as I'm new to the Java and NB world, time traveling from the distant VB6 world.
I have a simple question. Would it be possible to install and run NB-7.0.1 (+
JDK1.6) and NB-29 (JDK25) simultaneously?
yes you can. Each version will create its own config and cache folder and can
run in parallel. I have most version on disk for regression testing.
(you can also run multiple instances of the same version in parallel if you
give them separate userdirs --userdir)
Thanks, that's good news. I will try that.
So why would I like to such a stupid thing? Well, I have a batch of VB6
applications I would like to convert over to Java and now it happens so that I
found and old and since 10 years abandoned Java Swing (I think) project on
GitHub (originally from Google Code) that was trying to achieve just that.
Far from perfect but still does a lot of heavy lifting when running the JAR
file, but only loads in NB-7.0.1 but the current code loads with errors. Right
now I run that NB-7 project in a VM but it's kinda clunky and slow.
So, is this doable, to install NB-7 and JDK-1.6 on my my main box alongside
current NB-29 - without messing up things of course?
since you mention JDK 1.6. If you are lucky, you could bump the javac target of
the project from 1.6 to 8 and it might work even with latest NetBeans. You can
register a new JDK (e.g JDK 8) in the platform manager (tools menu) for this
project.
The reason why this isn't working out of the box is most likely because javac
itself is periodically bumping the minimal supported target:
javac 8 supports 1.2+
javac 9 supports 6+
javac 14 supports 7+
javac 20 supports 8+
If I could update the old project to work in latest NB-29 that would of
course be great, as when I tried it NB-29 complained that support for
Swing had been depreciated with NB-7.0 being the last version supporting it.
Apache NetBeans is made to interface with the latest compiler (currently 26),
so it's minimal target is 8 (which makes sense since 8 is the oldest LTS
release atm).
My goal is, if possible to recreate the project in either a NB Platform (which
I think is closer to Swing) or JavaFX.
yeah the NB Platform is using swing, but some projects managed to use JavaFX
with it too. The Swing/JavaFX interoperability has some edge cases though which
might not be something for the first project after VB - and might not be what
you want in the fist place if swing is sufficient for the task.
-mbien
Yes, when creating a Platform project the Designer looks pretty much the
same as the Swing one in NB-7.0.1 but even there I can only open the
main form in RO-mode as it complains about some generated parts missing
and honestly I don't really know what type and NB version the project
originally as created in (This is the project btw:
https://github.com/javiercrowsoft/vb6-to-java).
Keeping it as the original (Swing) project, or as a NB Platform project
would be sufficient to me as a learning experience and starting point as
creating Java from VB6 is the main purpose. I simply look to see if I
can take it further than what it produces right now.
I did start a JavaFx project to replicate it but realize that it would
probably be more work that necessary. Anyway, I will try to get NB7 and
JDK1.6 working and take it from there.
/Joakim
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists