[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
Starting the eclipse environment by myself - example doesn't work
|
Hi *,
I try to start a self written plugin in an Eclipse2 launched
by org.eclipse.launcher.Main.
I refer to a mail by (15.Nov.2001) John Arthorne who describes
the basic steps of running a minimal Eclipse environment.
What I have done:
*****************************************************
1) I wrote my own application implementing
org.eclipse.core.boot.IPlatformRunnable:
package testplugin;
import org.eclipse.core.boot.IPlatformRunnable;
public class Main implements IPlatformRunnable {
public Object run(Object args) throws Exception {
sayHello();
return null;
}
public void sayHello() {
System.out.println("***> Hello World!");
}
}
******************************************************
2) I wrote a plugin.xml descriptor for my application:
<?xml version="1.0" encoding="UTF-8"?>
<plugin
name="testplugin"
id="testplugin"
version="2.0.0"
provider-name="ioSoftware">
<runtime>
<library name="testplugin.jar">
<export name="*"/>
</library>
</runtime>
<extension id="testplugin" point="org.eclipse.core.runtime.applications">
<application>
<run class="testplugin.Main"/>
</application>
</extension>
</plugin>
*******************************************************
3) I created a directory testplugin in the plugins
directory of my Eclipse installation. (location of the
installation is C:/Programme/eclipse). I copied the
plugin descriptor to this directory.
*******************************************************
4) I bundled my application into a jar and copied this
jar to the directory for my plugin.
*******************************************************
5) I started the eclipse org.eclipse.core.launcher.Main (under jdk14):
classpath:
C:\Programme\eclipse\plugins\org.eclipse.core.boot_2.0.0\boot.jar;
C:\Programme\eclipse\plugins\org.eclipse.core.runtime_2.0.0\runtime.jar;
C:\Programme\eclipse\startup.jar;
C:\Programme\eclipse\plugins\testplugin\testplugin.jar;
Command line parameter:
-application testplugin.Main
-consolelog
-debug
-boot
file://C:/Programme/eclipse/plugins/org.eclipse.core.boot_2.0.0/boot.jar
-data C:/Programme/eclipse/workspace
-plugins
file://C:/Dateien/Interest/eclipse/MinimalEclipse/plugins.properties
Plugins.properties looks as follows:
org.eclipse.core.runtime_2.0.0 =
C:/Programme/eclipse/plugins/testplugin/org.eclipse.core.runtime_2.0.0/plugi
n.xml
org.eclipse.core.boot_2.0.0 =
C:/Programme/eclipse/plugins/testplugin/org.eclipse.core.boot_2.0.0/plugin.x
ml
testplugin = C:/Programme/eclipse/plugins/testplugin/plugin.xml
Result on the command line:
===========================
Startup: using configuration
file:C:\Programme\eclipse\workspace\.metadata\.config\platform.cfg
Boot URL:
file://C:/Programme/eclipse/plugins/org.eclipse.core.boot_2.0.0/boot.jar
Workspace location:
C:/Programme/eclipse/workspace
Debug-Options:
file:C:/Dateien/Interest/eclipse/.options
Install URL:
file:C:/Programme/eclipse/
Unfortunately I get an error message in my log file:
====================================================
!SESSION -------------------------------------------------------------------
---
!ENTRY org.eclipse.core.launcher 4 0 Aug 14, 2002 12:39:51.775
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ExceptionInInitializerError
at
org.eclipse.core.internal.boot.InternalBootLoader.readPluginPath(InternalBoo
tLoader.java:740)
at
org.eclipse.core.internal.boot.InternalBootLoader.getPluginPath(InternalBoot
Loader.java:423)
at org.eclipse.core.boot.BootLoader.getPluginPath(BootLoader.java:283)
at
org.eclipse.core.internal.boot.PlatformConfiguration.updateConfigurationFrom
Plugins(PlatformConfiguration.java:1723)
at
org.eclipse.core.internal.boot.PlatformConfiguration.<init>(PlatformConfigur
ation.java:857)
at
org.eclipse.core.internal.boot.PlatformConfiguration.startup(PlatformConfigu
ration.java:1343)
at
org.eclipse.core.internal.boot.InternalBootLoader.initialize(InternalBootLoa
der.java:547)
at
org.eclipse.core.internal.boot.InternalBootLoader.startup(InternalBootLoader
.java:904)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.jav
a:768)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
at org.eclipse.core.launcher.Main.run(Main.java:698)
at org.eclipse.core.launcher.Main.main(Main.java:534)
Caused by: java.util.MissingResourceException: Can't find bundle for base
name org.eclipse.core.internal.boot.messages, locale en_US
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:8
04)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
at org.eclipse.core.internal.boot.Policy.<clinit>(Policy.java:18)
... 17 more
The bundle is part of boot.jar so it should be found. Could there be a
classloader problem?
I'm not sure, but could it be that the bundle is required to display a
message saying
that a plugin couldn't be loaded? If yes then I got a problem with the
discovery of my
plugins. I'm not sure about the content of plugins.properties. The
documentation
is a little unspecific:
"-plugins <location>: The arg is a URL pointing to a file which specs the
plugin path for
the platform. The file is in property file format where the keys are
user-defined names and
the values are comma separated lists of either explicit paths to plugin.xml
files or directories
containing plugins. (e.g., .../eclipse/plugins)."
Could anybody tell me what im doing wrong her?
Thank you in advance,
Heiko Nolte