Skip to content

Tag: java

Is there a way I can bundle a jre in a Launch4j .exe file?

I would like to bundle a jre folder into my generated launch4j .exe file via maven pom.xml (For some reason, I don’t want an installer, just a click to run Java application that has its own embedded jre). Is it possible? I have read through several posts and I don’t get a maven automated one. I do…

How to determine how many times a character is repeated in a string?

I am having some trouble with writing a method that when prompted with a number returns how many times each value is repeated. For example, if the number 7846597 is entered the method would return: I know this would be most easily done with a loop, but I am not sure how to write the actual code. I also know

How can I print an error message if the value is < 250

I have this code where somebody can choose a ppm value and it calculates the fanControl value. What do I have to do that the program prints an error message and stops calculating if the person who chooses the ppm value, chooses something less than 250. Answer I agree with @Federico Your solution will depend o…