如何显示“属性窗口"java中本机文件系统的文件/文件夹 [英] How to show "properties window" of native file system's file/folder in java

查看:36
本文介绍了如何显示“属性窗口"java中本机文件系统的文件/文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 java 1.6,我的 java 桌面应用程序在三个操作系统 Windows、Linux 和 MAC 上运行.使用我的应用程序,用户可以在 JTree 中列出本机文件系统的文件和文件夹.

I am using java 1.6 and my java desktop application run on three O.S Windows, Linux and MAC. Using my application, user can list files and folder of native file system in JTree.

我的要求是用户可以根据本机文件系统查看文件/文件夹的属性窗口".假设如果用户在 Window 上运行我的 Java 桌面应用程序,那么如果用户右键单击任何文件/文件夹并选择属性",则可以打开此窗口 -

My requirement is user can able view a "property window" of file/folder according to native file system. Suppose if user in running my java desktop application on Window then if user right click on any file/folder and select "Properties" then this window can open -

如果我们无法使用 java 1.6 显示本机文件系统的文件/文件夹属性文件,那么有没有办法获取所有这些文件/文件夹属性?

If in-case we can not show native file system's file/folder properties file using java 1.6 then is there any way to get all these file/folder properties?

推荐答案

这里是如何:http://docs.oracle.com/javase/tutorial/essential/io/fileAttr.html

这篇关于如何显示“属性窗口"java中本机文件系统的文件/文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆