Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » P2 director application not working for me in 2021-09 (4.21) [BUG?](Likely BUG in P2 director 4.22 related to paths on Windows)
P2 director application not working for me in 2021-09 (4.21) [BUG?] [message #1844709] Wed, 22 September 2021 14:01 Go to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member
Hi all,

Let me start with a new edit #2 as I have found what may be the cause:

------------------------------------------
EDIT2: The new P2 director application may have a bug in path separators

As explained below, installations created with P2 director in Eclipse 4.21 fail to start. I tried to start the installation created and found that it has not handled the Windows '\' path separator properly, hence the installation cannot be found. In startup console log I see:

WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
Install location:
    file:/C:/Users/me/UsersmedevrootappsEclipse-2021-09MyEclipse-2021-09
...

The path should read file:/C:/Users/me/devroot/apps/Eclipse-2021-09/MyEclipse-2021-09 so it looks like the install locatiojn I provided with "-destination C:\Users\me\devroot\apps\Eclipse-2021-09\MyEclipse-2021-09" had all the '\' treated as escaping (resulting in them disappearing) and then the entire string was appended to the base location.
------------------------------------------


I know the new installer is awesome, but I prefer to provision my Eclipse using P2 director. For years this has worked for me, but for 2021-09 it suddenly stopped. I don't do anything fancy, just run the P2 director from command line, giving it a list of repos and features like this:

C:\Users\me\devroot\apps\Eclipse-2021-09\eclipse\eclipse.exe -nosplash -application org.eclipse.equinox.p2.director -p2.os win32 -p2.ws win32 -p2.arch x86_64 -profile SDKProfile -profileProperties org.eclipse.update.install.features=true -bundlepool C:\Users\me\devroot\apps\Eclipse-2021-09\shared_bundles_pool-2021-09 -destination C:\Users\me\devroot\apps\Eclipse-2021-09\MyEclipse-2021-09 -repository https://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/releases/2021-09,https://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/tools/cdt/releases/10.4 -installIU org.eclipse.cdt.feature.group,org.eclipse.egit.feature.group,org.eclipse.xtext.sdk.feature.group,org.eclipse.m2e.logback.feature.feature.group,org.eclipse.m2e.feature.feature.group,org.eclipse.epp.mpc.feature.group,org.eclipse.xtend.sdk.feature.group,org.eclipse.sdk.ide


This provisions my installation successfully (as usual) by when I try to run MyEclipse-2021-09\eclipse.exe I get a dialog box saying the "Java was started but returned exit code=13".

Note that C:\Users\me\devroot\apps\Eclipse-2021-09\eclipse simply contains the extracted platform runtime binary eclipse-platform-4.21-win32-x86_64.zip.

My JDK is 64-bit and running the same for 2021-06 (and 2021-03 and several before those) works fine:

PS C:\Users\me> mvn -version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: C:\Users\me\.sdkman\candidates\maven\3.8.1\bin\..
Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: C:\Users\me\.sdkman\candidates\java\11.0.11.hs-adpt
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"


Has something changed in P2 director in 4.21? Why is the installation it creates not startable?

EDIT: I also tried Oracle's OpenJDK with same results, so AdopyOpenJDK does not seem to be the issue. I get the same behaviour with:

PS C:\Users\me> mvn -version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: C:\Users\me\.sdkman\candidates\maven\3.8.1\bin\..
Java version: 11, vendor: Oracle Corporation, runtime: C:\Users\me\devroot\apps\jdk-11
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

[Updated on: Thu, 23 September 2021 08:37]

Report message to a moderator

Re: P2 director application not working for me in 2021-09 (4.21) [BUG?] [message #1844746 is a reply to message #1844709] Thu, 23 September 2021 20:16 Go to previous message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member
I have tried the same in Linux and it works fine. Therefore I have raised bug 576237
Previous Topic:Factoring out Bundles available from Orbit
Next Topic:How do I point my contained features to the main Eclipse Artifact P2s
Goto Forum:
  


Current Time: Thu Apr 18 00:12:29 GMT 2024

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

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

Back to the top