1

i want from java desktop application open browser with some url ("http:www.google.com") for example. But i don't want that this url will be visible in browser. Is it possible to hide line with url somehow?

i found how to open browser: http://www.mkyong.com/java/open-browser-in-java-windows-or-linux/

but not how to hide line with url. Is this possible?

EDIT:

i get answer that is possible from JS: How to hide address bar in Firefox using javascript window.open

and i also open now browser like

...
import java.awt.Desktop;
...
Desktop desktop = Desktop.getDesktop();
desktop.browse(new URI(''a_url"));
...

can i integrate JS in it that will open popup without address bar?

Community
  • 1
  • 1
senzacionale
  • 20,448
  • 67
  • 204
  • 316
  • This will not answer your question but why not use [Desktop.browse()](http://docs.oracle.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)) to open the system's default browser with the specified url. And any specific reason why you don't want the `url` to be visible.? – RanRag Apr 12 '12 at 05:53
  • @ senzacionale : You may have to write a browser using existing rendering engine. Note that showing the bar is better for security. The ability to hide address bar(url line) was removed from mozilla/thuderbird for this reason. – Jayan Apr 12 '12 at 05:58
  • @RanRag thank you for idea. Yes in url we show passwd and we want to hide it. – senzacionale Apr 12 '12 at 06:00
  • 1
    You are showing `password` in the url that's a bad idea. If you are working on something like a login page where user enters his\her details you should use `HTTP POST` method to pass the data. – RanRag Apr 12 '12 at 06:02
  • we are using reporting system so we can not change logic of it. We want to hide url when calling browser url instead. – senzacionale Apr 12 '12 at 06:10
  • @senzacionale: Sorry in that case I cannot be of more help :( – RanRag Apr 12 '12 at 06:38
  • 1
    Hiding the URL doesn't provide you any real security. – serg10 Apr 12 '12 at 06:47
  • @seg10 i know but it is better then nothig. is this even possible to hide url? Maybe some popup...? – senzacionale Apr 12 '12 at 06:53
  • @senzacionale: May be this question can help [How to hide address bar in Firefox using javascript window.open](http://stackoverflow.com/q/5664992/776084) or may be something along the same line. – RanRag Apr 12 '12 at 06:58
  • @senzacionale: You can execute javascript code from java take a look at project [Rhino](http://www.mozilla.org/rhino/). – RanRag Apr 13 '12 at 01:33

0 Answers0