Click here to Skip to main content
15,064,072 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi, I am a java programmer and I have 1 and a half years of experience. Could anyone assist me with the following?

I need to find a component that can run in both Windows, Mac OS and Linux that can do the following:
Compress a file then encrypt the compressed file. The application must compress a .dat file to a .zip file that is password protected.

A sample code would help me too. Please...
Updated 10-Apr-12 23:11pm

With one and a half years' experience it's about time you learned how to do this[^].
Tumelo123 11-Apr-12 5:38am
Thanks. I will check out the link. It is time indeed to learn how to do this. I will let you know when I am done.
Espen Harlinn 11-Apr-12 7:39am
Fair enough :-D
Tumelo123 17-Apr-12 10:01am
Thanks for your help. It worked:)
Java SDK provides classes both for compression (see for instance Class Deflater[^]) and encryption (see JavaTM Cryptography Extension (JCE)[^]).
Tumelo123 11-Apr-12 5:39am
Thank you.
CPallini 11-Apr-12 5:42am
You are welcome.
Tumelo123 11-Apr-12 5:44am
I will code it and give you feedback.
Espen Harlinn 11-Apr-12 7:40am
Nice reply :-D
CPallini 11-Apr-12 8:02am
Thank you.
Tumelo123 17-Apr-12 10:02am
hahahaha...Thanks for helping me out. It works:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900