Fix for M3D Micro+ failed to open stl modes after upgrading to High Sierra

I upgraded my Mac to High Sierra and then learned more about .NET and the Mac that I wanted to.

I got an error that there were two copies of a file:

FIFinderSyncExtensionHost is implement in both /System/Library/PrivateFrameworks/FinderKit.Framework/Versions/A/FinderKit and /System/Library/PrivateFramworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOveride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOveride. Of of the two will be used. Which one is undefined.

There was an error in loading the file. Check to see the file is valid.

First thing that didn’t work

I tried to re-install Mono choosing the latest release 5.4.1. (Mono is the runtime for .NET on Mac and the M3D software uses .NET). This actually made things worse cause M3D to crash on opening. Then I rebooted and got an error that I wasn’t on the latest Mono. But I was.

Second thing that didn’t work

I tried re-installing the M3D software. I got:

The Mono Framework installed is not support. You must install the latest version to continue. Would you like to visit the Mono website to downloaded it?

The Mono Framework is a required component for this software and must be installed first.

Turns out I installed the Micro software instead of the Micro+ software. Reinstalled correct software.

Third thing that didn’t work

Then I tried downloading Visual Studio for Mac. Didn’t help.

Fourth thing that didn’t work

At this point, I decided to be more methodical. I tried running M3D at the command line to see if I could get more data:

cd /Applications/M3D.app/Contents/MacOS

./m3d

The highlight is:

2018-01-15 17:24:37.585 M3D[1127:35860] run command:/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono /Applications/M3D.app/Contents/Resources/M3DGUI.exe

WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all

There was also

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

I ran the command to agree to the license, but that didn’t solve my problem.

Fifth thing that didn’t work

I learned that Mono 5.4.1 defaults to 64 bit. But M3D and Carbon require 32 bit. There’s a flag “–arch=32/64” but doesn’t help with M3D so I uninstalled Mono again:

sudo rm -rf /Library/Frameworks/Mono.framework

sudo pkgutil --forget com.xamarin.mono-MDK.pkg

sudo rm -rf /etc/paths.d/mono-commands

Then I installed an older version (5.0.1) of mono. WHich got me back to the original message.

Sixth thing that didn’t work

Loading a file I’ve used before

What did work

I contacted M3D support and they gave me a workaround in just a few business hours. They suggested clicking on a recent model rather than loading through the OS. That worked fine. Then they suggested dragging the file directly from the Finder into the open UI.

That worked! I can print again. Thanks M3D.

 

zooming in on the mac

At my JavaOne Session on mutation testing, I needed to show both code and “other materials” to a large room on the Mac.

In Eclipse

Increasing the font size for the editor pane in Eclipse is easy. Cmd = makes the code bigger and Cmd – makes the code smaller.

Elsewhere

I also needed to show the problems view and the report. For this, I used the magnifying glass.

The initial set up was

  • Settings
  • Accessibility
  • Zoom
  • Check “Use Scroll gesture with modifier keys to zoom. I had mine set to control for the modifier, but you can change this.

Then I could zoom in on anything by holding control and moving two fingers away from me (up) on the trackpad.

To get rid of the magnifier is also easy; just hold control and two finger scroll down.

junit 5 and intellij

I use Eclipse at home for development. And mostly Maven (except for two projects that use Ant because some of the people working on them have less reliable internet connections).

After preparing to run JUnit 5 with Eclipse and Maven, I wanted to check the impact on IntelliJ. It’s been a long time since I’ve tried using IntelliJ. The internet says it supports JUnit 5 so I wanted to try it to confirm. I need to know this:

  1. So I know what IDEs people can use at my JavaOne JUnit 5 hands on lab
  2. So I know whether upgrading the CodeRanch JForum fork to JUnit 5 will be a problem for the developers using IntelliJ

Installing IntelliJ

  1. Download Mac version of free community edition from JetBrains
  2. Drag .dmg folder to Applications folder
  3. I chose not import settings. I don’t even remember the last time I ran IntelliJ on my Mac so those settings aren’t likely to be useful.
  4. After accepting the privacy policy, IntelliJ opens and I chose all the defaults.

Running the project

To run the project I migrated, I chose:

  • Check out from version control > git
  • https://github.com/boyarsky/oracle-java-cert-objectives-history.git and clone
  • IntelliJ asked if wanted to create a project based on the pom and I said yes
  • Choose command 1 for project view
  • Tried to open a Java class and got prompted to configure the SDK. I chose the latest Java 8 on my machine. No need to use Java 9 for what I’m doing. /Library/Java/JavaVirtualMachines/jdk1.8.0_xxx.jdk/Contents/Home
  • Build using build pulldown
  • Run using run pulldown

The result

IntelliJ was able to recognize the JUnit 5 annotations/methods and run them. It’s a bit ahead of Eclipse in this space so JUnit 5 won’t be a problem if they are using the latest version of IntelliJ.