Installing MAF 2.1.2 and MCS Lab Utility on Mac (OS X Yosemite 10.10.4)
During the OFM Summer Camp for Mobile Cloud Service (MCS) it was all going very smooth. In fact too good!! until I had to set up MAF 2.1.2 in JDevleoper and configure the utility provided in the lab (maf-mcs-utility-2.1.3.1.4). At this point nothing worked…The fact that I use Mac didn’t make things easier either as most people were on Windows and the lab sort of assumed the same….. So after at least 6 hours banging my head against the wall I finally found a solution.
Word of Caution
I initially tried to make this work in an existing Jdeveloper 12.1.3 soaquickstart installation. I tried to set up MAF 2.1.2 in this environment (following the docs steps) and it got to the point that I was getting all sort of weird errors (many related to MDS not loading and others around compilation). So at this point I decided to do a full clean install of everything (including Java).
Below the steps:
Preparation:
- Uninstall JDK 1.8 or JRE 1.8 (if you don’t have a JDK installed yet) by following these instructions
- JDK uninstalling steps: https://docs.oracle.com/javase/8/docs/technotes/guides/install/macjdk.html#A1096903
- JRE uninstalling steps: https://www.java.com/en/download/help/macuninstalljava.xml
- Download JDK 1.7 from: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
- Download JDK 1.8 (for later use) from: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Download JDeveloper 12.1.3 from: http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html
- Install Xcode from https://developer.apple.com/xcode/
- If Xcode is already installed make sure SDK is installed by clicking on Xcode Menu > Preferences > Download
- If no simulator is installed, click on the latest simulator to install it
Installation:
- Double click on jdk-7uxx-macosx-x64.dmg to install JDK 1.7
- Open a command prompt and check that it was properly installed by running java -version
- Open a command prompt and change directory to the folder where jdevsuite121300.jar was downloaded to.
- Then execute: java -jar jdevsuite121300.jar
- Follow steps as indicated. Make sure to take note of the Oracle inventory and Oracle home paths as you might need them later
- Also if you’re planning to run different installations of Jdeveloper, use a distinctive Oracle home (i.e. fmw1213-maf212)
- Open Jdeveloper and click on the menu Help > Check for Updates
- Tick on “Official Oracle Extensions and Updates” and click Next
- Tick on “Mobile Application Framework” then click Next
- Click on “I Agree” then click Next and finish
- Don’t restart JDevleper when prompt. Instead close it
- Now install JDK 1.8 by double clicking on jdk-8u51-macosx-x64.dmg
- Open Jdeveloper
- When prompted to enter JDK 1.8 enter the path which usually is "/Library/Java/JavaVirtualMachines/jdk1.8.051.jdk/Contents/Home" and click Ok
- Right click on ViewController from the projects window then select “Project Properties” then click on Libraries and Classpath. Make sure that the Java SE version is "MAF JDK 1.8 Compact 2 Profile”. If this is not the case chances are you will hit issues. You may try the following solution but there is no guarantee it will work https://community.oracle.com/thread/3669368
- Go to http://docs.oracle.com/cd/E6577401/tutorials/tutmcsbasic/tutmcsbasic2.html and click on “Downloads” to get file labfiles.zip.
- Unzip labfile.zip
- Open Jdeveloper (if not already opened)
- Using Jdeveloper open file <path where unzipped>/maf-mcs-utility-2.1.3.1.4/PublicSample/mafmcsUtilitySample.jws
- Click on the menu Jdeveloper > Preferences and then Mobile Application Framework > iOS Platform
- Click on the Browse icon and search for the folder "Automatically Add to iTunes” note that in my case it appeared as "/Users/luisweir/Music/iTunes/iTunes Media/Automatically Add to iTunes.localized” for some reason
- Click on menu Run Click on menu Build > Clean all
- Right click on ViewController and then click Run > iOS Simulator
- Hopefully the Simulator Window will open!! if it doesn’t, well, good luck finding a solution (and if you do, kindly add it to this blog for others to learn from it)
Lastly for instructions on how to set up the MAF Samsung emulator on Mac follow these instructions: http://docs.oracle.com/middleware/maf212/mobile/install/mafig_setup.htm#MAFIG164
Comments
Post a Comment