Results 1 to 2 of 2
  1. #1
    Hello World is offline Member
    Join Date
    Mar 2010
    Posts
    2
    Rep Power
    0

    Default Creating a file "type"

    Hello I was wondering how you could make a unique file type (Example:.SGE) for your program and only your program. Thanks :)

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    i know there is a FileFilter interface that allows you to specify the conditions for which a file is matched by name, so that when you do a list directory for the files, then it will only show these files in the results. Swing has a similar mechanism. see also: JFileChooser: setFileFilter(FileFilter filter) : JFileChooser**javax.swing**Java by API

    Now if you meant an operating system association, such as in windows, where if there is a .SGE file on your desktop and double clicking this icon causes your java application to launch, i believe this is done somehow with setting file types for the open with. I don't even have windows, so am not sure how entirely to do that. but its not a Java / programming thing, but an operating system specific setup thing, if thats what you meant that is.

Similar Threads

  1. Replies: 6
    Last Post: 02-10-2011, 10:55 AM
  2. Creating a jpeg file: "no preview available"
    By ScottVal in forum Advanced Java
    Replies: 1
    Last Post: 10-24-2009, 04:31 AM
  3. Replies: 1
    Last Post: 05-20-2009, 09:46 PM
  4. Replies: 2
    Last Post: 01-24-2009, 07:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 08:35 AM

Posting Permissions

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