• 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 ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

how to launch a command that requires elevated privileges

Ranch Hand
Posts: 334
Netbeans IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm just starting a cross-platform installer project. I suppose a bigger question is why do it as a Java app rather than a native installer. I'll discuss that after my question.

The concept is a javaws app that scans the system for the needed apps, libraries and directories needed, and then creates, installs or downloads what is needed.

My problem is that if a prerequisite is missing that has an installer, I'd like to launch a program that asks for the required password and runs the installer. I've seen it done but don't know how to do it.

Why my own installer?

  • I'm not sure that it's the only way to get this done but I can't figure out how to do what I need with macports, msi, deb and rpm installers
  • My app is written in Matlab, and installing it is just a tar or unzip
  • There may be multiple versions of Matlab and the user has to choose which one to use. Matlab is not installed by a package manager and so require a package is not an option
  • There are environment variables that may need to be set, and a good GUI is easier than package options as far as I can tell
  • It needs to run on Mac, a few flavors of Linux, and Windows and while I know how to almost everything I need in Java, I know almost nothing about the native package managers

  • I'm not against doing this with native package managers. I've been reading up on them but keep running into the need for non-standard kludges (I think) to do this kind of stuff.

    Any discussion of the problems would be greatly appreciated.

    The knights of nee want a shrubbery. And a tiny ad:
    the value of filler advertising in 2021
      Bookmark Topic Watch Topic
    • New Topic