Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Desktop class problem

843807Aug 11 2010 — edited Aug 12 2010
The code below does nothing. No file opened, no exception thrown, no output.
What can I do to discover the problem?
It does indeed execute the desktop.open(file) line.
Using JDK 1.16.0_81
File file = new File(pathAndFileString); // an existing text file
if (Desktop.isDesktopSupported()) {
	Desktop desktop = Desktop.getDesktop();
	if (desktop.isSupported(Desktop.Action.OPEN )) {
		try {
			desktop.open(file);
		} catch (IOException e1) {
			e1.printStackTrace();
		}
	}
	else {
		System.out.println("Desktop.Action.OPEN not supported");
	}
}
else {
	System.out.println("Desktop not supported");
}

Comments

Martien van den Akker

What do you mean exactly with 'hold'? Do you want to keep it in your worklist of the OOTB BPM Workspace?

I'm not sure, but I don't think you can.

I see three options:

  • In your BPM process put a FYI notification task with the exact same contents right after the regular task. But it  will be removed when one clicks on it. So you would need to do a bit of looping and time out processing.
  • Create an own worklist, where you also add those completed tasks that are completed/updated within the last our.
  • Create an enhancement request at support.oracle.com (but I would not rely on a quick resolution.)

Kind regards,
Martien

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 9 2010
Added on Aug 11 2010
8 comments
3,625 views