Nonetallt
Nonetallt

Reputation: 371

How to implement a basic OS style console in java web client?

I'm currently planning on making a simple IRC style chat client and server system using Java for practice. I did some research into different ways of including the client functionality on a webpage like applets and java-web-start. I would like to have the client running on the users machine instead of the server itself. As I interpreted, out of the two, the applet pretty much does exactly that and seems way less effort to set up.

However, it turns out that applets have their own graphical implementation using "Graphics" class to render things like text, lines and shapes. Instead of going for something fancy, I would like to use a simple console interface like cmd on windows or shell on unix systems.

Is it possible to have this type of console running on a webpage as java applet or would I basically have to code the entire graphical look using the tools provided by the Graphics class? For this practice project, it would be ideal just using simple functionality provided in console windows like "nexInt()" and "system.out.print()" instead of having to add complex elements for input and output.

TL;DR:
Is it possible to embed an OS console within a webpage using java and what would be the preferred method of going about it?

Upvotes: 1

Views: 80

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168825

Is it possible to embed an OS console within a webpage using java ..

AFAIU it is not possible to embed a console in a Swing or AWT desktop app. As far as embedding that into a web page, that would require an applet. Chrome and FF have completely removed support for applets and IE is set to follow.

Upvotes: 1

Related Questions