Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

Solar eclipse today, surgery tomorrow. Let’s get this party started!

“Your parents name you, but they haven’t a clue who you are. Your friends nickname you because they know exactly who you are.”

~ Sting

I hate it when everyone in a dream keeps asking why you’re snoring. At first it’s embarrassing, then after a while it’s more like, “Bah! Leave me alone.”

As a quick note, here are some examples of the Java 8 lambda Thread and Runnable syntax.

Java 8 Thread/Runnable lambda syntax

First, here’s the Java 8 lambda syntax for a Runnable, where I create a Runnable and pass it to a Thread:

If you’re into lucid dreaming, LionsRoar.com has an interesting article, What is dream yoga and how do I do it?

What is dream yoga and how do I do it?

I wrote earlier about how to use the javapackager command to create a macOS application bundle from a Java application, so I won’t repeat all of that information here. Instead, in this article I just want to show how to display an image that’s stored in the Contents/Resources/Java directory of a Mac/Java application bundle.

In this image, the Chicago Cubs’ Kris Bryant talks about the power of thought. As I always try to tell people, all you are is attitude.

Cubs Kris Bryant on the power of thought

Question: How do I pass command-line parameters to my Scala application when I’m running the application with SBT?

Solution: There are two different possible scenarios here:

If you ever need to change the password you used to encrypt your Linux Mint hard drive — the full disk encryption of the entire hard disk you used when you installed Mint — I just found that the commands at this linuxmint.com page worked as desired.

In short, I used this command to see how my hard drive was encrypted:

I get to have another operation (surgery) next week, but I still hope to have the next version of my book on Scala and functional programming available by the end of the month.

If you’re interested in packaging Java applications on macOS, this is a good `javapackager` video on YouTube.

javapackager video (macOS and java)

As a note to self, this apple.com Maintaining Your Signing Identities and Certificates page contains information on signing identities, certificates, provisioning profiles, developer accounts, developer id certficates, the keychain access app, exporting certificates, and more.

Apple: Maintaining Your Signing Identities and Certificates

Zachary: I ran into one of my brother’s work buddies, he introduced me to Tai Chi. It saved me.

Longmire: How so?

Zachary: I like to put it like this ... I went to church a lot as a kid, and we were always taught to love our enemies. Tai Chi taught me something new — to love the enemy inside me, as well. So I don’t look at peace as the absence of conflict any more. I see it as the acceptance of conflict.

(From the tv series Longmire)

Table of Contents1 - Building a MacOS application bundle with javapackager2 - The longer story3 - The Mac/Java class4 - The three scripts5 - javapackager notes

I recently learned how to use the Java javapackager command to build a macOS application bundle — i.e., a regular macOS application — from a Java application. In this tutorial I’ll show how to create a Mac application bundle from a simple Java class, in this case a Java Swing class.

I don’t remember the original source of this image, but I like it: “I need to find more people who will sit and talk about the universe and souls and consciousness with me for hours.”

When I saw this again today I was reminded of the time I ended up in Vail, Colorado.

I need to find people who will talk about the universe and souls

Here’s a YouTube discussion of the story behind the song, “Brandy, You’re a Fine Girl.”

“Because I was afraid of worms, Roxanne! Worms!”

I was surprised to learn that when you sign a macOS application, the signing process doesn’t sign every file under the .app application directory. Here’s a quote from the Apple developer docs:

“Your app’s executable code is protected by its signature because the signature becomes invalid if any of the executable code in the app bundle changes. Note that resources such as images and nib files aren’t signed; therefore, a change to these files doesn’t invalidate the signature.”

I live in Colorado, where cellular reception can be very hit or miss. As just one example there are only two spots in my apartment where I can make a phone call. So when I’m at home trying to view a website using Safari on my iPhone and the page is loading really slow, I find it really annoying that my iPhone is trying to use my cellular data rather than my home wireless network (WiFi).

Note: Apple implies that the cellular data is “assisting” the WiFi, but with the poor cell reception here, I can confirm that this feature just slows down my iPhone internet speed.

Besides books on sports, the first book I remember reading that wasn’t assigned to me by a teacher is Man’s Search for Meaning, by Viktor Frankl.

Viktor Frankl: Man's Search for Meaning