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 #598218] Thu, 16 December 2004 10:31
Eclipse UserFriend
Originally posted by: cavalier_hill.hotmail.com

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(Assert.java: 107)
at
org.eclipse.core.internal.runtime.InternalPlatform.assertIni tialized(InternalPlatform.java:216)
at
org.eclipse.core.internal.runtime.InternalPlatform.getInstal lLocation(InternalPlatform.java:1161)
at org.eclipse.core.runtime.Platform.getInstallLocation(Platfor m.java:1146)
at model.presentation.Ptest.main(Ptest.java:19)
Exception in thread "main"
Previous Topic:How to acquire a specific piug-in location path at runtime?
Next Topic:GEF related
Goto Forum:
  


Current Time: Thu Mar 28 16:45:56 GMT 2024

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

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

Back to the top