• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Migrating Java Applet

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
scanDoc.JPG
[Thumbnail for scanDoc.JPG]
Applet screenshot
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Rancher
Posts: 517
15
Notepad Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 http://www.javaquizplayer.com . 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Heroic work plunger man. Please allow me to introduce you to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic