On 9/4/23 03:09, Ing. Andrea Vettori wrote:
Hello thank you very much for the test program. Your program works. Looking for 
differences I found that I didn’t have the http2-hpack jar. After adding it to 
my class path my program also works.
I don’t know why a missing jar can cause a timeout instead of a class not found 
exception but maybe it’s a something pluggable that is however required in this 
case.

That involves Jetty internals that I don't know much about either. A timeout is indeed an odd result from a missing jar, especially one as critical for basic H2 operation as that one. It should be reported to the Jetty project as a bug. Let me know if you do so ... I will get around to it eventually if not.

I would strongly recommend using a dependency manager for your Java projects so that all required dependencies are included automatically.

As you probably noticed, I built my test program with Gradle. Gradle seems to be the hot new kid on the block. I personally find ant+ivy and maven to be cumbersome, but they do work. When I first started writing Java programs, I used a very simple ant config that I stole from somewhere, with manually downloaded jars placed in a lib directory. I don't miss those days! Upgrading dependencies was quite painful, now I just edit build.gradle, check for code changes that might be required, and recompile.

I created a 'blank' project intended as a starting point for new command-line projects. Just uses gradle. Saves me a bunch of time when I want to build a quick test program.

https://github.com/elyograg/blankgradle

Thanks,
Shawn

Reply via email to