简体   繁体   中英

How to build 32 Bits on Mac OS X 10.7.4 64 Bits using Maven

I have just got a Mac BookPro with os OS X Lion which has maven pre installed with the version

#mvn --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 19:31:09+0200)
Maven home: /usr/share/maven
Java version: 1.6.0_31, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: tr_TR, platform encoding: MacTurkish
OS name: "mac os x", version: "10.7.4", arch: "x86_64", family: "mac"

When I run a

mvn clean install

maven is somehow failing compiling. One of the fail reason is : java.lang can not found.

When I check java settings I saw that there is both 64 and 32 bit java versions. thanks.

In the Java properties :

There are two Java instances

Java SE Apple Inc. 64 Bits 1.6.0_31-b04-415

Java SE Apple Inc. 64 Bits 1.6.0_31-b04-415

First try to write HelloWord.java and compile it using command line javac HelloWord.java .

If it works move towards maven. Check environment variable JAVA_HOME that is used by maven to find java. I believe it points to "wrong" java version. Fix this and try again. I hope this will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM