Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Eclipse vs plugin.jar

Reply
Thread Tools

Eclipse vs plugin.jar

 
 
Tom Anderson
Guest
Posts: n/a
 
      01-28-2011
Good day!

We're writing an applet. It does uses LiveConnect to talk to JavaScript on
the page. The classes for that - JSObject and friends - are in plugin.jar,
which can be found in the JRE lib directory.

We're developing using Eclipse. Eclipse has no idea about plugin.jar.

What's the right way to teach it?

We could put a copy of plugin.jar in our project. That's easy, but means
we're not using the installed version, which leaves us vulnerable to
version mismatch if Sun decides to make changes to this decade-old piece
of code.

We could add an external jar reference. That's also easy, and uses the
installed jar, but involves hardcoding the path to the JRE in the
metadata.

We could use a classpath variable for the JRE's location, and add an
external JAR reference relative to that, which uses the installed jar and
doesn't hardcode the location, but it means everyone has to add a new
variable to their workspace (there isn't a predefined one for JAVA_HOME
or JRE_HOME, annoyingly).

We could define a 'library', which is some sort of bundle of jars, which
has the disadvantages of all the above approaches, and none of the
advantages.

Any thoughts?

tom

--
I am the best at what i do.
 
Reply With Quote
 
 
 
 
Daniele Futtorovic
Guest
Posts: n/a
 
      01-28-2011
On 28/01/2011 17:23, Tom Anderson allegedly wrote:
> Good day!
>
> We're writing an applet. It does uses LiveConnect to talk to JavaScript
> on the page. The classes for that - JSObject and friends - are in
> plugin.jar, which can be found in the JRE lib directory.
>
> We're developing using Eclipse. Eclipse has no idea about plugin.jar.
>
> What's the right way to teach it?
>
> We could put a copy of plugin.jar in our project. That's easy, but means
> we're not using the installed version, which leaves us vulnerable to
> version mismatch if Sun decides to make changes to this decade-old piece
> of code.
>
> We could add an external jar reference. That's also easy, and uses the
> installed jar, but involves hardcoding the path to the JRE in the metadata.
>
> We could use a classpath variable for the JRE's location, and add an
> external JAR reference relative to that, which uses the installed jar
> and doesn't hardcode the location, but it means everyone has to add a
> new variable to their workspace (there isn't a predefined one for
> JAVA_HOME or JRE_HOME, annoyingly).
>
> We could define a 'library', which is some sort of bundle of jars, which
> has the disadvantages of all the above approaches, and none of the
> advantages.
>
> Any thoughts?
>
> tom


Firstly, I assume the problem is it doesn't compile, isn't it? Because
it should run fine.

I'm not using Eclipse anymore these days, so I don't know exactly, but
isn't there some point where you define your "platform", viz. the JDK
you're using? Wouldn't including the lib in question belong in that step?

df.


 
Reply With Quote
 
 
 
 
Tom Anderson
Guest
Posts: n/a
 
      01-28-2011
On Fri, 28 Jan 2011, Daniele Futtorovic wrote:

> On 28/01/2011 17:23, Tom Anderson allegedly wrote:
>
>> We're developing using Eclipse. Eclipse has no idea about plugin.jar.
>>
>> What's the right way to teach it?

>
> Firstly, I assume the problem is it doesn't compile, isn't it?


Yes, absolutely.

> Because it should run fine.


I would hope so.

> I'm not using Eclipse anymore these days, so I don't know exactly, but
> isn't there some point where you define your "platform", viz. the JDK
> you're using?


They come pre-packaged (you tell Eclipse where the JDK home directory is,
and it searches out jars in it). It pulls jars from the JDK but not the
JRE, so it doesn't include plugin.jar by default.

> Wouldn't including the lib in question belong in that step?


It is possible to edit the list, so yes, we could add plugin.jar there.
That has roughly the same disadvantages as adding a new 'library', in that
it has to be done individually on each machine, but it is rather neater.
Definitely an option to consider.

tom

--
If god did exist, we would have to abolish him. -- Mikhail Bakunin
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      01-28-2011
On 28-01-2011 11:23, Tom Anderson wrote:
> We're writing an applet. It does uses LiveConnect to talk to JavaScript
> on the page. The classes for that - JSObject and friends - are in
> plugin.jar, which can be found in the JRE lib directory.
>
> We're developing using Eclipse. Eclipse has no idea about plugin.jar.
>
> What's the right way to teach it?
>
> We could put a copy of plugin.jar in our project. That's easy, but means
> we're not using the installed version, which leaves us vulnerable to
> version mismatch if Sun decides to make changes to this decade-old piece
> of code.
>
> We could add an external jar reference. That's also easy, and uses the
> installed jar, but involves hardcoding the path to the JRE in the metadata.
>
> We could use a classpath variable for the JRE's location, and add an
> external JAR reference relative to that, which uses the installed jar
> and doesn't hardcode the location, but it means everyone has to add a
> new variable to their workspace (there isn't a predefined one for
> JAVA_HOME or JRE_HOME, annoyingly).
>
> We could define a 'library', which is some sort of bundle of jars, which
> has the disadvantages of all the above approaches, and none of the
> advantages.


I would add it as external jar.

If that jar disappears due to a Java upgrade, then Eclipse
will give you an error and you just fix it.

The real build should be done via ant or maven anyway.

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
org.eclipse.ant.core.AntSecurityException Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". jygoo Java 1 03-22-2006 06:04 PM
Nokia + Eclipse: creating JAR files from eclipse John Goche Java 2 01-22-2006 01:53 AM
[ECLIPSE] [PRIVACY] - Direct Violation of Eclipse Foundations PrivacyPolicy Ilias Lazaridis Java 0 01-16-2005 11:31 AM
[ECLIPSE] [CENSORSHIP] - Mike Milinkovich (Eclipse Foundation Director)Censors Forums Ilias Lazaridis Java 0 01-08-2005 12:23 PM
Deploying eclipse plugin cleared everything in eclipse - project references in package explorer etc. javaguy44 Java 1 08-18-2004 03:24 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57