且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我如何开始从Java在Linux,Mac和Windows .NET应用程序?

更新时间:2023-10-11 16:51:22

如果您已经.NET /单已经安装,您可以双击exe文件,它运行,那么你可以只使用 Desktop.open()

一样简单:

Desktop.getDesktop().open(file);

在这里看到更多的细节:在Java SE使用桌面API 6 击> 修改

我不得不启动我的Linux机器在那里我有一个单一的应用程序,这工作好了:

I had to boot my Linux box where I have a mono application and this worked just great:

class Launch { 
   public static void main( String ... arg ) { 
      new ProcessBuilder("/usr/bin/myapp").start();
   }
}

重复,工作好了!

Repeat, worked just great!