Installed Extensions don't work

R

Rhino

Is there some trick to making Installed Extensions work?

I'm trying to follow the instructions in the "The Extension Mechanism" trail
of the Java Tutorial but I'm running into problems with Installed
Extensions. Download Extensions are working just fine but I can't get
Installed Extensions to work at all. It's as if the jre/lib/ext directory
isn't there at all. I think I've followed all of the instructions carefully
and accurately but the Installed Extensions just won't work.

I know that is a fairly skimpy description of the problem but I'm hoping
that someone will suggest some basic possibilities before we get into all
the details. For instance, my JDK is on the PATH but the jre/lib/ext isn't
specified in the PATH. I assume that c:\j2sdk1.4.1_02\bin in the PATH also
enables programs to see down to c:\j2sdk1.4.1_02\jre\lib\ext but perhaps
that's wrong and I need to ensure that the jre/lib/ext is specifically named
in the PATH. Nothing is said about PATH in this trail though so I may be
going in the wrong direction with this suspicion.

Can anyone suggest a way to verify that Installed Extensions work?

For what it's worth, I actually tried the example suggested in the trail but
it wouldn't compile. As basic as it was, I couldn't make it compile and
can't see how it could possibly compile without one change: the
instantiation of an object named RectangleArea. That makes me wonder if
there are other basic things that are omitted from the trail.

I've tried several different examples of varying complexities but none of
them will work for me.

Any suggestions about basic things to look at to diagnose this situation?
 
R

Rhino

Your solution was exactly what I needed; everything works now. Thank you!

Now, could you explain it to me?
1. Why is the second JRE (the one in Program Files) even there? I don't
remember installing it.
2. When does the second JRE get used by my system/programs?
3. Does this mean I should ignore the first JRE, the one under
c:\j2sdk1.4.1_02 altogether? If not, when should I be using it?

Grateful but confused,

Rhino
 
M

Mark Thornton

Rhino said:
Is there some trick to making Installed Extensions work?

I'm trying to follow the instructions in the "The Extension Mechanism" trail
of the Java Tutorial but I'm running into problems with Installed
Extensions. Download Extensions are working just fine but I can't get
Installed Extensions to work at all. It's as if the jre/lib/ext directory
isn't there at all. I think I've followed all of the instructions carefully
and accurately but the Installed Extensions just won't work.

I know that is a fairly skimpy description of the problem but I'm hoping
that someone will suggest some basic possibilities before we get into all
the details. For instance, my JDK is on the PATH but the jre/lib/ext isn't
specified in the PATH. I assume that c:\j2sdk1.4.1_02\bin in the PATH also
enables programs to see down to c:\j2sdk1.4.1_02\jre\lib\ext but perhaps
that's wrong and I need to ensure that the jre/lib/ext is specifically named
in the PATH. Nothing is said about PATH in this trail though so I may be
going in the wrong direction with this suspicion.

Can anyone suggest a way to verify that Installed Extensions work?

For what it's worth, I actually tried the example suggested in the trail but
it wouldn't compile. As basic as it was, I couldn't make it compile and
can't see how it could possibly compile without one change: the
instantiation of an object named RectangleArea. That makes me wonder if
there are other basic things that are omitted from the trail.

I've tried several different examples of varying complexities but none of
them will work for me.

Any suggestions about basic things to look at to diagnose this situation?

Prior to 1.5, java looks for extensions as you expect, but javac does
NOT. So to compile code using such extensions you have to add them
explicitly to the classpath, but you can execute the result without
having the extensions in the classpath.

Mark Thornton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top