We cannot translate it to Java. We need to analyze where the property ( Tile_size_utility ) is set and where we need print_error . Then we can implement an equivalent solution.
Example: it is assumed that Tile_size_utility is a system property (set in the environment), and we need print_error as a (logical) flag, then this should work:
public class MyClass { public final static boolean PRINT_ERROR = (System.getProperty("Tile_size_utility") != null); }
Now, if you do a few set Tile_size_utility=myutiliy or run java with argument
-DTile_size_utility=myutiliy
then print_error will be set to true .
source share