[1.2.4-java] Will play framework run on _any_ platform with a JDK 5.0?

167 views
Skip to first unread message

Kiran Rao

unread,
Aug 30, 2012, 7:56:58 AM8/30/12
to play-fr...@googlegroups.com
On the play framework site, we have pre-built packages for Linux, Windows and Mac OS.
My question is - will play framework run on other platforms as long as there is a JDK available for that platform?

Remember, I only need the runtime and not the development options - which means I do not require python.

Ben McCann

unread,
Aug 31, 2012, 2:37:21 AM8/31/12
to play-fr...@googlegroups.com
If you run "play dist" it will create a zip file which contains the jars and start script for your project.  You would need to port the start script to any other platform, but that should be pretty easy since it's basically a one line script that just calls "java --classpath lib1.jar lib2.jar lib3.jar play.jar PlayServerMainClass"

Kiran Rao

unread,
Aug 31, 2012, 2:47:50 AM8/31/12
to play-fr...@googlegroups.com
Ah! I was not aware of the "play dist" command. Thanks!

Just to make it sure - this will create a self-containing package that includes all JARs etc? And, this requires a JDK or just a JRE would suffice?

My confusion stems from the fact that in most Java development scenarios, we normally think:
 - JDK is required for development
 - JRE is sufficient for running the app

However, play! framework, in addition to reflection and stuff, also performs _compilation_ at runtime (or so I assume). Is this correct? Won't a play! framework app run on just a JRE?

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/MsWNqUcGn7kJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.



--
Regards,
=======
Kiran Rao
http://curioustechizen.blogspot.com/
http://stackoverflow.com/users/570930/curioustechizen

Ben McCann

unread,
Aug 31, 2012, 2:54:21 AM8/31/12
to play-fr...@googlegroups.com
Yes, all jars are included and only a JRE is required.  Play has two modes: development and production.  Play recompiles your code when you change it and are running in development mode, but there is no compilation ever happening when you run in production mode nor does there need to be since you're not changing your code while running.

Marcel Klemenz

unread,
Aug 31, 2012, 3:05:12 AM8/31/12
to play-fr...@googlegroups.com
~/git/playwin$ play dist
~        _            _
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/  
~
~ play! 1.2.5, http://www.playframework.org
~
~ Usage: play cmd [app_path] [--options]
~
~ with,  new      Create a new application
~        run      Run the application in the current shell
~        help     Show play help
~
~ Invalid command: dist
~

Are you sure this is a play 1.2.x command and not the play dist from play 2?

play help does not show anything like this.

Ben McCann

unread,
Aug 31, 2012, 3:07:35 AM8/31/12
to play-fr...@googlegroups.com
Oh, sorry, I missed that this was a 1.x thread.  I don't know if my answers still apply to 1.x.  It will work in 2.x though.


To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/tuneJh22LvIJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Kiran Rao

unread,
Aug 31, 2012, 3:09:34 AM8/31/12
to play-fr...@googlegroups.com
Uh oh! We're back where we started then.

Nicolas Leroux

unread,
Aug 31, 2012, 3:14:48 AM8/31/12
to play-fr...@googlegroups.com
You need at a minimum the jdk5 and python 2.7 to be present. If you don't have python you can use the provided build.xml in your project. It will allow you to start / stop your play application. Have a look at the build.xml in you play project.


--
Nicolas Leroux



Kiran Rao

unread,
Aug 31, 2012, 3:28:28 AM8/31/12
to play-fr...@googlegroups.com
@Nicolas,

I cursory glance at application-build.xml didn't throw up any references to the JDK being used. In particular, I didn't find <javac> ant task being invoked. Is there any info on what JDK features are used by play! apps at runtime and how they are invoked (perhaps, programmatically?)?

Grzegorz Słowikowski

unread,
Aug 31, 2012, 4:14:03 AM8/31/12
to play-fr...@googlegroups.com, Kiran Rao, Grzegorz Słowikowski
Hi

Mavenize your project using my Maven plugin for Play! Framework http://code.google.com/p/maven-play-plugin/.
It has "dist" goal (execute "mvn play:dist").
For sample projects look here: http://maven-play-plugin.googlecode.com/svn/trunk/test-projects/packagings/dist/using-play-dist/

Greetings

Grzegorz Slowikowski
Reply all
Reply to author
Forward
0 new messages