| | |
exe java program by html link?
Thread Solved |
•
•
Join Date: Nov 2007
Posts: 250
Reputation:
Solved Threads: 1
my last thread was just solved that i can run my java programs in my linux box.
now i would love to know if some one knows how to make a html/xml page that has a link that if i clicked and it would execute my java program.
all i want to know is how to make the link works to exe the java program. a quick simple example would be great. Thanks very much
now i would love to know if some one knows how to make a html/xml page that has a link that if i clicked and it would execute my java program.
all i want to know is how to make the link works to exe the java program. a quick simple example would be great. Thanks very much
•
•
Join Date: Nov 2007
Posts: 250
Reputation:
Solved Threads: 1
•
•
•
•
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...
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?
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 7:37 pm.
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend. well in ur java program u will have to write the following
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
Java Syntax (Toggle Plain Text)
/* <applet code = "filename" height = 300 width = 300 > </applet code> */
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 2:35 am.
<?php
$data = $_POST['data'];
if(empty($data)) {
echo "byte me" ; }
?>
$data = $_POST['data'];
if(empty($data)) {
echo "byte me" ; }
?>
•
•
Join Date: Nov 2007
Posts: 250
Reputation:
Solved Threads: 1
well in ur java program u will have to write the following
Help with Code Tags
(Toggle Plain Text)
/* <applet code = "filename" height = 300 width = 300 >
</applet code> */
***********************************************
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.
thanks for all the contribution.
Help with Code Tags
(Toggle Plain Text)
/* <applet code = "filename" height = 300 width = 300 >
</applet code> */
***********************************************
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.
thanks for all the contribution.
•
•
•
•
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?
http://www.java2html.com/
it converts the java code to html .
•
•
•
•
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.
Java Syntax (Toggle Plain Text)
import java.awt.*; import java.applet.*; /* <applet code = "me" height = 300 width = 300 > </applet code> */ public class me extends applet { public void paint (Graphics g) { g.drawString("hi",25,25); } }
well honestly i havent compiled the code , but to the best of my knowledge it must work .
<?php
$data = $_POST['data'];
if(empty($data)) {
echo "byte me" ; }
?>
$data = $_POST['data'];
if(empty($data)) {
echo "byte me" ; }
?>
![]() |
Similar Threads
- can't fix this problem dealing w/ in system32\ntoskrnl.exe (Viruses, Spyware and other Nasties)
- ctfmona.exe (Viruses, Spyware and other Nasties)
- Explorer.exe continuously restarts right after boot-up! (Viruses, Spyware and other Nasties)
- Explorer.exe problem, continuous restarting (Viruses, Spyware and other Nasties)
- MPTFT.EXE problem (Viruses, Spyware and other Nasties)
- For Ny4windserboy02: rundll.exe not responding on shutdown....HijackThis log included (Viruses, Spyware and other Nasties)
- hclean.exe trojan, norton anitvirus not working and google search problems (Viruses, Spyware and other Nasties)
- VX2? Nail.exe? Aurora popups? H E L P ! (Viruses, Spyware and other Nasties)
Other Threads in the Java Forum
- Previous Thread: want make a jar file
- Next Thread: value from from form to popup
Views: 1090 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for Java
access add android applet arguments array arrays binary bluetooth build c# chat class classes client code combobox compile compiler component constructor convert converter data database db draw eclipse error event exception fast file filei/o forloop game givemetehcodez graphics gui helpwithhomework html ide image images inheritance input j2me java jframe jmf jpanel jtable jtextfield julia lazy linked linked-list list loop method methods mobile netbeans newbie number object os parameter pattern phone print printing problem program programming project read regex remote remove robot scanner server set sms socket sort source sql string swing test text thread threads transfer tree url user windows






