Dynamic compilation in appengine flexibile environment

83 views
Skip to first unread message

Vinay Chitlangia

unread,
Oct 25, 2016, 11:41:00 PM10/25/16
to Google App Engine
How can we do dynamic compilation of Java in the appengine flexible environment.
ToolProvider.getSystemJavaCompiler() returns null in the flexible runtime.
Is there some other docker image I can use that has the jdk instead of just jre?

Nick (Cloud Platform Support)

unread,
Oct 28, 2016, 12:00:19 PM10/28/16
to Google App Engine
Hey Vinay,

You can use the Dockerfile of a Custom Runtime based on a default image to install and configure javac on the system. This would then enable you to run dynamic compilation.

Let me know if you have any further questions, I'm here to help.

Cheers!

Nick
Cloud Platform Community Support

Vinay Chitlangia

unread,
Oct 28, 2016, 11:07:37 PM10/28/16
to google-a...@googlegroups.com
Thanks Nick.
Do you have example of how when can write such a dockerfile.
I am particularly curious about how to install the java jdk in a manner that is compatible with java-compat runtime build.
I am using appengine flexible and need a dockerfile that is compatible with appengine runtime and at the same time adds in java sdk.

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/AXrpk-I9Bbw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/92ff045e-d53f-4293-8b91-1d96fd4247f0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nick (Cloud Platform Support)

unread,
Nov 2, 2016, 2:00:23 PM11/2/16
to Google App Engine
Hey Vinay,

You can use our documentation (this article, "Hello World! for Custom Runtimes", shows an example Dockerfile) and the docs.docker.com Dockerfile reference itself to get a sense for how it works, although I can say this to sum them up: you're basically going to need to use "RUN" to run various commands that will download, install, and configure a JDK of your choice (OpenJDK, Oracle, etc.) on the system. 

I hope this is helpful. As always feel free to ask any follow-up questions!

Cheers,


Nick
Cloud Platform Community Support

On Friday, October 28, 2016 at 11:07:37 PM UTC-4, Vinay Chitlangia wrote:
Thanks Nick.
Do you have example of how when can write such a dockerfile.
I am particularly curious about how to install the java jdk in a manner that is compatible with java-compat runtime build.
I am using appengine flexible and need a dockerfile that is compatible with appengine runtime and at the same time adds in java sdk.
Reply all
Reply to author
Forward
0 new messages