Skip to content

Instantly share code, notes, and snippets.

@tcthien
Forked from reiz/gist:d67512deee814705134e
Last active December 23, 2016 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tcthien/96298f11ebdd8f0773c3d65b961315ff to your computer and use it in GitHub Desktop.
Save tcthien/96298f11ebdd8f0773c3d65b961315ff to your computer and use it in GitHub Desktop.
Vagrantfile for a Java dev. environment with Oracle Java 8, Maven and Eclipse.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.memory = "4096"
end
config.vm.provision "shell", inline: <<-SHELL
sudo echo "LANG=en_US.UTF-8" >> /etc/environment
sudo echo "LANGUAGE=en_US.UTF-8" >> /etc/environment
sudo echo "LC_ALL=en_US.UTF-8" >> /etc/environment
sudo echo "LC_CTYPE=en_US.UTF-8" >> /etc/environment
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y upgrade
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo apt-get -y install oracle-java8-installer
sudo apt-get install -y xfce4 virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
sudo apt-get install gnome-icon-theme-full tango-icon-theme
sudo echo "allowed_users=anybody" > /etc/X11/Xwrapper.config
sudo wget -O /opt/eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz http://ftp.yz.yamagata-u.ac.jp/pub/eclipse//technology/epp/downloads/release/neon/2/eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz
cd /opt/ && sudo tar -zxvf eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz
sudo apt-get -y install maven
SHELL
end
@tcthien
Copy link
Author

tcthien commented Dec 23, 2016

Account:

  • vagrant/vagrant
  • ubuntu/ubuntu

Start UI in Virtual Box with startxfce4&

Eclipse can be found in /opt/eclipse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment