Converting a string to int in Groovy
I have a String that represents an integer value and would like to convert it to an int. Is there a groovy equivalent of Java’s Integer.parseInt(String)? 13 Answers 13
I have a String that represents an integer value and would like to convert it to an int. Is there a groovy equivalent of Java’s Integer.parseInt(String)? 13 Answers 13
I have something like this on a Jenkinsfile (Groovy) and I want to record the stdout and the exit code in a variable in order to use the information later. sh “ls -l” How can I do this, especially as it seems that you cannot really run any kind of groovy code inside the Jenkinsfile? … Read more
I need to read a file from the file system and load the entire contents into a string in a groovy controller, what’s the easiest way to do that? 6 Answers 6
Closed. This question needs to be more focused. It is not currently accepting answers. Closed 8 years ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Can someone please explain the major differences between Scala, Groovy and … Read more
Found it. System property ‘java.home’ is not JAVA_HOME environment variable. JAVA_HOME points to the JDK, while java.home points to the JRE. See that page for more info. Soo… My problem was that my startpoint was the jre folder (C:\jdk1.6.0_26\jre) and not the jdk folder (C:\jdk1.6.0_26) as I thought(tools.jar is on the C:\jdk1.6.0_26\lib folder ). The compile line in dependencies.gradle … Read more
Could not find method compile() for arguments Gradle
I fixed this problem by changing the Gradle JVM settings in IntelliJ settings: In the Settings/Preferences dialog, go to Build, Execution, Deployment | Build Tools | Gradle. Under the Gradle section, change the Gradle JVM option. Select a Gradle JVM which works for you. See https://www.jetbrains.com/help/idea/gradle-jvm-selection.html#jvm_settings