Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse JustJ » Migrating to JustJ from custom JVM
Migrating to JustJ from custom JVM [message #1855250] Tue, 04 October 2022 13:31 Go to next message
Joakim Lönnberg is currently offline Joakim LönnbergFriend
Messages: 3
Registered: October 2022
Junior Member
I'm currently trying to update my product from using an old way of distributing a jvm to using JustJ instead.

The product is currently shipped with a feature in which we've included an old jvm. The particular plugin is configured with a p2.inf like

instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:features/com.jre.win32_1.0.0/jre/bin);
instructions.unconfigure=\
org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:null);

My new product instead includes the JustJ feature and JVM. However, when trying to update the project via update site, p2 fails to update the product. To me it seems like the old jvm is uninstalled before the new one is installed, making p2 unable to perform the update as there is no jvm available.

I've looked at https://wiki.eclipse.org/Equinox/p2/Engine which states that the unconfigure phase is executed before installing the new features. Do I need to change anything in my product to have p2 install JustJ before removing the old jvm?

I've looked a bit at https://www.eclipse.org/forums/index.php/t/1104434/ which seems to describe the case of replacing JustJ with a newer version and not replacing a custom jvm with JustJ.
Re: Migrating to JustJ from custom JVM [message #1855257 is a reply to message #1855250] Wed, 05 October 2022 06:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
That sounds like a complex problem and it's not clear what exactly is failing. Even if the old JVM is uninstalled before the new one is installed, which is what I'd expect, the running JRE itself doesn't stop running. Certainly JustJ can update itself via this same mechanism so it's not clear why that doesn't work for your case. What does failure look like?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Migrating to JustJ from custom JVM [message #1855260 is a reply to message #1855257] Wed, 05 October 2022 08:51 Go to previous messageGo to next message
Joakim Lönnberg is currently offline Joakim LönnbergFriend
Messages: 3
Registered: October 2022
Junior Member
The update completes and I'm asked if I want to restart the product. However, the product cannot restart as it states that it misses a bunch of bundles and looking into the features catalog shows that the justj feature has not been unpacked. It seems like the problem is correlated to that the old jre feature was not listed as a root feature and the justj needs to be listed as a root feature. Removing the "root" statement in the .product file makes the product update correctly but it cannot launch as the justj needs to be listed as root.

So I get no error message during the actual update. But looking at my product shows that the justj feature is never unpacked in the feature folder and the .ini file is not updated.

Is there a way to enable trace for p2 so I can monitor all the steps?
Re: Migrating to JustJ from custom JVM [message #1855262 is a reply to message #1855260] Wed, 05 October 2022 09:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
There are classes like org.eclipse.equinox.internal.p2.core.helpers.Tracing and org.eclipse.equinox.internal.p2.engine.DebugHelper but I'm not sure how to enable those. They don't appear to be properly registered such that you could them via tracing in the preferences. Probably using remote debug will get the most details...

I wonder if anything is forcing your old JRE thing to be uninstalled? It seems not or at least the touchpoint to remove the -vm argument from the *.ini would have kicked it...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:-vm argument not set in eclipse.ini
Next Topic:JUSTJ Classpath
Goto Forum:
  


Current Time: Fri Apr 19 18:27:27 GMT 2024

Powered by FUDForum. Page generated in 0.03476 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top