How to insert a date variable in java?

How do I insert my Java program or code into a html website?

  • I am trying to create a website, but I only have very little experience and knowledge with HTML. I know how to write a simple Java program, so I thought I might as well write a Java program and insert it into my website, so the main functions on the pages of it can be carried out by the Java program, while the linking and all of the other stuff is done with the HTML coding. Ok, long story short: What HTML codes do I need to enter in order to put in my Java code or the program or whatever it is. Does the Java code have to be saved as an applet or will the code be enough?

  • Answer:

    It needs to be an applet. An applet is a program created in java. <html> <head> <title>My program</title> </head> <body> <applet code = "myProgram.class"></applet> </body> </html> Make sure the applet's .java and .class is in the same file or folder as your html page. You can simply use a notepad and save it as an extension of .html or .htm and save it in the same folder as your applet.

msuderma... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Pretty sure it needs to be an applet... anyway... <applet code="my_applet.class" width="#" height="#" > <!-- optional parameters here > </applet> copy paste the classes into the folder that contains your main class. then run the main class like above.

Taz

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.