• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

How to embed my java program into my website?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Sheriff
Posts: 7123
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/
 
Marshal
Posts: 76888
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic