MacOS Build Javaweb Environmental Records __java

Source: Internet
Author: User
Tags first row

MacOS Build Javaweb Environment

Windows

MacOS

mac version download address

Jdk

Jdk

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Eclipse

Eclipse

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/ Eclipse-jee-kepler-sr1-macosx-cocoa-x86_64.tar.gz

Tomcat

Tomcat

Http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.68/bin/apache-tomcat-7.0.68.zip

Maven

Maven

Http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

Mysql

Mysql

Http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-osx10.11-x86_64.dmg

Navicate

Mysqlworkbench

Http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-6.3.6-osx-x86_64.dmg

Sqldeveloper

Toad

App Store

UltraEdit

Macvim/emacs

Https://emacsformacosx.com/emacs-builds/Emacs-24.5-1-universal.dmg

Xftp

FileZilla

App Store

First, JDK 1.1 Installation

To see if the installation was successful, enter in the terminal

Java-version

The success of the following figure:

1.2 Configuration

sudo vi/etc/profile

Configuration content is as follows:

Java_home= "/library/java/javavirtualmachines/jdk1.7.0_79.jdk/contents/home"
class_path= "$JAVA _home/lib"
path= ".; $PATH: $JAVA _home/bin "

Verify:

echo $JAVA _home
/library/java/javavirtualmachines/jdk1.7.0_79.jdk/contents/home

Second, Maven 2.1 Extract to/usr/local

Cd/usr/loacl
sudo tar-xvf ~/downloads/apache-maven-3.3.9-bin.tar 
2.2 Configuration Environment Reference http://maven.apache.org/install.html

$ VI ~/.bash_profile

Export Java_home=/library/java/javavirtualmachines/jdk1.7.0_79.jdk/contents/home
maven_home=/usr/local/ apache-maven-3.3.9
path= $PATH: $MAVEN _home/bin

export maven_home
export PATH

$ source ~/.bash_profile

* First row not joined, view version times wrong:

$ mvn-version Exception in thread "main" JAVA.LANG.UNSUPPORTEDCLASSVERSIONERROR:ORG/APACHE/MAVEN/CLI/MAVENCLI: Unsupported Major.minor version 51.0 at Java.lang.ClassLoader.defineClass1 (Native method) at Java.lang.ClassLoader.defineClassCond (classloader.java:637) at Java.lang.ClassLoader.defineClass ( classloader.java:621) at Java.security.SecureClassLoader.defineClass (secureclassloader.java:141) at Java.net.URLClassLoader.defineClass (urlclassloader.java:283) at java.net.urlclassloader.access$000 ( urlclassloader.java:58) at Java.net.urlclassloader$1.run (urlclassloader.java:197) at Java.security.AccessController.doPrivileged (Native method) at Java.net.URLClassLoader.findClass ( urlclassloader.java:190) at Org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf (Classrealm.java : 401) at Org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (selffirststrategy.java:42) at Org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (Classrealm.java:271) at Org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (classrealm.java:254) at Org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (classrealm.java:239) at Org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass (launcher.java:144) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (launcher.java:266) at Org.codehaus.plexus.classworlds.launcher.Launcher.launch (launcher.java:229) at Org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (launcher.java:415) at
 Org.codehaus.plexus.classworlds.launcher.Launcher.main (launcher.java:356)

The reason for the error is that my java_home is configured in/etc/profile, and the Java_home path is added to the. Bash_profile. As follows

$ mvn-v
Apache maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5 2015-11-11t00:41:47+08:00)
maven Home: /usr/local/apache-maven-3.3.9
java version:1.7.0_79, vendor:oracle Corporation
java home:/library/java/ Javavirtualmachines/jdk1.7.0_79.jdk/contents/home/jre
Default locale:zh_cn, platform Encoding:utf-8
OS Name: "Mac OS X", Version: "10.11.4", Arch: "X86_64", Family: "Mac"

2.3 Configuring the Local resource path

Open the Setting.xml in conf and add the custom resource path as follows

<!--localrepository
   | The path to the local repository maven would use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  <localrepository><span style= "FONT-FAMILY:MENLO; font-size:11px; Font-variant-ligatures: No-common-ligatures; " >/users/bdong/.m2/repository</span><span style= "font-family:arial, Helvetica, Sans-serif;" ></localRepository></span>

* Before the wrong path configuration to/usr/local/reposotory, unable to download, change back to the user path is good 2.4 Configure the Eclipse plug-in

*eclipse help->eclipse Marketplace search keyword MAVEN to plug-in maven integration for Eclipse, encountered the following error: cannot complete the install   Because one or more required items could is not found. Software being Installed:m2e-maven integration for Eclipse (includes incubating components) 1.6.2.20150902-0002 (org.ec Lipse.m2e.feature.feature.group 1.6.2.20150902-0

I checked the data online.

With less maven-dependent eclipse Plug-ins, the solution is as follows:

Direct online installation Maven2 will be unable to install the problem that the dependency plugin cannot find. You must install the GEF plug-in before you can install the M2eclipse-core plug-in, but installing the M2eclipse-extras plug-in also relies on the Subclipse plug-in. Therefore, the correct installation order for three Plug-ins is: GEF plugin subclipse plugin M2eclipse plugin.
M2eclipse-core plug-in--dependent-->GEF plugin
M2eclipse-extras plug-in--dependent-->subclipse plugin

Start Eclipse, click window-->preferences-->install/update-->available Software Sites, click Add
Add the following information:

GEF http://download.eclipse.org/tools/gef/updates/interim/
Subclipse http://subclipse.tigris.org/update_1.6.x

Download these several plugins
And then reinstall the MAVEN plugin

M2E http://download.eclipse.org/technology/m2e/milestones/1.4 (replaced by a lower version)


Other omitted software is basically directly installed, no need to record

Resources:

[1]http://blog.sina.com.cn/s/blog_55b1b0d50100ynjg.html

[2]http://www.cnblogs.com/jerome-rong/archive/2012/12/18/2823242.html

[3]http://peirenlei.iteye.com/blog/790331

[4]http://blog.csdn.net/wode_dream/article/details/38052639





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.