This week's book giveaway is in the Functional programming forum.
We're giving away four copies of A Functional Approach to Java: Augmenting Object-Oriented Java Code with Functional Principles and have Ben Weidig on-line!
See this thread for details.
  • 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
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Double Click Icon on Windows Desktop

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created a Java applet which uses the Apache Commons jar file. On Windows, I can only launch applet by opening a Command Prompt window, going into the directory of the jar files, and running a bat file I wrote.

I have a subdirectory called OracleReports which contains the files: commons-net-1.2.2.jar, OracleReports.jar, and OracleReports.bat.

This is the contents of OracleReports.bat:
C:\WINNT\system32\java.exe -classpath .;commons-net-1.2.2.jar;OracleReports.jar OracleReports

My management would like our operators to monitor the Oracle Reports; however, the operators are very computer illiterate. I want to be able to have an icon on the Windows Desktop, so the operators can double-click it to launch this OracleReports Java applet. Someone also told me that an applet can be on a web server which the operators just go to a URL. With multiple JAR files, I do not know the syntax of the HTML code.

I would appreciate it someone can share their expertise on how to launch a Java applet by double clicking an icon on the Windows Desktop considering there are two JAR files.

Thanks,

Mike
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Couldn't you just copy the bat file to desktop?

P.
 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do they launch a Java applet through command line?

Do they start ApppletViewer? or an HTML page?


or do you mean java application? If it's java application you can just create a shortcut on the desktop
 
Mike Cutter
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I figured it out. Since I put OracleReports in the subdirectory C:\OracleReports. I need to put to change the batch file to:

C:\WINDOWS\system32\java.exe -classpath .;C:\OracleReports;C:\OracleReports\commons-net-1.2.2.jar;C:\OracleReports\OracleReports.jar OracleReports

I have to put the full path names for everything in order for the applet icon to launch from the Windows Desktop.
 
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic