Can JMenuItem point to a HTML file that opens in IE?

Reply

Join Date: May 2006
Posts: 14
Reputation: blurstudent is an unknown quantity at this point 
Solved Threads: 0
blurstudent's Avatar
blurstudent blurstudent is offline Offline
Newbie Poster

Can JMenuItem point to a HTML file that opens in IE?

 
0
  #1
May 24th, 2006
Can JMenuItem point to a HTML file that opens in IE?

I want the jMenuItem (E.g: Tutorial Help) to point to tutorial.html on my computer.

Couldn't find any information about it at all on the net. Can any kind souls out there help me?

Your help is greatly appreciated.

Thank you.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #2
May 24th, 2006
Originally Posted by blurstudent
Can JMenuItem point to a HTML file that opens in IE?

I want the jMenuItem (E.g: Tutorial Help) to point to tutorial.html on my computer.

Couldn't find any information about it at all on the net. Can any kind souls out there help me?

Your help is greatly appreciated.

Thank you.
You mean, how can you open up a url from a java program?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 14
Reputation: blurstudent is an unknown quantity at this point 
Solved Threads: 0
blurstudent's Avatar
blurstudent blurstudent is offline Offline
Newbie Poster

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #3
May 24th, 2006
erm. ya. sort off. But mine is an application. I just want the link to point to a HTML file. Can it be done?

Pardon me if it can't be done.

Thanks!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #4
May 24th, 2006
Originally Posted by blurstudent
erm. ya. sort off. But mine is an application. I just want the link to point to a HTML file. Can it be done?

Pardon me if it can't be done.

Thanks!
Oh i see, you mean like how can java execute an external process, such as notepad, or in your case a .html file?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 14
Reputation: blurstudent is an unknown quantity at this point 
Solved Threads: 0
blurstudent's Avatar
blurstudent blurstudent is offline Offline
Newbie Poster

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #5
May 24th, 2006
yeah. I just want it to open in Internet Explorer in this case. You able to help me?

I'll be very much appreciated.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #6
May 24th, 2006
  1. /*
  2.   * ped.java
  3.   *
  4.   * Created on 29 April 2006, 17:07
  5.   */
  6. import java.awt.*;
  7. import java.io.*;
  8. import java.util.*;
  9.  
  10.  
  11. public class ped {
  12. public static void main(String[] args) throws Exception {
  13. try
  14. {
  15. Runtime rt = Runtime.getRuntime();
  16. Process p = rt.exec("notepad.exe");
  17. }
  18.  
  19. catch(Exception e)
  20. {
  21.  
  22. }
  23. }
  24. }

That opens notepad, although I'm not sure how to open explorer? But I reckon it's pretty close...
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 14
Reputation: blurstudent is an unknown quantity at this point 
Solved Threads: 0
blurstudent's Avatar
blurstudent blurstudent is offline Offline
Newbie Poster

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #7
May 24th, 2006
hey, thanks for that part! I managed to open up the IE. But the problem here is, I do not know how to get it to point to the URL "tutorial.html"

Sorry about that.
I am who I am. People don't call me blur for nothing. :rolleyes:
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #8
May 24th, 2006
Oopsie, I gotta go now.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 14
Reputation: blurstudent is an unknown quantity at this point 
Solved Threads: 0
blurstudent's Avatar
blurstudent blurstudent is offline Offline
Newbie Poster

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #9
May 24th, 2006
hey! No worries! I got it settled!

Runtime rt = Runtime.getRuntime();
Process p = rt.exec("C:/Program Files/Internet Explorer/iexplore.exe www.yahoo.com.sg");

and it works! wohoo!

Thanks alot!
I am who I am. People don't call me blur for nothing. :rolleyes:
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Can JMenuItem point to a HTML file that opens in IE?

 
0
  #10
May 24th, 2006
But why do it like that?
Why not embed a web browser control in a Java window?
If simple HTML 3.0 is enough you can use standard controls for that, else you might have to find something on the web (or get creative and write your own HTML parser).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC