Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » How to acquire a specific piug-in location path at runtime?
How to acquire a specific piug-in location path at runtime? [message #66238] Thu, 16 December 2004 10:31
Eclipse UserFriend
Originally posted by:

Hi guys,

I am having a question about how to acquire a specific plug-in (say, the
plug-in with ID "pluginA") location path from the plug-in registry of
Eclipse runtime by using a Java application(or at least how to get the
Eclipse platform runtime installation location path from the Java
application) . It seems the "org.eclipse.core.runtime.Platform" class
could be a possible entry point but the fact is that an
"AssertionFailedException" was always thrown when I tried to use this
class. I have asked this problem in "Eclipse platform" board but so far no
comments were posted...

The following is the sample code that I tried to acquire the Eclipse
platform runtime installation location path:

import org.eclipse.core.runtime.Platform;

public class Ptest {

public static void main(String[] args) {
System.out.println(Platform.getInstallLocation().toString()) ;

And the following is the exception thrown out during execution:

org.eclipse.core.internal.runtime.AssertionFailedException: assertion
failed: The application has not been initialized.
at org.eclipse.core.internal.runtime.Assert.isTrue( 107)
org.eclipse.core.internal.runtime.InternalPlatform.assertIni tialized(
org.eclipse.core.internal.runtime.InternalPlatform.getInstal lLocation(
at org.eclipse.core.runtime.Platform.getInstallLocation(Platfor
at model.presentation.Ptest.main(
Exception in thread "main"
Previous Topic:How can I find a good UML modeler Plug-in for Eclipse
Next Topic:How to acquire a specific piug-in location path at runtime?
Goto Forum:

Current Time: Mon Apr 22 22:49:07 GMT 2024

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

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

Back to the top