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 7615539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:40:03+00:00 2026-05-31T02:40:03+00:00

Java integrates nicely with the user’s desktop OS through JNLP. Not only does my

  • 0

Java integrates nicely with the user’s desktop OS through JNLP.
Not only does my software show up as a desktop icon, but it is listed as an installed program in the control panel (Windows 7). I was also able to get the JNLP file to auto-configure file association. Now if the user double-clicks a file saved by my program (a pxml file), the program launches. JNLP makes this excellent desktop integration happen smoothly through the web launch.
One issue remains: How do I get my program to load the data file that the user double-clicks? The pxml file is given the same icon as my program, and JNLP created the file association, so windows knows to launch my software when the user tries to open the pxml file. But how does my program know to OPEN that file when it starts?

Below is part of the JNLP file for reference, taken from Proctinator.com

<jnlp  spec="6.0+" codebase="http://proctinator.com/dist" >
  <information>
    <title>The Proctinator</title>
    <vendor>Smart Software Solutions, INC.</vendor>
    <homepage href="http://proctinator.com"/>
    <description kind="short">The Proctinator exam scheduling software</description>
    <icon kind="splash" href="splashScreen.jpg" />
    <icon kind="shortcut" href="bigP.jpg" />
    <offline-allowed/> 
    <association extensions="pxml" mime-type="application/pxml"/>
    <shortcut online="false">
      <desktop/>
    </shortcut>
  </information>
  <resources>    <j2se version="1.6+"/> ...  </resources>
<application-desc main-class="thornworks.proctor.GUI"/>

  • 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-05-31T02:40:05+00:00Added an answer on May 31, 2026 at 2:40 am

    To open an associated file with a Java Web Start launch, use the second element of the parameter array passed to main(String[] args). The first element will be “-open” when you launch the application by double-clicking a file and args[1] stores the file path of the file we want to open on startup. This feature really makes the Java app feel like a native desktop application.

    I couldn’t find this in the JNLP documentation.

    Here is a sample main method that implements this feature. FileFunction is a class with static methods for application file I/O.

    public static void main(String[] args) {
        GUI win = new GUI(null);
        if(args.length==2) {
            win = new GUI(null);
            StringBuilder params = new StringBuilder();
            for(String s : args) {
                params.append(s);
                params.append("\n");
            }
            JOptionPane.showMessageDialog(null, params);
            try {
                FileFunction.loadList(new FileInputStream(new File(args[1])));
            }
            catch(IOException ioe) {
                FileFunction.showFileError(ioe);
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a desktop database application. But the interface is not rich. So
I'm a contributor to a Java Open Source project which integrates with Hibernate. I'm
I'm experience with Java, but I have to integrate a java library into a
I've been trying to integrate deploying java .war 's in GlassFish V3 through Maven.
Consider the requirements for embedding help in a Java desktop application (or applet): Single
I normally use Java development and the Google Eclipse plugin, which integrates GoogleAppEngine deploy
We have a site which integrates Java web apps under Tomcat with ASP pages,
I'm looking at creating a decentralized role-management system which integrates with Java EE roles.
I am working in a Java EE project that integrates with SAP system, and
I've used DJ Java Decompiler , which has a handy GUI, but it seems

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.