File Explorer
-
I'm doing about File Explorer which similar to Windows Explorer in Windows . I don't know why Windows Explorer get "Extract here , Extract File" ... which have when install Winrar . I want popup menu at forder to do it . Any idea ?? sorry about my english !! :( .
-
I'm doing about File Explorer which similar to Windows Explorer in Windows . I don't know why Windows Explorer get "Extract here , Extract File" ... which have when install Winrar . I want popup menu at forder to do it . Any idea ?? sorry about my english !! :( .
-
write the functionality yourself. You don't need tools like winrar for this. this is how you can do it[^]
regards Torsten I never finish anyth...
I don't think that's what he's asking. I think his question is something like: I want to display a pop-up menu which will give the user a list of actions associated with a file type. For example, if the file is a RAR file, I want to display the options associated with Winrar. Think Windows Explorer, you right-click on a file and up pops a menu telling you what you can do with that file. I'm not sure how you do this from Java since finding the list of actions for a specific file type is OS-specific, and that is always where Java's "run anywhere" approach struggles. The Desktop API gives you some access to this, but it has a limited set of pre-defined actions available and I'm not sure how you add in other actions like zip or unzip (or even if you can). There was a project on the go at one time called JDIC which aimed to make OS-specific desktop integration a bit easier, but I haven't heard about that for a while. It was basically a series of wrappers around native calls for the main operating systems like Windows and Linux. It might be worth a look, though, if it is still around.
-
I don't think that's what he's asking. I think his question is something like: I want to display a pop-up menu which will give the user a list of actions associated with a file type. For example, if the file is a RAR file, I want to display the options associated with Winrar. Think Windows Explorer, you right-click on a file and up pops a menu telling you what you can do with that file. I'm not sure how you do this from Java since finding the list of actions for a specific file type is OS-specific, and that is always where Java's "run anywhere" approach struggles. The Desktop API gives you some access to this, but it has a limited set of pre-defined actions available and I'm not sure how you add in other actions like zip or unzip (or even if you can). There was a project on the go at one time called JDIC which aimed to make OS-specific desktop integration a bit easier, but I haven't heard about that for a while. It was basically a series of wrappers around native calls for the main operating systems like Windows and Linux. It might be worth a look, though, if it is still around.
Is this needed any more? compressed folder/files are nowadays opened by the file explorers. Other extensions should be thrown against the OS to open/execute it - you'll get the "don't know how" dialog if the file extension is not known.
regards Torsten I never finish anyth...
-
Is this needed any more? compressed folder/files are nowadays opened by the file explorers. Other extensions should be thrown against the OS to open/execute it - you'll get the "don't know how" dialog if the file extension is not known.
regards Torsten I never finish anyth...
I think the whole zip file, Winrar thing was just an example from the OP. If I read his post correctly, he's trying to build a Windows Explorer clone, that's his main interest here. The whole issue of how to compress or uncompress files is a bit of a red herring. It's more of a general question about file types and actions. The Java Desktop class allows you to Open, Print, Edit files with a bit more control than simply shelling out and trying to run the file. For example, you can test whether or not there is an Edit action associated with a file type as distinct from Open (think of *.cmd files on Windows: Open and Edit do different things). What it doesn't let you do is access non-standard options that other programs like Winrar may associate with specific file types like *.zip or *.rar, for example Extract Here as opposed to Extract. The NetBeans Platform includes an API that allows you to associate arbitrary actions with file types, but it is up to you (the programmer) to create the association, it is not derived from the underlying operating system.
-
I think the whole zip file, Winrar thing was just an example from the OP. If I read his post correctly, he's trying to build a Windows Explorer clone, that's his main interest here. The whole issue of how to compress or uncompress files is a bit of a red herring. It's more of a general question about file types and actions. The Java Desktop class allows you to Open, Print, Edit files with a bit more control than simply shelling out and trying to run the file. For example, you can test whether or not there is an Edit action associated with a file type as distinct from Open (think of *.cmd files on Windows: Open and Edit do different things). What it doesn't let you do is access non-standard options that other programs like Winrar may associate with specific file types like *.zip or *.rar, for example Extract Here as opposed to Extract. The NetBeans Platform includes an API that allows you to associate arbitrary actions with file types, but it is up to you (the programmer) to create the association, it is not derived from the underlying operating system.