Home » Eclipse Projects » Eclipse Platform » using an external jar
using an external jar [message #24537] |
Wed, 30 April 2003 13:13  |
Eclipse User |
|
|
|
Originally posted by: aekapon.comcast.net
i am writing a program that uses a product called the java acme library. The
acme library comes in a jar file called acmeLib.jar. In my java build path,
i add the acmeLib.jar as an External Jar File and my program compiles using
this, but when i try to run it, any time i try to instantiate an object from
the Jar file, i get a java.lang.NoClassDefError and my program crashes, any
suggestions would be greatly appreciated.
Niall
oh, i have used the jar file with applications written outside of eclipse,
so i know the jar file works.
|
|
| | |
Re: using an external jar [message #24738 is a reply to message #24657] |
Wed, 30 April 2003 13:45   |
Eclipse User |
|
|
|
Originally posted by: aekapon.comcast.net
ok, i found the classpath tab, and that is used when i am running this as a
java applications, but i am writing this using the gef plugin, so as i
understand it, i've been writing this and testing using the "Run-Time
workbench" where there is no such tab. I can't find in the runtime workbench
where to set this class path. Or conversely, where to set the plugins when
running as a Java app.
thanks for the help,
niall
"Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> wrote in message
news:fr10bvktlffi8gev1hglbf96jgvjqgnk6j@4ax.com...
> On Wed, 30 Apr 2003 13:13:36 -0400, "Niall Little"
> <aekapon@comcast.net> wrote:
> >i am writing a program that uses a product called the java acme library.
The
> >acme library comes in a jar file called acmeLib.jar. In my java build
path,
> >i add the acmeLib.jar as an External Jar File and my program compiles
using
> >this, but when i try to run it, any time i try to instantiate an object
from
> >the Jar file, i get a java.lang.NoClassDefError and my program crashes,
any
> >suggestions would be greatly appreciated.
> You need to add this jar at runtime as well. See the classpath tab of
> your launching configuration.
> --
> Olivier
|
|
|
Re: using an external jar [message #25451 is a reply to message #24738] |
Thu, 01 May 2003 09:42   |
Eclipse User |
|
|
|
Niall,
For plugins, you should set the classpath in the "Runtime" tab of your
plugin.xml. Click the "Add" button for the "Run-time libraries" section
and include your jars there (the refs are project relative).
You can now update your project classpath by right-clicking in the
"Required Plug-ins" section of the "Dependencies" tab and selecting
"Compute Build Path".
hth
Todd
Niall Little wrote:
> ok, i found the classpath tab, and that is used when i am running this as a
> java applications, but i am writing this using the gef plugin, so as i
> understand it, i've been writing this and testing using the "Run-Time
> workbench" where there is no such tab. I can't find in the runtime workbench
> where to set this class path. Or conversely, where to set the plugins when
> running as a Java app.
>
> thanks for the help,
> niall
>
> "Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> wrote in message
> news:fr10bvktlffi8gev1hglbf96jgvjqgnk6j@4ax.com...
>
>>On Wed, 30 Apr 2003 13:13:36 -0400, "Niall Little"
>><aekapon@comcast.net> wrote:
>>
>>>i am writing a program that uses a product called the java acme library.
>
> The
>
>>>acme library comes in a jar file called acmeLib.jar. In my java build
>
> path,
>
>>>i add the acmeLib.jar as an External Jar File and my program compiles
>
> using
>
>>>this, but when i try to run it, any time i try to instantiate an object
>
> from
>
>>>the Jar file, i get a java.lang.NoClassDefError and my program crashes,
>
> any
>
>>>suggestions would be greatly appreciated.
>>
>>You need to add this jar at runtime as well. See the classpath tab of
>>your launching configuration.
>>--
>>Olivier
>
>
>
|
|
|
Re: using an external jar [message #26088 is a reply to message #25451] |
Thu, 01 May 2003 12:59   |
Eclipse User |
|
|
|
Originally posted by: bob.objfac.com
Does that really work for jar files not in the eclipse folder or workspace?
Plugin writers used to be advised that external jars needed to be part of
some plugin. If it does work with some levels of "../.." is it part of the
API that it works, or just an accident that might change tomorrow?
Another thing Niall might think about. How is the jar file going to be
located when the plugin is installed on someone else's system?
Bob
"Todd Chambery" <chambery@zclipse.org> wrote in message
news:b8r87n$si1$1@rogue.oti.com...
> Niall,
>
> For plugins, you should set the classpath in the "Runtime" tab of your
> plugin.xml. Click the "Add" button for the "Run-time libraries" section
> and include your jars there (the refs are project relative).
>
> You can now update your project classpath by right-clicking in the
> "Required Plug-ins" section of the "Dependencies" tab and selecting
> "Compute Build Path".
>
> hth
>
> Todd
>
>
> Niall Little wrote:
> > ok, i found the classpath tab, and that is used when i am running this
as a
> > java applications, but i am writing this using the gef plugin, so as i
> > understand it, i've been writing this and testing using the "Run-Time
> > workbench" where there is no such tab. I can't find in the runtime
workbench
> > where to set this class path. Or conversely, where to set the plugins
when
> > running as a Java app.
> >
> > thanks for the help,
> > niall
> >
> > "Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> wrote in message
> > news:fr10bvktlffi8gev1hglbf96jgvjqgnk6j@4ax.com...
> >
> >>On Wed, 30 Apr 2003 13:13:36 -0400, "Niall Little"
> >><aekapon@comcast.net> wrote:
> >>
> >>>i am writing a program that uses a product called the java acme
library.
> >
> > The
> >
> >>>acme library comes in a jar file called acmeLib.jar. In my java build
> >
> > path,
> >
> >>>i add the acmeLib.jar as an External Jar File and my program compiles
> >
> > using
> >
> >>>this, but when i try to run it, any time i try to instantiate an object
> >
> > from
> >
> >>>the Jar file, i get a java.lang.NoClassDefError and my program crashes,
> >
> > any
> >
> >>>suggestions would be greatly appreciated.
> >>
> >>You need to add this jar at runtime as well. See the classpath tab of
> >>your launching configuration.
> >>--
> >>Olivier
> >
> >
> >
>
|
|
| |
Re: using an external jar [message #26664 is a reply to message #26088] |
Thu, 01 May 2003 15:05  |
Eclipse User |
|
|
|
I was assuming that Niall's plugin contained a "lib" directory, but this
makes me think of something a little off topic...
Is there any plan to make something like a library registry for plugins?
Most of the weight of any plugin I work on is in the external
libraries I include.
Drive space really isn't much of an issue any more, but it's a thought.
Todd
Bob Foster wrote:
> Does that really work for jar files not in the eclipse folder or workspace?
> Plugin writers used to be advised that external jars needed to be part of
> some plugin. If it does work with some levels of "../.." is it part of the
> API that it works, or just an accident that might change tomorrow?
>
> Another thing Niall might think about. How is the jar file going to be
> located when the plugin is installed on someone else's system?
>
> Bob
>
> "Todd Chambery" <chambery@zclipse.org> wrote in message
> news:b8r87n$si1$1@rogue.oti.com...
>
>>Niall,
>>
>>For plugins, you should set the classpath in the "Runtime" tab of your
>>plugin.xml. Click the "Add" button for the "Run-time libraries" section
>>and include your jars there (the refs are project relative).
>>
>>You can now update your project classpath by right-clicking in the
>>"Required Plug-ins" section of the "Dependencies" tab and selecting
>>"Compute Build Path".
>>
>>hth
>>
>>Todd
>>
>>
>>Niall Little wrote:
>>
>>>ok, i found the classpath tab, and that is used when i am running this
>
> as a
>
>>>java applications, but i am writing this using the gef plugin, so as i
>>>understand it, i've been writing this and testing using the "Run-Time
>>>workbench" where there is no such tab. I can't find in the runtime
>
> workbench
>
>>>where to set this class path. Or conversely, where to set the plugins
>
> when
>
>>>running as a Java app.
>>>
>>>thanks for the help,
>>>niall
>>>
>>>"Olivier Thomann" <Olivier_Thomann@ca.ibm.comNOSPAM> wrote in message
>>>news:fr10bvktlffi8gev1hglbf96jgvjqgnk6j@4ax.com...
>>>
>>>
>>>>On Wed, 30 Apr 2003 13:13:36 -0400, "Niall Little"
>>>><aekapon@comcast.net> wrote:
>>>>
>>>>
>>>>>i am writing a program that uses a product called the java acme
>
> library.
>
>>>The
>>>
>>>
>>>>>acme library comes in a jar file called acmeLib.jar. In my java build
>>>
>>>path,
>>>
>>>
>>>>>i add the acmeLib.jar as an External Jar File and my program compiles
>>>
>>>using
>>>
>>>
>>>>>this, but when i try to run it, any time i try to instantiate an object
>>>
>>>from
>>>
>>>
>>>>>the Jar file, i get a java.lang.NoClassDefError and my program crashes,
>>>
>>>any
>>>
>>>
>>>>>suggestions would be greatly appreciated.
>>>>
>>>>You need to add this jar at runtime as well. See the classpath tab of
>>>>your launching configuration.
>>>>--
>>>>Olivier
>>>
>>>
>>>
>
>
|
|
|
Goto Forum:
Current Time: Fri May 09 18:07:32 EDT 2025
Powered by FUDForum. Page generated in 0.04028 seconds
|