arethinn: glowing green spiral (Default)
Does anyone know how I can yoink a Java applet from a web page? I can see the "applet code=" tag in the source but I'm not sure how to get at it.

(I don't want to do anything naughty with it, especially distribute it as my own; I just find it incredibly useful and would like to be able to use it without dialing up my net connection, and to be sure I'll still have it should the website cease to exist.)

Date: Sep. 8th, 2003 09:11 pm (UTC)From: [identity profile] danielmalloy.livejournal.com
Hm, haven't tried these, but you can give one of two things a shot (they work on other things you can't save):

1) try and download the class directly by filling in the direct URL and saving it (but I don't think that works)

2) go into your "temporary internet files", track it down and copy/paste it to your own directory somewhere.

Good Luck,
-Person

Date: Sep. 9th, 2003 12:50 am (UTC)From: [identity profile] starlightforest.livejournal.com
whoa...i had no idea you had a livejournal, much less that you read mine!

Date: Sep. 9th, 2003 09:05 am (UTC)From: [identity profile] danielmalloy.livejournal.com
Actually, didn't know you had one either; just noticed your name among the roll-call in Kyrin's thread. Now I have another journal to read when I'm procrastinating *grins*
(deleted comment)

Date: Sep. 9th, 2003 12:31 am (UTC)From: [identity profile] starlightforest.livejournal.com
err... I reiterate: "I can see the "applet code=" tag in the source but I'm not sure how to get at it." That is, I don't see a way to construct a url out of what's in the tag, and thus make a quick html page with which to download it directly (as I can do with embed= for flash/shockwave).

re: pic: thanks! I tend to change them around fairly frequently. sometimes I just see a graphic that makes me want to go "oo, gotta make a userpic out of that" and sometimes I have the full 10 already and have to give one up. the current default is actually by Liselotte Eriksson, who has a livejournal ([livejournal.com profile] liselotte_e I think?) and also a website, where I got the pic from, at http://user.tninet.se/~krc857r/ . She does all kinds of neat gothy faery stuff.

Date: Sep. 9th, 2003 08:54 am (UTC)From: [identity profile] twopiearr.livejournal.com
as far as an HTML page is concerned, an applet is just like any other file that you embed in a page (like an image). So right after the applet= bit, you should see a path name. That path name is relative to the location of the HTML page where the applet is embedded.

So if you have a page at (for example):

http://www.myserver.com/java/useful.htm

and in the source of that page you see a tag that includes the following snippet:

applet=cooltoy.jar

then the URL of the applet would be:

http://www.myserver.com/java/cooltoy.jar

standard HTML conventions apply, ie if the path begins with .. you have to go up a level, if it starts with / you start at the server's root, etc.

Once you have the URL, in many cases you should be able to simply type it directly to load the applet, then do Save As from the File menu. I know that on the Mac version of IE (possibly Safari as well but I've not had occasion to test) you can drag the URL from the title bar to the Download Manager window and snag it that way; I'm not sure if there's an equivelent in Windows or what it would be. However, there's any number of free download managers available for windows that should be able to download anything you've got a specific URL for.

Date: Sep. 9th, 2003 01:41 pm (UTC)From: [identity profile] starlightforest.livejournal.com
Well, when I tried what I ought to have tried before - just displaying the directory level one higher (I had been expecting a "forbidden" error) - I was able to save the entire contents of the directory and thus make a local copy of the whole page. It works. *shrug*

The code in the source, by the way, looked like this: <applet code =" dice">
The main file in question was actually dice.java, so numerous variations on appending " dice" (including trying dice.jar) to the url hadn't been successful. There were a bunch of .class files as well as the .gifs that it uses, so even if I had hit on it, I wouldn't have had anything usable, I don't think. *shrug*

Date: Sep. 9th, 2003 04:20 pm (UTC)From: [identity profile] twopiearr.livejournal.com
Ah, the joy of flexible languages.

Java applets can either be precompiled or executed in a runtime state. The practical difference is that a precompiled applet usually has the .jar extention and is a self-contained thing, whereas the runtime mode is more analogous to a pile of source code that is being compiled on the fly as the user interacts with it. Runtime languages tend not to be preferred because they're slower, but they're also easier to learn.

Sounds like the author of this applet took the latter approach. Your soultion sounds like a good one. Of course there are all kinds of die rollar apps for Windows out there, aren't there? (I mean I can think of four freeware rollers for Mac alone, I can't imagine there's less for windows...)

Ah well. geeking out can often be its own reward anyway :)

Profile

arethinn: glowing green spiral (Default)
Arethinn

July 2025

S M T W T F S
  12345
6789101112
13141516171819
20 2122232425 26
2728293031  

Expand Cut Tags

No cut tags

Style Credit

Page generated Jan. 18th, 2026 08:29 pm
Powered by Dreamwidth Studios