Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Websocket on Java SE?

Tags:

java

websocket

I want to make real time chat and I want to use Java SE with websockets on server side and html/JS on client side. It's very hard to find websocket library that works with Java SE (or I'm looking at wrong places). Is using Java SE for websocket application at all good solution?

I followed this tutorial: https://spring.io/guides/gs/messaging-stomp-websocket/ but imports are not working well for me:

The import org.springframework.boot.autoconfigure cannot be resolved

Is this because Java EE is required?

Please give mu URL of some (working) tutorial/youtube video. I'm using Eclipse and I'm not too experienced with it, so "for dummies" rated article will be more suitable.

I know that question is not very precise, but I'm desperate - wasted days, tried few different libraries, but nothing works, so I just need to get it running.

like image 827
MilanG Avatar asked Feb 07 '15 20:02

MilanG


1 Answers

Jetty is a very lightweight library that helps JavaSE developer with all kind of network communication for client and server. Chat applications have been the 'hello world' for such a kind of library. I would recommand any good tutorial on this (just type websocket chat jetty in your favorite browser). If your main goal is to LEARN how it works, instead of copy/paste, I would recommand a simpler tutorial like this one.

like image 115
TrapII Avatar answered Oct 16 '22 12:10

TrapII