Error compiling blynkserver with java 8

I am trying to compile blynk server with
mvn clean install -Dmaven.test.skip=true -P java8

But I am getting Error
[WARNING] The requested profile "java8" could not be activated because it does not exist. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project utils: Compilation failure [ERROR] /home/shmoke/blynkServer/blynk-server/server/utils/src/main/java/[6,1] modules are not supported in -source 8 [ERROR] (use -source 9 or higher to enable modules)
Please Help

I’m not quite sure why you want to compile your own version argerte than using one of the pre-compiled versions, but this topic may shed some light on the issues you are having:

It seems that the latest version of the server requires java11


Thank you very much. The post helped me a lot. I was actually trying to compile the java11 branch of the server with java8. Changing to the java8 branch allowed me to compile the files successfully.

@Dmitriy how you create and publish the java8 version of server from sources.
I made some change on server source and i need to create java8 version.
You said i need the java8 branch of server source so where can i find server source that is compatible with java8?

@Shmoke how you do it
Are you compile java8 version?with witch sorces?
Please help me


Fortunately, you don’t need to find witches for this task. If you have cloned the blynk server project from GitHub using the command line simply use the command ‘git switch java8’ to switch to the java 8 version of the server. If you are using the GitHub website, then press the button labeled master above the files, and select java8 from the list. This should give you the java8 branch of the project.

Hope this helps :slight_smile:

1 Like