You could have a hyperlink in an HTML page that links to another HTML page that contains a Java Applet. Not sure if that's what you are after though...
You could have a hyperlink in an HTML page that links to another HTML page that contains a Java Applet. Not sure if that's what you are after though...
sorry it is kinda unclear that what i was asking. after some googling, i found i might be able to do something like <applet code= xxx.class ... >
does it mean my java program must extend applet in order to put on the web?
For that to work, your program must extend Applet. Also note that in Applets there is no main method, the Applet's init, start and stop methods are called instead.
There are also java servlet pages that allow you to display HTML pages in your browser from within a Java program, but from your description it sounds like you want the opposite.
I am unaware of any other way to run a Java program from an HTML page, anyone else have any ideas?
Last edited by darkagn; Apr 10th, 2009 at 8:37 pm.
it should be written after the packages you import (i usually write at that position ). you can change height and width accordingly.
and you have to write like writing comments cuz java compiler doesnt understand that particular tagged code
and then save the file in .html form . i guess it should work
or else in the command mode you can use appletviewer
Last edited by rahul8590; Apr 11th, 2009 at 3:35 am.
Yes I have already mentioned that k2k can run their program as an applet. Do you know of any way that a java application (ie not an applet) can be run from an HTML link?
does it mean my main html file should have a link, linking to another "html file in java format" and must extend to applet?
if it doesn't take too long, would you mind to give a simple example of the java program? maybe just the necessary heading and stuffs, so it would be easier for me to see the first time doing this.
Yes I have already mentioned that k2k can run their program as an applet. Do you know of any way that a java application (ie not an applet) can be run from an HTML link?
well actually i used to convert all of my code in an applet form and work. but if u completely wanna run java application using html then try the underneath link . http://www.java2html.com/
it converts the java code to html .
Quote ...
does it mean my main html file should have a link, linking to another "html file in java format" and must extend to applet?
if it doesn't take too long, would you mind to give a simple example of the java program? maybe just the necessary heading and stuffs, so it would be easier for me to see the first time doing this.
well i cannot write a complete program , but yeah since you have requested i can write a simple one.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.