Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Using a library
Using a library [message #155646] Tue, 11 November 2003 04:32 Go to next message
Eclipse UserFriend
Originally posted by: pecanov.mt.net.mk

I have put a mysql.jar (a jdbc driver) as a pluging project library. Using
the classes from the jar is not a problem when running the plugin. The
problem is when loading the driver using:

Class.forName("com.jdbc.mysql.Driver") ,
it throws an ClassNotFoundException. I figure that it's something with the
class loader that the platform uses for plugin projects. Any idea how to
solve this?

Thanx
Re: Using a library [message #155654 is a reply to message #155646] Tue, 11 November 2003 19:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Where is the class that executes the forName stmt defined? If it is not
in a plugin that has the com.jdbc.mysql plugin as a required plugin, it
won't find the code in that plugin. Each plugin only has its required
plugins (recursive to the root) visible. Other plugins are not visible
to it.

See for article on how plugins work:

http://www.eclipse.org/articles/Article-Plug-in-architecture /plugin_architecture.html

See for developing plugins within Eclipse:

http://www.eclipse.org/articles/Article-PDE-does-plugins/PDE -intro.html

--
Thanks, Rich Kulp

Re: Using a library [message #155679 is a reply to message #155654] Tue, 11 November 2003 21:46 Go to previous messageGo to next message
Eclipse UserFriend
Rich:

This is where I am hung up. I created two plugins by wizard,
SQLEditCommander and SQLConsole. I am making a TOAD type toolset for doing
SQL work in my Java projects in Eclipse. I have done this with Swing as a
standalone app. Anyhow, I am confused as to how I do the packages and how I
do the directories when I use the wizards. It looks like now, to write to
the Text object in the SQLConsole view, I will establish or mimic the
listener code in the plugin-architecture doc below.

How do I setup the plugins as far as directories? Do I need to create the
console, the listener Interface, etc. deeper than the Editor? And, do I
create the .exsd file in a schema directory under the editor directory?
And, is my editor (holds the menu actions) where the extension point is
defined, and the console is where the extension is defined?

Thanks,

David


David L. Whitehurst
aka. PiratePete
http://www.piratepetesoftware.com
dlwhitehurst@comcast.net
"Rich Kulp" <richkulp@NO.SPAM.us.ibm.com> wrote in message
news:bortr6$orl$1@eclipse.org...
> Where is the class that executes the forName stmt defined? If it is not
> in a plugin that has the com.jdbc.mysql plugin as a required plugin, it
> won't find the code in that plugin. Each plugin only has its required
> plugins (recursive to the root) visible. Other plugins are not visible
> to it.
>
> See for article on how plugins work:
>
>
http://www.eclipse.org/articles/Article-Plug-in-architecture /plugin_architecture.html
>
> See for developing plugins within Eclipse:
>
> http://www.eclipse.org/articles/Article-PDE-does-plugins/PDE -intro.html
>
> --
> Thanks, Rich Kulp
> 
>
Re: Using a library [message #155851 is a reply to message #155679] Wed, 12 November 2003 10:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

I'm sorry but I don't know anything about SQL or what TOAD is. And I
don't understand the architecture of what you are trying to do.

The basic thing to remember with plugins is that they have an isolated
view of the world with to respect to classes. They can only see classes
that are in their own plugin or any plugin they pre-req (and so on down
to the route).

I don't know what you mean by structuring directories and EXSD schemas
and so on. :-(
--
Thanks, Rich Kulp

Re: Using a library [message #157270 is a reply to message #155654] Sat, 15 November 2003 05:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pecanov.mt.net.mk

You want to say that I need to create a new empty plugin just to be a
container for the mysqlc.jar ( the jar that contains com.mysql.jdbc.Driver
class) ?


On Tue, 11 Nov 2003 19:12:56 -0500, Rich Kulp wrote:

> Where is the class that executes the forName stmt defined? If it is not
> in a plugin that has the com.jdbc.mysql plugin as a required plugin, it
> won't find the code in that plugin. Each plugin only has its required
> plugins (recursive to the root) visible. Other plugins are not visible
> to it.
>
> See for article on how plugins work:
>
> http://www.eclipse.org/articles/Article-Plug-in-architecture /plugin_architecture.html
>
> See for developing plugins within Eclipse:
>
> http://www.eclipse.org/articles/Article-PDE-does-plugins/PDE -intro.html
Re: Using a library [message #157700 is a reply to message #157270] Mon, 17 November 2003 09:48 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Basically, yes. All jars that plugins reference must be in a <library>
element in some plugin.xml that that that plugin has AS a <required>
plugin. Your mysqlc.jar could be in the same plugin as your other jars,
but it must be listed as a <library> for that plugin.

Look at:

http://www.eclipse.org/articles/Article-Plug-in-architecture /plugin_architecture.html

to understand how plugins work.

--
Thanks, Rich Kulp

Previous Topic:problème while éditing plugin code in UTF-8 under windows
Next Topic:Eclipse doesn't recognize a JAR file on the build path at runtime
Goto Forum:
  


Current Time: Sun Jun 08 16:48:27 EDT 2025

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

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

Back to the top