2012-04-01 57 views
0

的情况:如何一次打开多个文件的可执行

  • Java 6中,Windows XP中,Eclipse的
  • 我有一个.exe做出来OUF一个可执行的.jar。
  • 这是一个使用GUI的应用程序。

该程序应该读取 - 或稍后编写 - 图像元数据(jpeg ...)。 如果程序打开,您可以使用filechooser一次加载一个或多个文件。

到目前为止,我可以在我的文件系统(窗口)中选择一个(图像)文件,单击[打开方式...]并选择我的程序 - 打开选定的.exe文件 - 文件。

我想什么来实现:选择多个文件 - 通过按Ctrl +一个例如整个文件夹,并同时打开所有图像。

在我的主要方法中,String [] args只包含一个元素,不管有多少选择。

主类的代码:

public class Starter 
{ 
    public static void main(String[] args) 
    { 
     Exif e = new Exif("Exif ... "); 

     //try{ Thread.sleep(1000); }catch(Exception ex){} 

     e.init(); 

     e.setSize(1024,700); 
     e.setSize(1024,600); 

     // The array is handled by a gui-class which reads the Strings from the array 
     // and opens the referenced files one by one ... 
     // Like : 
     //   for(String filename : args 
     //   { open(filename); } 

     e.open(args); 
    } 
} 
+1

告诉我们代码 – Kennet 2012-04-01 14:39:35

回答

0

你尝试选择你想要的文件,并拖动它们对EXE的顶部?

+0

并在今年的天才奖去... ...维克!我甚至没有想到要这样做。谢谢! – user1178185 2012-04-02 07:50:09

相关问题