Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » writing your own eclipse based application
writing your own eclipse based application [message #29782] Mon, 12 May 2003 05:14 Go to next message
Eclipse UserFriend
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 #29798 is a reply to message #29782] Mon, 12 May 2003 08:36 Go to previous messageGo to next message
Eclipse UserFriend
org.eclipse.ui.workbench is defined in the org.eclipse.ui plugin.xml.

org.eclipse.ui is the plugin and "workbench" is the extension point id.
It confused me at first as well.

An easy way to find out extension point usage in eclipse.
- Import all of eclipse as binary projects.
- Open the plugin.xml defining the extension point
in the PDE plugin.xml editor.
- Select the Extension Point tab.
- Select the extension point of interest on the left.
- On the right side the list who's using the extension point shows up
in the extension point usage pane.
-Browse the source at your leisure :-)

Peter


Ronald Vanschoren wrote:
> 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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: writing your own eclipse based application [message #29820 is a reply to message #29810] Mon, 12 May 2003 10:38 Go to previous message
Eclipse UserFriend
I found it: it seems that the plugin class and the IPlatformRunnable may
not be the same class. You have to make 2 seperate classes.
also make sure to call Platform.endSplash() or your application will not
end.
Previous Topic:Turn of compiling?
Next Topic:External tool working directory
Goto Forum:
  


Current Time: Wed May 14 23:13:13 EDT 2025

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

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

Back to the top