Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Runtime problem
Runtime problem [message #164456] Tue, 08 August 2006 08:21 Go to next message
Eclipse UserFriend
Originally posted by: zor.zor.com

Hi,

I'm adding a JAR file to my eclipse application using "add external
jar" . But while it compile the program with no problem, during the
running of the program it can not find the classes that are part of the
JAR.
What am I missing?!

Thanks,
Yoni.
Re: Runtime problem [message #164480 is a reply to message #164456] Tue, 08 August 2006 08:53 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
Yoni,

> Hi,
>
> I'm adding a JAR file to my eclipse application using "add external
> jar" . But while it compile the program with no problem, during the
> running of the program it can not find the classes that are part of the
> JAR.
> What am I missing?!
>
> Thanks,
> Yoni.

You need to add the JAR file to the runtime class path.
To do that, select "Run..." from the "Run" menu, select the launch
configuration for your Java class, switch to the Classpath page, select
the "User Entries" node, and click the "Add External JARs" button to add
the JAR file to your classpath.

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: Runtime problem [message #164496 is a reply to message #164480] Tue, 08 August 2006 09:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zor.zor.com

Asaf,

Thank you for the quick answer... However there is no classpath page.
I'm using eclipse 3.2 and I'm building an Eclipse Application. You have
classpath page if you are developing a "Java Bean" or "Java
Application" but not for "Eclipse Application" ... Am I missing
something?!?

Yoni.

Asaf Yaffe wrote:

> Yoni,
>
> > Hi,
> >
> > I'm adding a JAR file to my eclipse application using "add external
> > jar" . But while it compile the program with no problem, during the
> > running of the program it can not find the classes that are part of
> > the JAR.
> > What am I missing?!
> >
> > Thanks,
> > Yoni.
>
> You need to add the JAR file to the runtime class path.
> To do that, select "Run..." from the "Run" menu, select the launch
> configuration for your Java class, switch to the Classpath page,
> select the "User Entries" node, and click the "Add External JARs"
> button to add the JAR file to your classpath.
>
> HTH,
> Asaf
Re: Runtime problem [message #164503 is a reply to message #164496] Tue, 08 August 2006 10:03 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
Yoni,

I understand that you are creating an Eclipse plugin. I don't have a lot
of experience in plugin development, but I think you can specify the JAR
files used by your plugin in the plugin configuration file (plugin.xml):
Double click plugin.xml (should be located in the root of your plugin
project), select the "Runtime" tab in the editor, and add the required
JAR files in the "classpath" section. You may want to add these JAR
files to your project (usually in a 'lib' directory) so you can add them
to the classpath using a path name relative to your plugin direcory.

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: Runtime problem [message #164745 is a reply to message #164456] Wed, 09 August 2006 09:30 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Yoni Zor wrote:

>Hi,
>
>I'm adding a JAR file to my eclipse application using "add external
>jar" . But while it compile the program with no problem, during the
>running of the program it can not find the classes that are part of the
>JAR.
>What am I missing?!
>
>
Where is the external JAR? If it is not in your plug-in then you have to
bundle bundle it first. Check older threads about this.

Dani

>Thanks,
>Yoni.
>
>
Re: Runtime problem [message #164950 is a reply to message #164503] Thu, 10 August 2006 09:34 Go to previous message
Eclipse UserFriend
Originally posted by: zor.zor.com

It seems that I had to both add it threw the plugin and put it in the
root of the project.

Thanks

Asaf Yaffe wrote:

> Yoni,
>
> I understand that you are creating an Eclipse plugin. I don't have a
> lot of experience in plugin development, but I think you can specify
> the JAR files used by your plugin in the plugin configuration file
> (plugin.xml): Double click plugin.xml (should be located in the root
> of your plugin project), select the "Runtime" tab in the editor, and
> add the required JAR files in the "classpath" section. You may want
> to add these JAR files to your project (usually in a 'lib' directory)
> so you can add them to the classpath using a path name relative to
> your plugin direcory.
>
> HTH,
> Asaf
Previous Topic:'links' directory and plugin locations
Next Topic:FREE Eclipse Magazine Download
Goto Forum:
  


Current Time: Fri Apr 26 03:16:44 GMT 2024

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

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

Back to the top