Den 05.06.2011 00:11, skrev Andrei Pozolotin:
*Edvin:
*
1) re: "Desktop.getDesktop().browse()"
does not work on linux, mac:
Exception in thread "main" java.lang.UnsupportedOperationException:
Desktop API is not supported on the current platform
at java.awt.Desktop.getDesktop(Desktop.java:126)
at bench.browse.TestBrowse.main(TestBrowse.java:13)
use instead:
<dependency>
<groupId>net.sourceforge</groupId>
<artifactId>browserlauncher</artifactId>
<version>1.3.0</version>
</dependency>
Cool, didn't know about this one. You could also do if
(!Desktop.isDesktopSupported()) {
// Start via Runtime.exec instead, check System.getProperty("os.name")
to see what you are dealing with.
}
2) eclipse uses embedded external system browser in a swt frame; I
wonder if you know this exists for awt?
Yeah, I've used the SWT Browser in some projects, it's quite good, and
supports either the default browser on all platforms, or Firefox on all
platforms via XULRunner. For AWT you have commercial alternatives like
http://www.webrenderer.com/ for example. The performance varies a bit
from platform to platform, especially with JavaScript. In any case, you
can't embed these easily in a Pivot application, so you end up opening
them in a separate Window anyway, so again you're better of with the
default browser on the platform.
3) are your apps in public domain? can I take a look please? :-)
This particular app is not open source, and under development (I'm
re-implementing a system first built on Eclipse RCP, later moved to
NetBeans RCP, and now I've started re-implementing it in Pivot. Below
you'll find a link to a small screencast showing first a webpage written
in this CMS (Tornado CMS), and then showing the Pivot app used for
administering it. It shows a forked version of jEdit that I added my
favorite functions from IntelliJ IDEA to, used to edit Groovy
controllers in the CMS, and the TinyMCE integration I talked about.
Sorry about the incoherent speech and bad sound in the screencast, it's
almost 01:30 in the night, and I just came back from Jerry Seinfeldt
live - I'm super tired, hope I didn't make too many stupid mistakes :)
Here goes: http://www.screenr.com/S3Ts
I'd be happy to share code or give pointers if anyone is interested :)
-- Edvin