Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Migrating Java Applet

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are currently using a Java applet in our web application to connect the document scanner and then scan and upload documents to server. Since applet is not supported by modern browsers (Chrome, Firefox, Edge) there is an  need to migrate to some other method which is supported by these browsers. How we can migrate this applet to some other technology and then deploy it with Java Web Start. We have to remove the dependency on the Applet class and convert it completely to application's main class. Advantage is that users can launch a Java Web Start application independent of a Web browser. Kindly help.

PFA screenshot of the scanning or import module. This is the java applet.

There are four tabs, where
1. Select Scanner
      Retrieves the list of scanner driver to be selected for scanning
2. Compression Setting
      Will show the different compression setting can be done for scanning
3. Batch Setting
       This is used to specify the default folder for scanning the documents(This can be ignored for now)
4. Viewer
      - Image files can be imported and viewed
      - Non Image can be inserted and only its type will be showed on the screen
      - Documents can be scanned.

All the documents scanned or imported will be stored in the local batch and the same will be displayed as shown in the attachment.  If the image imported is the tiff, then there will be another dropdown showing the number of pages in the multipage tiff. This is circled in the  screenshot.
[Thumbnail for scanDoc.JPG]
Applet screenshot
Saloon Keeper
Posts: 22248
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Debashis!

There's really not that much difference in code between a stand-alone app and an applet. Main difference, as you noted, is that you no longer derive from the Applet class and instead have a main class.

Secondary differences are mostly minor things like how you feed parameters to the app (command-line instead of HTML tags).

You can use Swing, AWT, SWT or any other GUI toolkit in an app and the code should be virtually identical to applet GUI code. Perhaps the main difference there would be if you were originally using external HTML for some of the framing components, since there's no longer going to be a web page and that means all of the GUI elements must be provided by the app itself.

And, of course, you have to build the top-level window with your selected GUI toolkit, since you don't have the Applet class to supply one for you!
Posts: 508
Notepad Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ Debashis Bag

Here is some notes on how I built a small Java Swing application and deployed it on a Apache Tomcat webserver. The Swing application is launched from the web browser and is served from the web server using JavaWebStart.

Here is the post Java WebStart used to Deploy a Java Application at . Also, note the web site's quiz app is launched using the JavaWebStart. The app itself is Swing application and I didn't do any modifications to the app to deploy using JavaWebStart technology.

I am not familiar with Java Applets and I don't have anything to say related.
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Migrating provides the ability to target to a specific Java Runtime Environment version or a specific version range. Java Web Start technology supports multiple, simultaneous versions of the Java Standard Edition platform. Specific applications can request specific Java versions without conflicting with the different needs of other applications.
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic