软件主页:http://jenv.io/
Install jenv
# curl -L -s get.jenv.io | bashPlease open a new terminal, or run the following in the existing one: source /root/.jenv/bin/jenv-init.sh Then issue the following command: jenv helpEnjoy!!!# source /root/.jenv/bin/jenv-init.sh# jenvUsage: jenv[version] command : all ls candidates list update install reinstall uninstall clean pause execute exec use init config which cd version default add repo selfupdate help requirements candidate : groovy, grails, griffon, gradle, vertx, accumulo, activator, activemq, ahc, akka, android, ant, antlr, archiva, artifactory, avatar, baratine, blur, bookkeeper, boot, brooklyn, btrace, buildr, bukkit, burp, byteman, cassandra, ceylon, checker, clojure, crash, csrf_tester, ctakes, datastaxdev, dcsdk, derby, drill, druid, duke, eclipselink, elasticmq, elasticsearch, equinox, exhibitor, fabric8, felix, flume, flyway, forge, frege, gae, gaiden, gant, gatling, gcviewer, geronimo, giraph, gitbucket, glassfish, glide, glu, go, go-agent, go-server, golo, gora, gosu, gridgain, groovyhelp, groovyserv, gwt, h2, hadoop, hama, hawt, hazelcast, hbase, hedwig, hive, hornetq, housemd, immutant, infinispan, ireport, jad, jarinfo, java, javadoc, jbake, jboss, jconvert, jdsdk, jena, jenkins, jetty, jflex, jhiccup, jmeter, jppfadmin, jppfdriver, jppfnode, jrockit, jruby, jspwiki, juddi, jvmtop, jython, kafka, karaf, kibana, knox, kotlin, kv, lazybones, lein, liquibase, logstash, luke, mahout, mat, maven, mongodb, mrql, nailgun, neo4j, nexus, nutch, ofbiz, openfire, opensearch, orientdb, pgstudio, pig, play, plugproxy, presto, proguard, quercus, redline, relproxy, resin, restclient, riak, robovm, roo, s3cmd, s4, sbt, sbuild, scala, scribble, seam, shark, simpleci, sockettest, solr, sonar, spark, sqoop, squirrelsql, storm, tair, tajo, tika, tomcat, tomee, torquebox, ttorent, uima, vark, vfs, virgo, voldemort, weblogic, weka, wildfly, wlp, wookie, xd, xwiki, zico, zookeeper, zorka version : optional, defaults to latest stable if not providedeg: jenv alleg: jenv install maven 3.0.5Author: linux_china, @linux_china on weibo and twitterFor more information, please visit http://jenv.io
注意此处可能不能直接下载jenv-0.1.0.zip,修改dns即可,8.8.8.8是可以的
Install Java
# jenv list javaAvailable java Versions========================= 1.8.0_25 1.8.0_20 1.8.0_11 1.8.0_05 1.8.0>* 1.7.0_67 1.7.0_65 1.7.0_60 1.7.0_55 1.7.0_51 1.7.0_45 1.7.0_40 1.7.0_25 1.6.0_45# jenv install java 1.7.0_67Installing: java 1.7.0_67Parsing http://jenv.mvnsearch.org/candidate/java/download/1.7.0_67/Linux/x86_64Downloading: java 1.7.0_67Downloading http://get.jenv.mvnsearch.org/download/java/java-1.7.0_67-x64.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 138M 100 138M 0 0 1613k 0 0:01:27 0:01:27 --:--:-- 1667kDo you want java 1.7.0_67 to be set as default? (Y/n): Setting java 1.7.0_67 as default.Done installing!
当然还可以安装其他类java的应用。想meaven,resin,tomcat,weblogic