Getting started with playframework with java on CentOS

  1. #Install play framework
  2. #Move to tmp folder
  3. cd /tmp

  4. #Download latest Typesafe Activator
  5. wget http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10.zip
  6. #Unzip it
  7. unzip typesafe-activator-1.2.10.zip
  8. rm typesafe-activator-1.2.10.zip

  9. #Move unzip folder activator-1.2.10 to /opt
  10. mv activator-1.2.10 /opt
  11. #Create soft symbolic link from /opt/activator-1.2.10/activator to /usr/local/sbin/activator
  12. ln -s /opt/activator-1.2.10/activator /usr/local/sbin/activator
  13. #Try to run activator
  14. activator

  15. #see version
  16. activator --version

  17. #create a helloworld app
  18. #create new app using activator
  19. cd /usr/local/
  20. activator new my-first-app play-java
  21. #here we are using play-java template
  22. #run the helloworld app
  23. cd my-first-app/
  24. #you must go to the created project directory
  25. #run helloworld project
  26. activator run
  27. #browse to http://localhost:9000
  28. curl http://localhost:9000

  29. #See a page saying : 'Your new application is ready...Welcome to play! :)'

  30. #Development:
  31. #generate eclipse project files
  32. activator eclipse

  33. #cleaning
  34. #Do activator clean or
  35. activator clean-files

No comments:

Post a Comment