On Monday, December 8, 2014 11:44:10 AM UTC-5, daveray wrote:
>
> Nope. It barely renders HTML3. JavaFX, I think, has a real embedded 
> browser component.
>

That's what I meant.

And, of course, it's always easy to just launch a browser: 
> http://docs.oracle.com/javase/6/docs/api/java/awt/Desktop.html#browse%28java.net.URI%29
>

That's platform-neutral? The main way I'm familiar with for launching an 
external process with ProcessBuilder sure isn't. This will launch the 
user's default browser to a specified site in Windows:

(.start (ProcessBuilder. ["cmd" "/c" "\"start http://www.example.com\"";])) 

and I haven't the foggiest how to do something analogous with any of the 
popular Unix WMs, though spawning a console Lynx process with 
ProcessBuilder will usually work if the site only needs to display text, 
and the resulting Process's input and output streams can be manipulated 
from inside Clojure, so you can even provide your own in-app terminal 
emulation wrapping the Lynx instance. Needless to say, though, Lynx isn't 
an option if you want to display Google Maps. :)

*checking*

Well, (.browse (java.awt.Desktop/getDesktop) (java.net.URI. 
"http://www.example.com";)) works on Windoze, which is all I can test on ATM.

Looks like this class can also be used to open documents with native file 
associations. I just got it to pop up a jpg in the Windows picture 
previewer. I wonder why they tucked this thing away in awt when it has 
nothing to do with implementing your own program GUI, instead of it being 
in java.lang right next to ProcessBuilder. And didn't mention it in the 
Java Tutorial back in the day when I was still new to the JVM and its class 
library.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to