You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, running the examples used to be as simple as this:
ant
java -cp build/examples:dist/java_websocket.jar ChatServer
java -cp build/examples:dist/java_websocket.jar ChatClient
When I tried building it now using Maven or Gradle, the classes under src/main/example/ weren't being compiled so I had to manually javac them and then download SLF4J dependency jars.
Maybe there should be a simple build task so you can do, for example gradle example or mvn example to run the examples.
The text was updated successfully, but these errors were encountered:
1、 update pom.xml line 166:
src/main
After pom.xml was changed, directly mvn clean install , it would fail with follow message:
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-maven-plugin:4.3.1:bnd-process (default) on project Java-WebSocket: The default package '.' is not permitted by the Import-Package syntax.
2、 add package to the java of example :
mvn clean install , it was successful. And the classes ware in the dir of example:
Ex : dota17#15
This is just an example how I use it, I hope it can help you.
3、 Add the dependency of slf4j-api-1.7.25 in the libs:
/c/code/local/Java-WebSocket/libs
abc@desktop MINGW64 /c/code/local/Java-WebSocket/libs (exampleBuild)
$ ls -lrt
total 60
-rw-r--r-- 1 abc 197121 41203 2月 11 2020 slf4j-api-1.7.25.jar
-rw-r--r-- 1 abc 197121 15257 6月 28 16:11 slf4j-simple-1.7.25.jar
4、 We can run the example with java:
cd target/classes/
I was looking for an alternative to the chat server instructions (https://tootallnate.github.io/Java-WebSocket/) mentioned in #937.
Apparently, running the examples used to be as simple as this:
When I tried building it now using Maven or Gradle, the classes under
src/main/example/
weren't being compiled so I had to manuallyjavac
them and then download SLF4J dependency jars.Maybe there should be a simple build task so you can do, for example
gradle example
ormvn example
to run the examples.The text was updated successfully, but these errors were encountered: