Java VERSION problems develop, but never go away!!

E

edo

Here is a Java program to score any objective test:

http://www.psychology.org/cgi-bin/links2/jump.cgi?ID=3913

(see this site for details on all I describe below)

Problem is, this (and all similar programs wanting people to copy
and paste into a textarea), do not run on any Java newer than 1.4.0
This bug has been reported and is acknowledged as a bug, yet 2 new
editions of java have come out and the bug has not been repaired.

Since this SAME problem would affect a whole class of programs,
this is a serious problems.

Why are bugs developing and never going away???
 
A

Andrew Thompson

"edo" ...
Here is a Java program to score any objective test:

http://www.psychology.org/cgi-bin/links2/jump.cgi?ID=3913

(see this site for details on all I describe below)

I got third the way through the page before
the glaring colors got to me.
Problem is, this (and all similar programs wanting people to copy
and paste into a textarea), do not run on any Java newer than 1.4.0

You must be using Swing, it works in the AWT.

I just did a test with both an AWT and Swing
version under 1.4.2, the AWT version copies no
problem, the swing version will allow you to Ctrl-C
copy as well as Ctrl-V paste within the same JTextArea,
or I presume, JApplet, but the data does not carry
outside the JApplet.
 
A

Andrew Thompson

"Andrew Thompson" ...
"edo" ... ....

You must be using Swing, it works in the AWT.

I just did a test with both an AWT and Swing
version under 1.4.2, the AWT version copies no
problem, the swing version will allow you to Ctrl-C
copy as well as Ctrl-V paste within the same JTextArea,
or I presume, JApplet, but the data does not carry
outside the JApplet.

What I forgot to add is that I heard the
change was introduced to prevent
'denial of service' attacks by an applet
continually copying either "", or a nonsense
String to the copy buffer.
 
F

Filip Larsen


I must admit that the change in colors and fonts and general lack of
structure on that page got me too pretty quickly, so I'll just take a
guess at what I think your problem is.

Problem is, this (and all similar programs wanting people to copy
and paste into a textarea), do not run on any Java newer than 1.4.0

As Andrew mentions, there has been a change in the security permissions
for accessing the system clipboard from an Applet (including copying
from the Java console). To give an Applet access to the clipboard, each
host or user that runs the applet needs to grant the permission, like

grant codeBase "http://my.place/myapp/*" {
permission java.awt.AWTPermission "accessClipboard";
};

which can be added using the policytool that comes with your JRE, or you
need to sign the Applet with a request for this permission. For
information about the security system, I recommend that you read
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/policytool.html and
the references mentioned in the bottom of that page.

This bug has been reported and is acknowledged as a bug, yet 2 new
editions of java have come out and the bug has not been repaired.

Are you thinking of bug 4760425? If so, I can not reproduce that bug on
JRE 1.4.2_01 on Windows 2k. Running the code in the bug report, I get
consistent behaviour: without clipboard permission nothing gets pasted
at any time, with the clipboard permission grantet paste is done all the
time.

And even if the bug still persists in your installations, I believe it
goes away if the Applet is granted the clipboard permission.

Since this SAME problem would affect a whole class of programs,
this is a serious problems.

Why are bugs developing and never going away???

Some bugs unfortunately live a rather long time. Remember to vote on
bugs you feel are important to be fixed, it might help.


Regards,
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top