<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>openjdk Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/openjdk/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/openjdk/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Mon, 15 Apr 2019 18:45:00 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>openjdk Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/openjdk/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>GraalVM is here!</title>
		<link>https://www.clever.cloud/blog/features/2019/04/15/release-graalvm/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Mon, 15 Apr 2019 18:45:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[cloud native]]></category>
		<category><![CDATA[graalvm]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[openjdk]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2019/04/15/release-graalvm/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="graalvm 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Good news everone, we are all super happy to tell you our JVM image has been updated substantialy. We now support OpenJDK 12 and GraalVM CE!</p>
<span id="more-2956"></span>

<p>If you follow what&#39;s going on in the JVM space you have seen there is more and more choices available when it comes to running JVM-based applications. And we now support GraalVM CE. If you have no idea what it is, the best, simple explaination can be found on Julien Ponge&#39;s medium: <a href="https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c">https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c</a></p>
<p>And as he explains that way better than I, I will jump into the how to run a GraalVM application on Clever Cloud.</p>
<p>We first need to find an appropriate Hello world project. Being a Ratpack fan I looked on Github and found this: <a href="https://github.com/wololock/ratpack-graalvm-demo">https://github.com/wololock/ratpack-graalvm-demo</a></p>
<p>This is a gradle project with a script to build a native image, basically a binary with everything needed to run the application. No need for a JVM. So this is what we are going to build.</p>
<p>First to create the application, if you have clever-tools you can run: <code>clever create --type gradle --plan M graalPack</code> Now we need to setup the right environment variables.</p>
<pre><code class="language-bash">clever env set CC_JAVA_VERSION graalvm-ce  # Select GraalVN CE as Java Version
clever env set GRADLE_DEPLOY_GOAL shadowJar # Specify the gradle goal, here we want to build a full jar.
clever env set CC_PRE_RUN_HOOK ./build-native-image.sh # run the native image build
clever env set CC_RUN_COMMAND ./ratpack-graalvm-demo # specify the path of the native executable
</code></pre>
<p>I have modified a couple of things to make sure it would work smoothly on Clever Cloud. First thing, always define a rootProject name because gradle will pick the containing folder, which in our case the random application id, and generate the jar name with it. So you can&#39;t really use it in a script. Here&#39;s one liner to do it: <code>echo &#39;rootProject.name = &quot;ratpack-graalvm-demo&quot;&#39; &gt; settings.gradle</code></p>
<p>The script already run <code>gradlew shadowJar</code>. I have removed it since this step is already made by Clever Cloud. Of course you could run it locally and only push the executable. This would also work.</p>
<p>Don&#39;t forget to add these changes to your git repository: <code>git add settings.gradle build-native-image.sh &amp;&amp; git commit -m&quot;cleverify&quot;</code></p>
<p>We are building a native image and this can be a super greedy process in terms of memory. To make sure we have some headroom we are going to use a bigger scaler. Run <code>clever scale --flavor L</code> to get the proper size. This might depend on the build you are running. Static analysis is not cheap. Later this week we&#39;ll show you how to proceed differently with a new CI project :) But for now we&#39;ll stick to a bigger scaler.</p>
<p>Now all you have to do is run <code>clever deploy</code> and you will have your native image running on Clever Cloud. Benefits are mostly a reduced memory footprint and better performances at cold start. You can find more informations about this on the following blog post <a href="https://e.printstacktrace.blog/ratpack-graalvm-how-to-start/">Ratpack on GraalVM - how to start?</a>.</p>
<p>In the next days you can expect support for cool GraalVM features like the support for <a href="https://github.com/oracle/truffleruby">TruffelRuby</a> or <a href="https://github.com/oracle/fastr">FastR</a>). Let us know if you have any questions in the comments below!</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="graalvm 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/graalvm-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Good news everone, we are all super happy to tell you our JVM image has been updated substantialy. We now support OpenJDK 12 and GraalVM CE!</p>
<span id="more-2956"></span>

<p>If you follow what&#39;s going on in the JVM space you have seen there is more and more choices available when it comes to running JVM-based applications. And we now support GraalVM CE. If you have no idea what it is, the best, simple explaination can be found on Julien Ponge&#39;s medium: <a href="https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c">https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c</a></p>
<p>And as he explains that way better than I, I will jump into the how to run a GraalVM application on Clever Cloud.</p>
<p>We first need to find an appropriate Hello world project. Being a Ratpack fan I looked on Github and found this: <a href="https://github.com/wololock/ratpack-graalvm-demo">https://github.com/wololock/ratpack-graalvm-demo</a></p>
<p>This is a gradle project with a script to build a native image, basically a binary with everything needed to run the application. No need for a JVM. So this is what we are going to build.</p>
<p>First to create the application, if you have clever-tools you can run: <code>clever create --type gradle --plan M graalPack</code> Now we need to setup the right environment variables.</p>
<pre><code class="language-bash">clever env set CC_JAVA_VERSION graalvm-ce  # Select GraalVN CE as Java Version
clever env set GRADLE_DEPLOY_GOAL shadowJar # Specify the gradle goal, here we want to build a full jar.
clever env set CC_PRE_RUN_HOOK ./build-native-image.sh # run the native image build
clever env set CC_RUN_COMMAND ./ratpack-graalvm-demo # specify the path of the native executable
</code></pre>
<p>I have modified a couple of things to make sure it would work smoothly on Clever Cloud. First thing, always define a rootProject name because gradle will pick the containing folder, which in our case the random application id, and generate the jar name with it. So you can&#39;t really use it in a script. Here&#39;s one liner to do it: <code>echo &#39;rootProject.name = &quot;ratpack-graalvm-demo&quot;&#39; &gt; settings.gradle</code></p>
<p>The script already run <code>gradlew shadowJar</code>. I have removed it since this step is already made by Clever Cloud. Of course you could run it locally and only push the executable. This would also work.</p>
<p>Don&#39;t forget to add these changes to your git repository: <code>git add settings.gradle build-native-image.sh &amp;&amp; git commit -m&quot;cleverify&quot;</code></p>
<p>We are building a native image and this can be a super greedy process in terms of memory. To make sure we have some headroom we are going to use a bigger scaler. Run <code>clever scale --flavor L</code> to get the proper size. This might depend on the build you are running. Static analysis is not cheap. Later this week we&#39;ll show you how to proceed differently with a new CI project :) But for now we&#39;ll stick to a bigger scaler.</p>
<p>Now all you have to do is run <code>clever deploy</code> and you will have your native image running on Clever Cloud. Benefits are mostly a reduced memory footprint and better performances at cold start. You can find more informations about this on the following blog post <a href="https://e.printstacktrace.blog/ratpack-graalvm-how-to-start/">Ratpack on GraalVM - how to start?</a>.</p>
<p>In the next days you can expect support for cool GraalVM features like the support for <a href="https://github.com/oracle/truffleruby">TruffelRuby</a> or <a href="https://github.com/oracle/fastr">FastR</a>). Let us know if you have any questions in the comments below!</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
