Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » building my own RCP application
building my own RCP application [message #440774] Wed, 07 December 2005 12:25 Go to next message
Eclipse UserFriend
Hi all,

Does anyone know how can I create my own RCP application from existing
java classes WITHOUT using the RCP templates (such as Hello RCP)?
I have tried copying bits and pieces from various RCP classes into mine
but this throws a: Unhandled event loop exception Reason:
java.lang.NullPointerException.

Can you please let me know what I am doing wrong? And possibly point me
out to the relevant documentation/tutorial to achieve this WITHOUT using
templates?

Thanks
Re: building my own RCP application [message #440778 is a reply to message #440774] Wed, 07 December 2005 13:12 Go to previous messageGo to next message
Eclipse UserFriend
I'd suggest creating two apps; one completely blank, and the other from the template. Then copy and paste bits over to build it up piecemeal.

The problem is that there's no 'One thing' that you'll have to do to make it work. There's 'Several things', and you have to do each of them to make it work properly.

A better approach might be to create a template, then delete everything that you know you don't want. At least that way, some of the 'magic files' (build.properties, Manifest.MF, .classpath) are set up for you and it's just a case of you writing your own code.

Alex.


--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91973000.html
Re: building my own RCP application [message #440849 is a reply to message #440774] Fri, 09 December 2005 02:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nico.bruehl.siemens.com

I did it the way alex said..
You just may create a RCP with a View...
if you then understood how the view creation/placement works.. it's easier to make it look like your own one.

I'm currently on the connectivity between 2 plugins of mine, so I can't help you with that :-( - but the best way to make your own one may be to create a Plugin with a Simple View and just fix it the way you want it to be. :)

Btw, the Mail Example is also a good one, especially if you want to have more than one view and want to gain a better understanding of how the placement works.


--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91973402.html
Re: building my own RCP application [message #440859 is a reply to message #440774] Fri, 09 December 2005 07:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Boris. I'm with you on the frustration of RCP. I'm quite proficient
in Servlet/JSP deve lopment, so I figured I'd broaden my horizons by
creating a GUI application. Well, writing the GUI app was quite easy
using the Eclipse Visual Editor, but trying to make it fly as a RCP is
proving to be a nightmare. There has got to be a better way!

Can someone explain what we are doing wrong?

Thanks!
Re: building my own RCP application [message #440867 is a reply to message #440774] Fri, 09 December 2005 08:52 Go to previous messageGo to next message
Eclipse UserFriend
I'd suggest you to take a closer look into the articles area of the
eclipse homepage. There are quite a few tutorials for RCP.
Real point and click developing is still at least one year away so at
the moment you really need to know what you are doing.

Yves
Re: building my own RCP application [message #440955 is a reply to message #440867] Wed, 14 December 2005 10:33 Go to previous messageGo to next message
Eclipse UserFriend
Ok, after several days playing around with it, I finally made it to create
my own RCP application from existing classes.
Now I have an issue with the packaging and deployment of the application.
It builds fine, but when I try to run it, the "eclipse.exe" throws a
java.lang.ClassNotFoundException because the entry class is not in the
produced jar.
Does anyone know where in the plugin should I specify the inclusion of my
classes? I've tried several options on the build configuration without any
success and I cannot find tutorial on this.

Thanks
Re: building my own RCP application [message #440957 is a reply to message #440955] Wed, 14 December 2005 10:47 Go to previous messageGo to next message
Eclipse UserFriend
What did you do? Without knowing the steps, we can't point out which
one is missing.

For example: If I was creating an RCP app, I'd use a template to create
one of the basic RCP plugins. That gives me a plugin.xml, MANIFEST.MF,
and a Plugin (or Activator) java file in my <plugin-project>/src folder.

If I wanted to use existing java classes, I'd create the appropriate
packages under the src folder and use the Import>File System to import
the java files into the correct projects (unless there was a tonne of them).

Then I'd start changing the template-generated RCP classes to call into
my existing classes.

Everything that I've done above would result in jar plugin for
deployment with my new java classes in the jar.


Now if my existing java classes had dependancies on 3rd party jars (like
XmlBeans) that's a completely different story :-)

It involves a bunch of steps like those listed
http://dev.eclipse.org/newslists/news.eclipse.platform/msg48 366.html

Later,
PW
Re: building my own RCP application [message #440986 is a reply to message #440957] Thu, 15 December 2005 10:21 Go to previous messageGo to next message
Eclipse UserFriend
What I did is create an RCP application using one of the template to
generate automatically plugin.xml, MANIFEST.MF, etc.

Then I imported my own project using the Import>File System to include all
necessary packages. Then I adapted the calls so that Application. java
became my starting class, the view became my user interface, etc.

Now I am at the deployment step. Hence, I created feature and product
configuration and generated the .exe without error.
However, when I try to launch it from the deployed directory, I get
org.eclipse.core.runtime.CoreException[1]:
java.lang.ClassNotFoundException: package.StartingClass
Looking at the jar generated, this class is located under
bin/package/StartingClass
Do you know how and where in the plugin configuration can I specify to
remove or ignore the bin/ ?

Thanks
Re: building my own RCP application [message #441072 is a reply to message #440986] Mon, 19 December 2005 09:14 Go to previous messageGo to next message
Eclipse UserFriend
That looks like a problem you could get into where 1) you added jar
files to your plugin 2) added the jar files to the
manifest>Runtime>Classpath 3) lost the "." library, and 4) updated your
manifest>Build>Binary build to include the bin/ directory.

But maybe I'm wrong and you don't have any jar files in your plugin.

If you did add jar files to your plugin, you can either follow the
previously mentioned steps or add the bin/ folder to your Runtime>Classpath.

Later,
PW
Re: building my own RCP application [message #441155 is a reply to message #441072] Wed, 21 December 2005 12:23 Go to previous messageGo to next message
Eclipse UserFriend
You're right I have some jar files included in the plugin.

Even trying both of your solutions and even together, it does not work.
Still in the plugin.jar the classes are located under /bin/package
and the log says that it does not find the entry class say package.class

voila
Re: building my own RCP application [message #441493 is a reply to message #441155] Tue, 03 January 2006 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Boris wrote:
> You're right I have some jar files included in the plugin.
>
> Even trying both of your solutions and even together, it does not work.
> Still in the plugin.jar the classes are located under /bin/package
> and the log says that it does not find the entry class say package.class
>
> voila
>

Your best bet is to delete the extra jar files from you plugin
completely (from build path, from the manifest>Runtime, and from your
project, but make backups first). Set up the manifest and
build.properties like they would work if you hadn't added extra jars to
your plugin.

Then add the jars back, following the steps from
http://dev.eclipse.org/newslists/news.eclipse.platform/msg48 366.html


You shouldn't have your <project>/bin folder show up in your plugin, you
can remove that from the manifest>Build tab. Also, when you export your
plugin the class files should show up at the root of your plugin.

Later,
PW
Re: building my own RCP application [message #441586 is a reply to message #441155] Thu, 05 January 2006 00:59 Go to previous message
Eclipse UserFriend
I got similar problem, only after I ran my entire application through the LAUNCH option, and then after trying to export it out, it would say, PLUGIN class cannot be found.

I spent few hours trying to find a reason to that, but finally gave up, and started off with standard eclipse template example, and moving files one by one, to take care of the issue.

Maybe, after I am done building, shall take a DIFF to find out, what makes it fail.


--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91979129.html
Previous Topic:Recommended database for a standalone RCP application
Next Topic:How to add widgets into the status bar like labels and progress bar
Goto Forum:
  


Current Time: Sat Sep 27 00:07:25 EDT 2025

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

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

Back to the top