Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to embed my java program into my website?  RSS feed

 
Jaypee Hernandez
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day! I am not quite sure if this topic fits in this thread and I am giving my apologies in advance for this occurrence, if ever. However, I would like to ask how can I embed my Java programs into my website. I am running a bare HTML website which is quite common to beginners just like me, and I would like to embed my virtual chatting program in Java into my website so that my friends could test and have fun with it. It is a console program only and interacts user only with keyboard [typing]. I really don't have that Javascripting prowess , if you will ever mention it that is why, I would only want to embed my Java program [because I am only fascinated by Java this time], to my website [I only knew HTML and few CSS, I don't know some javascript, php, or whatsoever web scripting languages]. Thank you for your kind consideration of this question! Any reply with this topic is appreciated in advance.

PS. I would like the java class to be embedded in my website that is whenever a visitor visits my site, they could chat with my program [which is a virtual chatting program]
 
Knute Snortum
Sheriff
Posts: 4073
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It won't help you with *your* website, but Heroku is a site that lets you run Java in it. It's a little complex but it works and it's free for the lower levels.
 
Mike Baker
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can embed your Java program into HTML web page by changing your Java program into a Java Applet. Java Applet is GUI that can call your core Java program but your Java program will run not in a console but within your Java Applet. You would need to change your Java program structure (main() method, etc.) into a Java Applet and then embed the Applet into your HTML web page. See the tutorial for Java Applets here: https://docs.oracle.com/javase/tutorial/deployment/applet/
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The correct answer, which you will find more about in this thread is you shouldn't embed Java® program in any websites any more.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!