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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:14:05+00:00 2026-06-05T21:14:05+00:00

I have a requirement of passing command line parameters when mounting .dmg on MAC

  • 0

I have a requirement of passing command line parameters when mounting .dmg on MAC for this I have used JNLP which is dynamically composed using JSP with response content-type as application/x-java-jnlp-file. The content of JSP is as following:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://10.40.42.134:8080/TestJNLP/">
 <information>
    <title>jnlp.JSP</title>
    <vendor>Sun Microsystems, Inc.</vendor>
 </information>
 <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="lib/faren2.jar" main="true" />
 </resources>
 <application-desc name="Dynamic Tree Demo Application" main-class="org.Test" width="300" height="300">
    <argument><%=request.getParameter("arg1")%></argument>  
    <argument><%=request.getParameter("arg2")%></argument> 
 </application-desc>
 <security>
    <all-permissions/>
 </security>
</jnlp>

JNLP is correctly invoked with the parameters I pass.

Now there are two problems moving further:

First, After triggering JNLP my main-class invokes saveFileDialog from FileSaveService for saving the .dmg on user system but JNLP Client (Save Dialog which open on MAC) is ignoring the name and extensions which I am passing while invoking the method.
How can we make the JNLP Client to honor the name and extension I am passing?

Second, How can I know the path where user has saved the .dmg so that I can mount it programatically? This is very critical knowing the path where user has saved the file.

  • 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-06-05T21:14:07+00:00Added an answer on June 5, 2026 at 9:14 pm

    I do not think this is possible with FileSaveService.

    The path and extension arguments to saveFileDialog are only hints. The implementation is free to ignore them.

    FileContents.getName() will tell you only the name, not the directory. This is by design. JNLP apps that depend on FileSaveService are considered untrusted, and paths are potentially a privacy issue. If I choose to save the DMG file in a directory called C:\Users\S_Rushdie\My Documents\Porn I may not want your program to include that in a log that is later uploaded to your server.

    If you need greater control, I think you will need to sign your app, grant it <all-permission/> and use a JFileChooser and FileOutputStream instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have requirement like, suppose I have a 'property' table which has 'ListingKey' field
I have a requirement to display dynamically generated word document on the server in
I have following requirement, I have C#/.Net console application, which refers to 'System.Data.Sqlite.dll' 'System.Data.Sqlite.dll'
We have a command line exe that takes input from a text file and
I have a feeling this should be a common requirement, but I can't work
I have requirement of specifying web part connections in onet.xml. So when site is
I have requirement as following like showing ABPeoplePickerNavigationController in tabbar based application. I researched
I have requirement to get Facebook friends list with their images. How can I
In our project we have requirement that, after receiving sms message from third party
I have a requirement where I ask user for confirmation and also display messages.

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.