Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8916323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:12:56+00:00 2026-06-15T05:12:56+00:00

I wrote a signed applet which can receive file and write it to local

  • 0

I wrote a signed applet which can receive file and write it to local machine file directory. I work on windows 7 with NetBeans. In the Appletviewer all runs correctly. But when I run the applet in context with my webpages in a web browser, the applet can create a file in a local directory, but I can’t use the copyFile() method from apache common.io. I can write into the file created using bufferedWriter(), but not using fileWriter. I need to transcode the file from .wav to .mp3 using the Encoder from the Java library, but it does not work in the browser. (I tried users home folder and other folders, but the result is the same.)

Here is the code of my attempt to implement file copying. No exception is thrown, but the file is not copied either.

 try {
   FileUtils.copyFile(source, target);
 } catch(IOException e){
   jLabel4.setText("Error: " + e.getMessage());    
 }

i can catch exceptions so here is text from my Java console when i push the button which should do copy :

 try { FileUtils.copyFile(fl1, fl2); } catch (IOException ex) { ex.printStackTrace(); jLabel4.setText("Error: " + ex.getMessage()); }

here is my java console text:

basic: Told clients applet is started
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar, version: null]
network: Connecting http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar with proxy=DIRECT
network: Connecting http://localhost:8084/ with proxy=DIRECT
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar, version: null]
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar, version: null]
network: Connecting http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar with proxy=DIRECT
network: Connecting http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar with proxy=DIRECT
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar, version: null]
network: Connecting http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar with proxy=DIRECT
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar, version: null]
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar, version: null]
network: Connecting http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar with proxy=DIRECT
network: Connecting http://localhost:8084/Rozhlas_jsf/lib/commons-io-2.4.jar with proxy=DIRECT
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/, version: null]
network: Cache entry not found [url: http://localhost:8084/Rozhlas_jsf/org/apache/commons/io/FileUtils.class, version: null]
network: Connecting http://localhost:8084/Rozhlas_jsf/org/apache/commons/io/FileUtils.class with proxy=DIRECT
Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
    at SoundApplet.SoundApplet.jButton2ActionPerformed(SoundApplet.java:480)
    at SoundApplet.SoundApplet.access$800(SoundApplet.java:42)
    at SoundApplet.SoundApplet$11.actionPerformed(SoundApplet.java:304)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 38 more

it seems that is something bad with imported libraries. i added jars via right click on librariesfolder and add jar. I atach a image of my projects folder, may it help you understand my problem but it can be aloowed me it because i have already lower count of comments then 10 .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:13:00+00:00Added an answer on June 15, 2026 at 5:13 am

    PROBLEM SOLVED!!

    I have a little tutorial for people which will be so hopeless like me

    1. in properties/packing options of your webproject add your applet project. it cause that .jar file from your applet will be compiled and copied into your build/web folder of you webroject automaticly when you run webproject.

    2. if you want to use external libs for your APplet you must add their .jars into build/web folder of you webroject. Now, when you click run Webproject your applet is automaticly compiled into build/web folder of you webroject where are your external libs .jars too. (here be aware with Clean your project because it cause that your whole build folder is deleted and is builded again but Without your external libs .jars !! when it occurs you must copy .jars here again)

    3. Now you must tell in html page what it neccesary do for load applet so you use this tag

      <applet codebase="http://localhost:8084/<nameOfyourWebProject>" code="<package>.<appletFileName>" archive="Applet.jar, <EXternalLibName1>.jar, <EXternalLibName2>.jar... " width="500" height="500"></applet>

    codebase is usualy your build/web folder (here is index.html too), so you say by this that Java will search jars from here. Code is path to your starting applet class. Archive tells which jars will be loaded so you need load jar of your applet and external libs jars too. You can specify how many jars you want… Thats all, now you can run your Web project and enjoy your loaded applet with external libs jars. BUT if you wanted to do something what unsigned applet cant(what applet can and cant) you must sign your applet.jar(that is possible via project properties) and you must sign all used jars for your applet(that is for testing posible via keytool and jarsign utulity distributed with java)

    I spent a lot of time to get to know this informations and succesfuly run my project so i hope to this little tutorial help you stop waste time 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a signed applet and I want to write out dll files which
Is it possible for a signed Java Applet or Web Start app to write
I have applet embedded in http page. Applet is signed (as all jars which
I wrote a java applet and self signed it. When I run it in
I have a Java Applet which is digitally signed. I need to be able
I have developed an signed applet that is used to upload a file in
I am trying to build a java applet which downloads a file to the
Error while creating and writing a file on client machine using applet, even i
I need to read and write signed and unsigned integers with a SeekableByteChannel in
I wrote a simple XML file and a DTD file including an entity, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.