Can't get HelloWorldExample.java to compile

I'm a newbie, looking to find a simple example driver, and the HelloWorldExample.java looks like what I'm looking for: it connects to a server and sends a cypher query, and prints out some returned text.

However, the instructions in the tutorial doesn't give any idea where to place this source or how to compile it. There's no package, so it ought to sit in the root directory. However, should this be in the app-java project? The port id the driver connects to (7687) isn't 3000 which the Javalin server is sitting on, which suggests it runs with a different server on localhost.

I've tried compiling it manually (there's no maven instructions in the documentation) but it soon runs into missing libraries. I've tried generating and new archetype, but when this compiles it complains the source contains a lambda.

Yes, I am using java 17 and mvn 3.9.4, and I have sdk

Is it that this code is an example, but not a working one? Is it as simple as that?

So, sorry, but I'm a bit stuck,
Any pointers would be gratefully received.

I can send you a small maven project that demonstrates connecting to a server, executing a cypher query, and printing the results.

Message me your email if that would help.

Hello, can you share which tutorial you are referring to? Thanks

That would be brilliant, Gary! Thanks :slight_smile:

martin@wheatman.net

I have to apologise, Florent - the code for the driver I've got is from an (old) unmaintained page. I must have gotten myself lost. Sorry!!!

Thanks for the reply!

I sent you a prototype. It is a maven project zipped up.

1 Like