applet that do not download itself in the client

Hi,Is it possible to write an applet that do not download on the cache of the browser? So the source code and images could not be retrived?Thnks
[165 byte] By [luisofta] at [2007-9-29 6:07:53]
# 1
no
Abusea at 2007-7-14 20:16:46 > top of Java-index,Other Topics,Java Game Development...
# 2
You can do this with any applet. Simply never upload it to a server and no-one will be able to download your precious content.
_Breakfast_a at 2007-7-14 20:16:46 > top of Java-index,Other Topics,Java Game Development...
# 3

> You can do this with any applet. Simply never upload

> it to a server and no-one will be able to download

> your precious content.

I think that your answer was not necessary...

I dont have any "precious content"... just wanna know if there is a way to do it...

luisofta at 2007-7-14 20:16:46 > top of Java-index,Other Topics,Java Game Development...
# 4

> > You can do this with any applet. Simply never

> upload

> > it to a server and no-one will be able to download

> > your precious content.

>

> I think that your answer was not necessary...

> I dont have any "precious content"... just wanna know

> if there is a way to do it...

>

I disagree. The answer was well-deserved. If you put content on a public server, then you can't expect to somehow prevent people from reading the content. Anybody could download your applet code, whether or not they have java installed, or even if they don't have a web browser.

JN_a at 2007-7-14 20:16:46 > top of Java-index,Other Topics,Java Game Development...
# 5

you could include your private content into a class that is then encrypted.

e.g

you have some pictures that you do not want the user to cache

have generate java code that will wrap the pictures into a class.

i.e.

-read in picture into a byte array

-Perform some sort of encryption on the byte array

-generate a .java source file containing the byte array.

-complie the source

-include and use the .class file in your applet.

Say we have a byte array:

byte[] pic ={1,2,3,4,5,6,7,8,9,10};

we perform some encryption:

pic now equals {10,5,8,2,4,9,7,6,1,3};

generate a java source file:

class PicData

{

byte[] pic ={10,5,8,2,4,9,7,6,1,3};

static byte[] getPic()

{

return pic;

}

}

compile the source and then in your applet:

byte[] pic=decrypt(PicData.getPic());

where decyrpt() decrypts the encrypted byte array back to a usable form.

If the content is pictures then all the user has to do is perform a screen capture to avoid this scheme.

you probably would want to perform some obsufication(sic) of your applet so a determined user could not de-compile your applet's byte code.

klana001a at 2007-7-14 20:16:46 > top of Java-index,Other Topics,Java Game Development...