Question

I have written an applet that should compare files. It calculates a CRC32 checksum and then outputs files with the same checksum.

It runs great from appletviewer and as standalone app. So I have packed and signed it. However, when I am launching it in the browser, it does not work.

It launches good. The browser asks about permissions for this signature. It shows JFileChooser dialog, and I can select a target folder.

The problem is that it returns nothing. When it comes to file iteration or checksum calculations, it seems to crush quietly. (I have used apache.commons FileUtils for file iteration & checksum calculations)

It can open a .txt file and read its content. I have tested it in different browsers, different security settings, even on Linux.

I have tried to rewrite my code using "AccessController.doPrivileged" as this:

    @Override
public ArrayList<String> doInBackground() {

    return AccessController.doPrivileged(new PrivilegedAction<ArrayList<String>>() {
        public ArrayList<String> run() {...});

...and it still does nothing. What`s its problem?

Thanks in advance.

Was it helpful?

Solution

The problem was that apache.commons and Guava libraries was not working correctly in applet. After rewriting this code by hands its finaly working.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top