Closed RamSaw closed 5 years ago
Added corresponding gradle jar tasks:
./gradlew serverJar
./gradlew clientJar
Possible cause of the problem with sh files: main method was not in a separate file as it should be in Kotlin.
I can't run it.
Server:
java -jar ./build/libs/roguelike-client-1.0-SNAPSHOT.jar localhost 50051 Exception in thread "main" java.lang.NoClassDefFoundError: io/grpc/ManagedChannelBuilder at ru.hse.spb.client.RoguelikeClient.<init>(RoguelikeClient.kt:74) at ru.hse.spb.client.RoguelikeClientApplicationKt.main(RoguelikeClientApplication.kt:14) Caused by: java.lang.ClassNotFoundException: io.grpc.ManagedChannelBuilder at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 2 more
Client:
java -jar ./build/libs/roguelike-client-1.0-SNAPSHOT.jar localhost 50051 Exception in thread "main" java.lang.NoClassDefFoundError: io/grpc/ManagedChannelBuilder at ru.hse.spb.client.RoguelikeClient.<init>(RoguelikeClient.kt:74) at ru.hse.spb.client.RoguelikeClientApplicationKt.main(RoguelikeClientApplication.kt:14) Caused by: java.lang.ClassNotFoundException: io.grpc.ManagedChannelBuilder at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 2 more
@vladimirrim could test it on your linux? maybe the problem is in my system and I haven't installed some gRPC dependencies. @VadimFarutin have you succeeded to run sh files?
@RamSaw Please try again:
./gradlew clean build
./gradlew serverJar
./gradlew clientJar
I have changed dependency on gRPC to compile one here
yeah, now it works. I'm closing issue and will add this info to README.
Create the ability to run our application in the terminal. Possible solutions: