Results 1 to 4 of 4
  1. #1
    Revenna's Avatar
    Revenna is offline Member
    Join Date
    May 2010
    Location
    West Virginia
    Posts
    8
    Rep Power
    0

    Default Java/OS File Handling

    I've just started building graphical applications with Java in the last month and I've been trying all sorts of interesting things. My latest project is a very simple, lightweight text editor(see attached).
    What I'd like to do, is to be able to click on a text file in the operating system's shell, and have my little text editor open it. Is there a way to handle things like that in Java?
    Attached Files Attached Files

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Basically what OS does is associate the extension with relevant applications. Simply that's what we do in Windows, by changing the Open with on it's properties.

  3. #3
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    As said above it's a os specific operation, but probably this can be done from java too as per this article

    Understanding JDIC File-Type Associations

    however this is new for me too.
    Swastik

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Regarding File Handling
    By ravjot28 in forum New To Java
    Replies: 1
    Last Post: 01-20-2010, 09:15 PM
  2. file handling problem
    By gcampton in forum Eclipse
    Replies: 19
    Last Post: 01-05-2010, 01:18 PM
  3. handling WAV file
    By zellazode in forum New To Java
    Replies: 1
    Last Post: 09-08-2009, 03:46 PM
  4. Problem in File Handling in Java
    By getbiplab in forum New To Java
    Replies: 6
    Last Post: 03-31-2008, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •