Base64 or sun.misc

hello i heard that applet cannot use sun.misc package to encode and decode strings... can anyone sugest me encoding and decoding algorithms to use in my appletsthanks in advancebye
[208 byte] By [avaj_rocksa] at [2007-10-1 10:34:30]
# 1

I used the org.w3c.tools.codec.Base64Decoder.

http://jigsaw.w3.org/Distrib/jigsaw_2.2.4.zip

After opeining the zip file you'll find the .java files ini jigsaw classes org w3c tools codec.

Compile and jar these files and include that jar file in you archive tag:

<param name="archive" value="myApplet.jar;base64.jar" />

harmmeijera at 2007-7-10 3:01:58 > top of Java-index,Security,Signed Applets...
# 2
hey thanhz for the response.......one samll doubt.....i extracted the files......could u plz elaborate on hoe to jar the files n put them in my class path.....sory for troubling u with my ignorance..........merci again
avaj_rocksa at 2007-7-10 3:01:58 > top of Java-index,Security,Signed Applets...
# 3

It's packaged so you should put it in the right folder structure.

Create a folder called temp

Create the following folders in temp

org\w3c\tools\codec (w3c in org and tools in w3c codec in tools)

Extract the files from the codec folder in the codec folder you created

Execute the following commands in your temp directory

C:\temp>javac .\org\w3c\tools\codec\*.java

C:\temp>jar cf base64.jar .\org\w3c\tools\codec\*.class

harmmeijera at 2007-7-10 3:01:58 > top of Java-index,Security,Signed Applets...
# 4

hey harmmeije

thanks for the response........i did as u said n i get this error

C:\Documents and Settings\Karthik\IdeaProjects\des\src\EncryptDecryptDes.java

Error: line (67) cannot access org.w3c.tools.codec.Base64Coder

bad class file: C:\Documents and Settings\Karthik\Desktop\Base64Coder.jar(org/w3c/tools/codec/Base64Coder.class)

class file contains wrong class: Base64Coder

Please remove or make sure it appears in the correct subdirectory of the classpath.

am sure its coz i must have put somethin in the wrong int the wrong place....

help me again plzzzzzz

avaj_rocksa at 2007-7-10 3:01:58 > top of Java-index,Security,Signed Applets...
# 5

re read my previous post and do the things discribed there:

"It's packaged so you should put it in the right folder structure."

When compiling your .java file set the -classpath to the the jar file you made

for example

C:\temp>javac -classpath base64.jar myAppletFile.java

harmmeijera at 2007-7-10 3:01:58 > top of Java-index,Security,Signed Applets...