|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

06-17-2008, 09:52 AM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
How to open html page?
Hi Everybody,
As you can tell by the title, I am very new to Java.
I have a html page that I need to call from java.
i use Runtime.getRuntime().exec("C:/Program Files/Internet Explorer/iexplore.exe"+" help.html") ; //help.html is the required html file which is stored in the same folder.
But when i execute this code, browser is not able to open this page
Please Suggest me a suitable code for opening of html page
Thanks in advance..
|
|

06-17-2008, 10:47 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
Did you get any exceptions on your code. Seems that your attempt is fine.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-17-2008, 11:25 AM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
Reply
Hi eranga,
ya i got an exception there with error code=193.
but now i successfully solve my problem using following code:
Runtime.getRuntime().exec("cmd start help.html");
thanks for your concern..
hey Eranga, i have another problem regarding opening of exe.
i just want to open any exe(like notepad,msword) within the Frame, like Internal Frame.is it possible???
Please suggest..
Thanks in advance..
|
|

06-17-2008, 11:59 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
Any process is a Win32 application. As far as I know, we can't embedded such as process within a frame, I mean external component. Better to check in details, I don't have done it before.
This is your requirement, but I want to say is that in Java there is lots of alternative for such things. TextArea for Notepad and so. If you use Notepad application is specific to Windows.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

06-17-2008, 12:12 PM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
REply
Hi Eranga,
ya for notepad we can use TextArea instead.
but it wont serve my purpose..
but it is possible in VB so i thought it should be possible in Java too.
Lets see
i am working on this one..
|
|

06-17-2008, 12:13 PM
|
 |
Member
|
|
Join Date: May 2008
Location: India,Kolkatta
Posts: 50
|
|
|
hey Eranga,
we can use JEditorPane for this???
|
|

06-17-2008, 01:00 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
JEdiorPane is an extended component from JTextComponent. Basically we can use it to render plain, html or rtf text. If you say use of it as a TextAre(or as a notepad), yes you can.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|