PDA

View Full Version : Spawning Google Earth from Java



opperhaus
08-12-2005, 01:20 PM
I'm trying to spawn GE from a Java app that generates a kml file with custom annotations. The kml file is good as I can do a File->Open and see the Placemarks, etc. When doing a Runtime.exec of a Windows batch file that starts GE, GE opens and gives me an "Error opening file: Unsupported Protocol " popup.
Running th batch file from a command prompt work just fine.

Any ideas?

dan
08-12-2005, 01:23 PM
can u display your batch-file?

opperhaus
08-12-2005, 01:26 PM
File contents below... Works fine from the command line...

@echo off

start "GoogleEarth" "c:\Program Files\Google\Google Earth Plus\GoogleEarth.exe" "c:\Documents and Settings\User\Projects\project\data\data.kml"

opperhaus
08-12-2005, 02:12 PM
Fixed it..... Thanks anyway.

ehrens
10-24-2005, 01:38 PM
I tried to launch GE from the command line with

start "GoogleEarth" "c:\Program Files\Google\Google Earth Plus\GoogleEarth.exe" "c:\Documents and Settings\User\Projects\project\data\data.kml"

as specified in the previous post, but I get an error that states....

Fetch of data.kml failed. Unsupported Protocol.


Does anybody know what that means?

araT
10-24-2005, 01:54 PM
ehrens; Its because you dont have a .kml file at c:\Documents and Settings\User\Projects\project\data\data.kml :p I presume that is where opperhaus has his generator dropping the .kml file :)

T.

ehrens
10-24-2005, 02:06 PM
Actually, you're right, but that's not the problem. I posted the wrong path to the file....mine is actually just at d:/GoogleEarth/test.kml. And so, my command is updated as such...


start "GoogleEarth" "C:\Documents and Settings\axe130\Application Data\Google\Google Earth\GoogleEarth.exe" "d:\GoogleEarth\test.kml"


Any other ideas?