File öffnen

Status
Nicht offen für weitere Antworten.
G

Gast2

Gast
Hallo,

Gibt es von eclipse einen Mechanismus eine Datei mit dem Standardprogramm zu öffnen ???

Grüße
 
G

Gast2

Gast
Hallo,

ich habe eine methode
Code:
  public static void showFile(File file)
  {
    Program.launch(file.getAbsolutePath());
  }

wenn ich ein file öffne (Excel) wird es problemlos angezeigt. wenn excel weiter hin offen ist und ich ein 2tes file so öffnen möchte passiert einfach gar nichts...
Mit PDF funktinioniert das mehrfach öffnen ohne Probleme... Weiß jemand woran das liegen kann?? An Excel selber vielleicht???
 
G

Gast2

Gast
könnte des ein problem sein in welchem thread ich den Programm.launch aufruf mache????

Code:
  public void run(final IProgressMonitor monitor) throws InterruptedException
  {
    try
    {
      monitor.beginTask(EXPORT_JOB, IProgressMonitor.UNKNOWN);

      if (mType.equals(DocumentType.XLS))
      {
        mExportFile = TableExport.exportExcel();
      }
      ....
      TableExport.showFile(mExportFile);
    }

....
}
 
G

Gast2

Gast
Code:
        Display.getDefault().syncExec(new Runnable()
        {

          public void run()
          {
            TableExport.showFile(mExportFile);
          }
        });

wenn ich das miteinbau klappt es wirklich besser versteh ich zwar nicht ganz aber gut^^
 
Status
Nicht offen für weitere Antworten.

Ähnliche Java Themen

Neue Themen


Oben