Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

launch an application

 
aude tantot
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible through my code to make a HTML doc appear in the user browser?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, of course the obvious answer to that is yes. You are doing that right this second (check out the Location Bar).
The question is WHAT are you trying to accomplish, and from where.
Normally an Applet is embedded IN an HTML page, so apparently that is not what you are aking.
Any program can write out a file that has Strings in it that just happen to be HTML code. A java program can launch another program, say for instance a browser, and feed it a parameter, which just happens to be an HTML file, and that would cause the HTML doc to appear in the browser. But of course that would be a SEPARATE window and function from the java program / applet that invoked it.
It is possible to point a URL at an HTML file and "invoke" it that way also.

I am not really sure from your question WHAT it is that you are trying to accomplish.
 
aude tantot
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, i've an application which generate a HTML document. Iwould like this doc to be displayed after its creation.
 
Joel Cochran
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this partial answer will help... I do the same basic thing from an AS/400 to the users current browser. You need to execute a system command like so: "START urlpath/filename.html". From what I've been reading here at the Ranch, you can do stuff like this by executing a runTime() method, but I don't know the implementation details. If you create the file on the fly, then you know the path and name, so I would think that you would be able to build the appropriate String and send the String to the System Command.
Let us know when you have it ironed out!
------------------
I'm a soldier in the NetScape Wars...
Joel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic