Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Using Helper Applications

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy folks. New user here, apparently with the same name as that other guy. Newish to Java programming, and I hope this is easy to solve.

I would like to present to the user a list of electronic resources in various formats, like PDF, HTML, Word, and URLs to external web pages, and when a link is clicked on, open it in the appropriate application, whether it be Acrobat, the default web browser, or whatever. I can store whatever information is required, like path and file type.

I'm hoping there's some simple resolution, a method like SomeoneElsesProblem(pathname). But I only know such a small fraction of all of the Java tools out there. I haven't started rolling any code yet because I just want to get an idea right now if this is going to be a sticking point. The rest of it would involve forms, text matching, stuff that I've done before.

 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesn't really sound like a Java solution.

Lookup System.exec()
it probably does what you want.
 
Marshal
Posts: 22394
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
java.awt.Desktop has a method called open which can start the default application for a file.
 
Marshal
Posts: 73738
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... and welcome to the Ranch
 
Greg Hansen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:java.awt.Desktop has a method called open which can start the default application for a file.



Oh, that looks like just what I need. That and browse. Looks as easy as double-clicking an icon. Thanks.

Sometimes the solution is out there if you just have the magic search term to find it.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic