Post/Code

HomeAboutUsesNow

Java Tips for Non-Java Developers.

At work, I often work on the front-end of Java projects. Oftentimes, this means setting up Java projects eventhough you only need to work on the front-end. This type of setup may involve, but not be limited to:

  • Setting up Java
  • Setting up Maven
  • Setting up Payara
  • Setting up Postgres
  • Running batch commands
  • Running SQL scripts
  • Installing SSL certificates
  • Configuring proxy settings
  • Etc

Doing tasks like this can sometimes be frustrating, especially when local builds fail due to obscure reasons that you don't fully comprehend. Below are some random throughts on this:

  • When using Maven, check that your settings.xml file is correctly configured - typically found in C:\Users\username\.m2. Make sure to check for things such as usernames & passwords are correct, proxy settings are what they should be.
  • If you run java -version in your terminal and get an unrecognised command message, it means that you JAVA_HOME environment variable is not setup correctly, and you will need to run java commands and keytool from the folder where you java.exe is located. Rather than having to do that, ensure you env variable is setup correctly!
  • Ensure your .npmrc file is correctly configured, either with your npm-registry or nexus repository locations or your http.proxy settings.
  • If you are using Nexus, make sure the npm modules are in the repository.
  • Ensure that the necessary SSL certificates are present in your keystore, these may need to be in your JRE lib/security/cacerts or in your Payara keystore.
  • When using Postgres, ensure that your local database names, usernames and passwords are correct. Additionally, make sure that your usernames have the correct roles.
  • Make sure you have run the necessary scripts.
  • Make sure you have run the necessary terminal commands.
  • In Enterprise applications, you will often need to use IntelliJ plugins such as CheckStyle, FindBugs and SonarLint, make sure that you have setup the necessary .xml files for these to reference.

Hopefully, all of the necessary steps will be laid out in Confluence (or similar) to assist with the necessary setups. If not, ask your fellow developers for some assistance, and in the process, make notes that you can refer back to and then re-trace your steps and re-write the steps into a how-to article that you can contribute to the team and project.

Even though you may not be a Java developer, it often takes a non-Java developer to write out an article, in plain, understandable, step-by-step language that other developers can follow!