<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Java on Random Musings</title><link>https://chengl.com/tags/java/</link><description>Recent content in Java on Random Musings</description><generator>Hugo</generator><language>en-us</language><copyright>Cheng Long</copyright><lastBuildDate>Sun, 30 Jul 2017 09:22:27 +0000</lastBuildDate><atom:link href="https://chengl.com/tags/java/index.xml" rel="self" type="application/rss+xml"/><item><title>Ruby and Java Stack Level</title><link>https://chengl.com/post/ruby-and-java-stack-level/</link><pubDate>Sat, 05 Nov 2016 09:17:00 +0000</pubDate><guid>https://chengl.com/post/ruby-and-java-stack-level/</guid><description>&lt;p&gt;While coding for an algorithmic problem, I discovered that Ruby&amp;rsquo;s stack level is much shallower than Java. This caused a recursive DFS solution written in Ruby failed due to &lt;code&gt;stack level too deep (SystemStackError)&lt;/code&gt;, while the same code written in Java passed. Whether recursion or tail recursion should be used is not the point of this post. This post is to find out what the max stack level is and what limits the stack level.&lt;/p&gt;</description></item><item><title>Gradle Offline Build</title><link>https://chengl.com/post/gradle-offline-build/</link><pubDate>Sun, 20 Sep 2015 08:38:00 +0000</pubDate><guid>https://chengl.com/post/gradle-offline-build/</guid><description>&lt;h1 id="the-problem"&gt;The Problem&lt;/h1&gt;
&lt;p&gt;In a recent project, I have to do Gradle build on a CI server in a very constrained environment. The constraints are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NO Internet connection&lt;/li&gt;
&lt;li&gt;NO Gradle installed&lt;/li&gt;
&lt;li&gt;NO local Maven repo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The obvious problem that these constraints cause is that the project can&amp;rsquo;t build because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gradle is not installed&lt;/li&gt;
&lt;li&gt;Can&amp;rsquo;t get dependencies&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="the-solution"&gt;The Solution&lt;/h1&gt;
&lt;p&gt;This solution will achieve the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use Gradle to build&lt;/li&gt;
&lt;li&gt;Use Gradle to manage dependencies&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let&amp;rsquo;s solve the problem step by step.&lt;/p&gt;</description></item></channel></rss>