Stephan van Hulst wrote:Two things are wrong:
String::length hardly represents a function that takes 3 arguments.
Tim Holloway wrote:Eclipse is not a JEE server. It's an IDE and it can attach to and run/debug webserver code but you'd actually need to install a JEE server itself.
I'm not knowledgeable in TomEE myself. But JBoss/Wildfly is fairly easy to work with.
Tim Holloway wrote:I'm going to differ with Rob here. Disclaimer: I'm a long-time forum moderator for the Tomcat forum, so I do have a bit of a bias.
The main advantage of Tomcat is that it's lightweight and simple to install and maintain. True, it does not support the advanced features of JEE, but when you're first starting out, servlets and JSPs are enough of a challenge in their own right, Furthermore, Tomcat is not a toy - it's a primary production webapp server in many, many IT shops. In fact I've worked in environments where it was the only webapp server product being used.
Rob Spoor wrote:
For the JEE container you can go for GlassFish, or an alternative like WildFly. I don't recommend WebLogic, as I don't think it's very beginner-friendly. (To be honest, it wasn't friendly to me either...). Tomcat is not an option, as it only supports the web part of JEE. Without additional libraries (where TomEE comes in), you're limited to servlets and JSPs.
Junilu Lacar wrote:Just as in the other thread you started related to the same class, this is very procedural-style code, not object-oriented at all. Just keep that in mind as you study this code and how the algorithm is implemented. This is more like how you'd do it in C, not Java.
Ron McLeod wrote:It is happening because it is specified in an environmental variable - either in your shell profile or some tooling:
_JAVA_OPTIONS=-Djava.net.preferIPV4Stack=true
To check if it has been set in your shell try:
Linux: echo $_JAVA_OPTIONS
Windows: echo %_JAVA_OPTIONS%