Skip to content

Instantly share code, notes, and snippets.

View solry's full-sized avatar

Roman solry

View GitHub Profile
@julianxhokaxhiu
julianxhokaxhiu / java.sh
Last active August 9, 2024 14:25
How to pass system properties with spaces in Java within your Bash scripts
#!/usr/bin/env bash
######################################################################################################################
# This script is a solution of when you want to pass Java options when they do come to the script as environment
# variable, or when you declare them inside a variable, using quotes. When you do so, you may obtain from the Java
# process an error that looks like this:
#
# $ ./java.sh
# Error: Could not find or load main class ...
#