Running a plugin without JARring the classes? [message #226370] |
Sun, 11 April 2004 10:21  |
Eclipse User |
|
|
|
Originally posted by: chris.nospam.net
I've been trying to get a single plugin/feature running in an
RCP configuration WITHOUT putting the class files into a JAR.
According to the docs, this should be possible. From the Platform
Plug-in Developers Guide docs on the plug-in manifest file:
"The <library> elements collectively define the plug-in
runtime. At least one <library> must be specified. Each
<library> element has the following attributes:
name - string reference to a library file or directory
containing classes (relative to the plug-in install
directory). Directory references must contain trailing
file separator."
I started with a working plugin / RCP configuration and tried
un-jarring the classes into a directory structure. For example:
- plugin folder
- plugin.jar
became
- plugin folder
- classes
- com
- widgetcorp
- etc
I have tried a number different entries in the plug-in manifest
file, including:
<library name="classes/">
<library name="classes\">
<library name="./classes/">
<library name=".\classes\">
<library name="classes\\">
The resulting error log in the /configuration folder looks like:
!SESSION Apr 11, 2004 10:05:14.615 ---------------------------------------------
java.version=1.5.0-beta
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -application com.widgetcorp.etc.MyApp
!ENTRY org.eclipse.core.runtime 4 1 Apr 11, 2004 10:05:14.615
!MESSAGE Plug-in com.widgetcorp.etc was unable to load class com.widgetcorp.etc.MyApplication.
!STACK 0
java.lang.ClassNotFoundException: com.widgetcorp.etc.MyApplication
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:348)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:116)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:251)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:332)
at org.eclipse.osgi.framework.internal.core.Bundle.loadClass(Bu ndle.java:1294)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:132)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:125)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:114)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:269)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:239)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:267)
at org.eclipse.core.launcher.Main.run(Main.java:692)
at org.eclipse.core.launcher.Main.main(Main.java:676)
!ENTRY org.eclipse.osgi Apr 11, 2004 10:05:14.625
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Error running application
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:271)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:239)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:267)
at org.eclipse.core.launcher.Main.run(Main.java:692)
at org.eclipse.core.launcher.Main.main(Main.java:676)
Caused by: org.eclipse.core.runtime.CoreException: Plug-in com.widgetcorp.etc was unable to load class
com.widgetcorp.etc.MyApplication.
at org.eclipse.core.internal.registry.ConfigurationElement.thro wException(ConfigurationElement.java:165)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:134)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:125)
at org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:114)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:269)
... 9 more
The RCP app runs fine both within the Eclipse plugin development environment
and standalone (if the classes are JAR'd).
Why do I need this? I am trying to sell my organization on using the Eclipse
RCP for the next generation of our application. Some of our developers use
Eclipse...some do not. Forcing all the developers to use Eclipse will not
fly (nor would the cost of retraining). So I need to be able to run an
Eclipse/RCP application in an environment that is compatible with other IDEs.
Running an ANT build task to JAR all the class-files prior to each run of
the app is rather cumbersome.
TIA,
C
--
************************************
Chris Merrill
st.ng4@christophermerrillZZZ.net
(remove the ZZZ to contact me)
************************************
|
|
|
Re: Running a plugin without JARring the classes? [message #226502 is a reply to message #226370] |
Mon, 12 April 2004 01:24   |
Eclipse User |
|
|
|
Originally posted by: pascal.ibm.canada
This is supposed to work using <library name="classes/">.
I did it a while ago.
If you can't get it to work, enter a bug in equinox / general and attach
the plugin.xml and the .mf file located in the
configuration/org.eclipse.osgi/manifests.
PaScaL
Chris Merrill wrote:
> I've been trying to get a single plugin/feature running in an
> RCP configuration WITHOUT putting the class files into a JAR.
> According to the docs, this should be possible. From the Platform
> Plug-in Developers Guide docs on the plug-in manifest file:
> "The <library> elements collectively define the plug-in
> runtime. At least one <library> must be specified. Each
> <library> element has the following attributes:
>
> name - string reference to a library file or directory
> containing classes (relative to the plug-in install
> directory). Directory references must contain trailing
> file separator."
>
> I started with a working plugin / RCP configuration and tried
> un-jarring the classes into a directory structure. For example:
>
> - plugin folder
> - plugin.jar
> became
> - plugin folder
> - classes
> - com
> - widgetcorp
> - etc
>
> I have tried a number different entries in the plug-in manifest
> file, including:
>
> <library name="classes/">
> <library name="classes\">
> <library name="./classes/">
> <library name=".\classes\">
> <library name="classes\\">
>
> The resulting error log in the /configuration folder looks like:
>
> !SESSION Apr 11, 2004 10:05:14.615
> ---------------------------------------------
> java.version=1.5.0-beta
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
> Command-line arguments: -application com.widgetcorp.etc.MyApp
> !ENTRY org.eclipse.core.runtime 4 1 Apr 11, 2004 10:05:14.615
> !MESSAGE Plug-in com.widgetcorp.etc was unable to load class
> com.widgetcorp.etc.MyApplication.
> !STACK 0
> java.lang.ClassNotFoundException: com.widgetcorp.etc.MyApplication
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:348)
>
> at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:116)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:251)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:332)
>
> at
> org.eclipse.osgi.framework.internal.core.Bundle.loadClass(Bu ndle.java:1294)
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:132)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:125)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:114)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:269)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:239)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:117)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:267)
> at org.eclipse.core.launcher.Main.run(Main.java:692)
> at org.eclipse.core.launcher.Main.main(Main.java:676)
> !ENTRY org.eclipse.osgi Apr 11, 2004 10:05:14.625
> !MESSAGE Application error
> !STACK 1
> java.lang.RuntimeException: Error running application
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:271)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:239)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:117)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:267)
> at org.eclipse.core.launcher.Main.run(Main.java:692)
> at org.eclipse.core.launcher.Main.main(Main.java:676)
> Caused by: org.eclipse.core.runtime.CoreException: Plug-in
> com.widgetcorp.etc was unable to load class
> com.widgetcorp.etc.MyApplication.
> at
> org.eclipse.core.internal.registry.ConfigurationElement.thro wException(ConfigurationElement.java:165)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:134)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:125)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:114)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:269)
>
> ... 9 more
>
>
> The RCP app runs fine both within the Eclipse plugin development
> environment
> and standalone (if the classes are JAR'd).
>
> Why do I need this? I am trying to sell my organization on using the
> Eclipse
> RCP for the next generation of our application. Some of our developers use
> Eclipse...some do not. Forcing all the developers to use Eclipse will not
> fly (nor would the cost of retraining). So I need to be able to run an
> Eclipse/RCP application in an environment that is compatible with other
> IDEs.
> Running an ANT build task to JAR all the class-files prior to each run of
> the app is rather cumbersome.
>
> TIA,
> C
>
|
|
|
Re: Running a plugin without JARring the classes? [message #228220 is a reply to message #226370] |
Tue, 13 April 2004 21:53  |
Eclipse User |
|
|
|
Originally posted by: chris.nospam.net
To followup...I've found why this was not working for me. Once
you have run the installation with the classes in a JAR file and
the plugin.xml file pointing to the JAR, then you cannot change
the configuration to classes in a folder. The reverse procedure
does not work, either.
I tried deleting the manifest file
(/configuration/org.eclipse.osgi/manifests/<plugin>.MF)
but that did not help.
However, deleting the entire configuration folder DOES work.
C
Chris Merrill wrote:
> I've been trying to get a single plugin/feature running in an
> RCP configuration WITHOUT putting the class files into a JAR.
--
************************************
Chris Merrill
st.ng4@christophermerrillZZZ.net
(remove the ZZZ to contact me)
************************************
|
|
|
Powered by
FUDForum. Page generated in 0.03659 seconds