Copy/Pasting to and from a Java Applet

Joined
Sep 12, 2010
Messages
2
Reaction score
0
Points
1
I have been attempting to copy and past text from an applet for some time now, and frustratingly, I'm only having some luck. Unfortunately, there doesn't seem to be any rhyme or reason as to when, so it's about as useful as not being able to do it at all.

To clarify, I'm trying to copy text from within a Java Applet and paste it into TextEdit - copy/pasting within the applet works fine. Actually, it seems to behave as if it has its own clipboard. The text in question shows up in a little pop-up box and is meant to be copied, so that's not the issue.

What I've tried so far:
-I've tried looking in and tweaking a myriad of settings in both Java Preferences and System Preferences
-Looking for the java files to edit the security on them. I couldn't find them and I'm not sure if this is even the right direction, as it seems somewhat complicated for something that shouldn't be, but this is the best I could find through Google.
-Interpretive Dance (That IS how computers communicate, right?)

So, any suggestions? Am I overlooking something simple?


OS: 10.5.8
Browser: Firefox 3.5.12 (I couldn't get applets to work at all in 3.6)
Note: I should be getting Snow Leopard some time this week, so if that will resolve the issues, then that's good enough for me.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Is this an applet on some website that you can share so we can check it out?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
It is very possible that this is a Java thing. Visiting the test VM page and trying to copy the results from the applet didn't work for me at all (I couldn't even copy anything). Someone with more experience with Java may be better able to explain but I'm willing to bet this is a Java limitation.
 
OP
D
Joined
Sep 12, 2010
Messages
2
Reaction score
0
Points
1
The most recent site I've had this problem at is:
vNES
The issue is with the save feature when you open or close the applet. (Or hit ctrl + F10) Obviously it's meant to be interact with the clipboard, but only very rarely does it actually do so. Most of the times it behaves as if it has its own clipboard.

One of the sites I turned up while trying to solve this issue myself was:
Using the clipboard with JavaHase applets
Now, there are two issues with the site: It's fairly old (2002) and it's for Windows. However, it does seem to indicate that there is/was a work around for the issue, but unfortunately, I can't figure it out.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
I tried that page and couldn't get the copy/paste working either. I did some digging around, and this is not entirely uncommon. It may be due to the way OS X uses CMD-C/CMD-V for copy/paste functions, whereas Windows and… well… every other OS use CTRL-C/CTRL-V. Unfortunately, trying CTRL-C/CTRL-V doesn't work for me either. My guess is that the applet has to be coded in a way that is more OS X-friendly for copy/paste to work.
 
Joined
Oct 25, 2010
Messages
1
Reaction score
0
Points
1
I just wanted to point this out, which I found on another site:

Applets are downloaded to the browser's cache and executed there. You can of course run applets locally, and this is the easy way to test them, but you generally access them through a browser. No matter where they're running, though, they're in the sandbox and not allowed out unless you change the policy for that applet.

I think you may be thinking about Java WebStart, which is a slightly different ballgame. I've used this, but am not up on the security implications and what's allowed and what's not.

Powers That Be == Sun. It's the way the security was designed -- no access to the local machine, including the file system and clipboard.

Applets can be downloaded as .class files individually or as set contained in a .jar file.

So you can, but the security of the app would be such that it could access your local computer, and if it was malicious, well, you could be in a world of hurt.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top