0

How I can upload a file from desktop to Java applet application?

  1. Create upload button.
  2. Browse thought the desktop and choose the file.
  3. Then create a link that enables the user to click on and open the chosen file.
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
R.Y.H
  • 73
  • 3
  • 10

1 Answers1

0
  1. use swing for example, just a button
  2. use JFileChooser
  3. It is not clear: do you want a link where ? (if it is on the web, you have to transmit it, or it can be on the applet: why not a button ?), and does it be called another time ?

General question: what is the purpose of this file ?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • I want to be able to open the file from the application. I intend to later embed the application in web. – R.Y.H Dec 12 '15 at 11:16
  • @R.Y.H, it should be more clear, if the client side leaves alone, or if there is some process with a server. You'll have to solve securities problem to (autorization for applet). My advice: dont use an applet. With HTML5 / javascript, you can do a lot of things, event on the user PC. – guillaume girod-vitouchkina Dec 12 '15 at 11:23