writing your own eclipse based application [message #29782] |
Mon, 12 May 2003 05:14  |
Eclipse User |
|
|
|
Who can explain how to write an eclipse based application? I mean an
application from scratch, not an extension of the workbench.
I've found info about IPlatformRunnable, but I don't get it working. If
I check the install.ini I see that by default org.eclipse.ui.workbench
is the application. However in the plugin.xml of that plugin is no
occurence of beeing an extension of
org.eclipse.core.runtime.applications. And that is what I thought was
needed to start as application.
I always get:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
Caused by: java.lang.IllegalArgumentException: Application not found:
tk.vanschoren.eclipse.main.
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:843)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
... 7 more
What is exactly necessary to writa an application, what is
IPlatformRunnable realy used for and how to setup eclipse to use my
application?
thanks
|
|
|
|
Re: writing your own eclipse based application [message #29810 is a reply to message #29798] |
Mon, 12 May 2003 09:59   |
Eclipse User |
|
|
|
thanks, that cleared up some issues for me, but now I have a new problem:
I have following plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="tk.vanschoren.eclipse.main"
name="Plug-in test project Plug-in"
version="1.0.0"
provider-name="">
class="tk.vanschoren.eclipse.PlugInTest"
>
<runtime>
<library name="main.jar">
</library>
</runtime>
<extension id="main" point="org.eclipse.core.runtime.applications">
<application>
<run class="tk.vanschoren.eclipse.PlugInTest">
<parameter name="optimize" value="true"/>
</run>
</application>
</extension>
</plugin>
And it I use application tk.vanschoren.eclipse.main.main
I seems that the plugin tk.vanschoren.eclipse.PlugInTest is loaded,
because I get debug output from the startup() method.
However, right after that I get an exception in the log file stating
that tk.vanschoren.eclipse.PlugInTest can not be instantiated. How come?
It is already instantiated because I get debug output, or was that
another classloader or so?
below is the output from the log file:
!SESSION mei 12, 2003 15:53:13.531
---------------------------------------------
java.version=1.4.1
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=nl_BE
Command-line arguments: -os win32 -ws win32 -arch x86 -install
file:D:/Programs/Copy of eclipse/
!ENTRY org.eclipse.core.runtime 4 2 mei 12, 2003 15:53:13.531
!MESSAGE Plug-in "tk.vanschoren.eclipse.main" was unable to instantiate
class "tk.vanschoren.eclipse.PlugInTest".
!STACK 0
java.lang.InstantiationException: tk.vanschoren.eclipse.PlugInTest
at java.lang.Class.newInstance0(Class.java:291)
at java.lang.Class.newInstance(Class.java:259)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:138)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:167)
at
org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExtension(ConfigurationElement.java:103)
at
org.eclipse.core.internal.runtime.InternalPlatform.loaderGet Runnable(InternalPlatform.java:472)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.eclipse.core.internal.boot.InternalBootLoader.getRunnabl e(InternalBootLoader.java:471)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:841)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.core.runtime 4 2 mei 12, 2003 15:53:13.546
!MESSAGE Plug-in "tk.vanschoren.eclipse.main" was unable to instantiate
class "tk.vanschoren.eclipse.PlugInTest".
!STACK 0
java.lang.InstantiationException: tk.vanschoren.eclipse.PlugInTest
at java.lang.Class.newInstance0(Class.java:291)
at java.lang.Class.newInstance(Class.java:259)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:138)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:167)
at
org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExtension(ConfigurationElement.java:103)
at
org.eclipse.core.internal.runtime.InternalPlatform.loaderGet Runnable(InternalPlatform.java:472)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.eclipse.core.internal.boot.InternalBootLoader.getRunnabl e(InternalBootLoader.java:471)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:841)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
!SESSION
------------------------------------------------------------ ----------
!ENTRY org.eclipse.core.launcher 4 0 mei 12, 2003 15:53:13.562
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
Caused by: java.lang.IllegalArgumentException: Application not found:
tk.vanschoren.eclipse.main.main.
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:843)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
... 7 more
|
|
|
|
Powered by
FUDForum. Page generated in 0.05566 seconds