AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Aprire Explorer

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian)
View previous topic :: View next topic  
Author Message
Alessandro
Guest





PostPosted: Sat Jun 19, 2004 5:25 pm    Post subject: Aprire Explorer Reply with quote



Per aprire explorer la seguente istruzione su XP.

Runtime.getRuntime().exec("cmd /c " + "c:/pippo.html");

funziona (in locale). In realtà non apre explorer ma il sistema
riconosce l'estenzione del file e lancia l'Explorer.

Come faccio a lanciare "veramente" explorer e a posizionarmi su un sito?

Impossibile?

Grazie molto.

Alessandro


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Back to top
Losten
Guest





PostPosted: Sun Jun 20, 2004 9:32 am    Post subject: Re: Aprire Explorer Reply with quote



Quote:

Come faccio a lanciare "veramente" explorer e a posizionarmi su un sito?

Impossibile?

Tanto vale che fai cosi'...
Runtime.getRuntime().exec("C:\Programmi\Internet Explorer\iexplore.exe
" + "www.sitocarino.it");

ovviamente trasforma la cosa in:
Runtime.getRuntime().exec(path_di_iexplorer +"iexplore.exe " + url);

non è detto che IE sia istallato su c: ed in "programmi"....
Non vorrei dire una cavolata ma mi sembra ci sia modo di recuperare il
navigatore predefinito.....

Saluti.
Losten



Back to top
Alessandro
Guest





PostPosted: Mon Jun 21, 2004 1:22 pm    Post subject: Re: Aprire Explorer Reply with quote



Quote:
ovviamente trasforma la cosa in:
Runtime.getRuntime().exec(path_di_iexplorer +"iexplore.exe " + url);

Ti ringrazio, nel fine settimana, (triste a dirsi mi sono interessato di
questo, visto
che non sono andato al mare).
La tua soluzione è la stessa che ho trovato su java.sun.com.
Il problema appunto è che bisogna andare 'a casaccio' per trovare il
path di Explorer, anche se
c'è sicuramente il modo (tramite JNI).
Buona giornata e grazie ancora.
Alessandro


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Back to top
agnul
Guest





PostPosted: Mon Jun 21, 2004 4:06 pm    Post subject: Re: Aprire Explorer Reply with quote

Alessandro wrote:

Quote:
Come faccio a lanciare "veramente" explorer e a posizionarmi su un sito?

Io ho provato a aprire una shell di dos (win2k) e dare il comando

start http://java.sun.com

e funziona a meraviglia. Quindi suppongo che con

....exec("start http://url") o ...exec("cmd /c start http://url")

tutto dovrebbe funzionare.

HTH.
--
agnul - [email]AgNULL (AT) yahoo (DOT) com[/email]
"Life sucks" [Marvin the android]

Back to top
marcodepe@tiscali.it
Guest





PostPosted: Fri Jun 25, 2004 6:56 pm    Post subject: Re: Aprire Explorer Reply with quote

Io lancerei dal java un .bat con dentro solo questa istruzione

start nomesito


D'altra parte mi aspetto che un browser predefinito esista

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.