osx interview questions
Top osx frequently asked interview questions
Java is an optional package on the latest versions of OSX.
Yet once installed it appears like the JAVA_HOME environment variable is not set properly.
Source: (StackOverflow)
I am new to Mac OS X and I am trying to install maven on it through the terminal by following these instructions.
So far I got this
export M2_HOME=/user/apple/apache-maven-3.0.3
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=/usr/java/jdk1.6.0_22
This is probably a stupid question where do you go to find this?
Source: (StackOverflow)
I know the combination Ctrl+A to jump to the beginning of the current command, and Ctrl+E to jump to the end.
But is there any way to jump word by word, like Alt+←/→ in Cocoa applications does?
Source: (StackOverflow)
On Linux, I can use netstat -pntl | grep $PORT
or fuser -n tcp $PORT
to find out which process (PID) is listening on the specified TCP port. How do I get the same information on Mac OS X?
Source: (StackOverflow)
Will Swift-based applications work on OS X 10.9 (Mavericks)/iOS 7 and lower?
For example, I have a machine running OS X 10.8 (Mountain Lion), and I am wondering if an application I write in Swift will run on it.
Source: (StackOverflow)
How do I find processes that listens to/uses my tcp ports? I'm on mac os x.
Sometimes, after a crash or some bug, my rails app is locking port 3000. I can't find it using ps -ef... How do I find the stupid thing and kill it, brutally... ?
When doing rails server
I get
Address already in use - bind(2) (Errno::EADDRINUSE)
2014 update:
To complete some of the answers below: After executing the kill commands, deleting the pid file might be necessary rm ~/mypath/myrailsapp/tmp/pids/server.pid
Source: (StackOverflow)
I'm new to OS X, having just gotten a Mac after working with Ubuntu Linux for some time. Among the many things I'm trying to figure out is the absence of colors in my terminal window - like the ones that are shown (on Linux) when you run 'ls -la' or 'git status'... I just can't figure out how to activate them in the actual shell.
Source: (StackOverflow)
How do I get the command line builds tools installed with Xcode 4.4 / Mac OS X v10.8 (Mountain Lion) or later?
Unlike Xcode 4.3 there is no installer (it's just a bundle).
It looks like all the command line tools are there (in the bundle, under Contents/Developer), but none of the appropriate environment variables set to use them.
Is there a script somewhere I can run that will setup my environment to support building from the command line?
Source: (StackOverflow)
Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?
The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although I'm not too sure how legal this is.
Source: (StackOverflow)
Many Java applications that use shell scripts to configure their environment use the JAVA_HOME
environment variable to start the correct version of Java, locate JRE JARs, and so on.
On OSX 10.6, the following paths seem to be valid for this variable
/Library/Java/Home
/System/Library/Frameworks/JavaVM.framework/Home
/System/Library/Frameworks/JavaVM.framework/Versions/Current
Some of these are symlinks to the actual current VM (as defined in the Java Preference pane).
But which one should be used—or is it okay to use any of them?
Source: (StackOverflow)
How do you get the length of a String
? For example I have a variable defined like:
var test1: String = "Scott"
However I can't seem to find a length method on the string.
Source: (StackOverflow)
I'm trying to link a UILabel
with an IBOutlet
created in my class.
My application is crashing with the following error. What does this mean? How can I fix it?
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6e36ae0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key XXX.'
Source: (StackOverflow)
I spent most of the day yesterday searching for a clear answer for installing pip. I can't find a good solution.
Can somebody help me install it?
Source: (StackOverflow)
What is the proper way to modify environment variables like PATH in OSX? I've looked on Google a little bit and found 3 different files to edit:
- /etc/paths
- ~/.profile
- ~/.tcshrc
I don't even have some of these files, and I'm pretty sure that .tcshrc is wrong, since OSX uses bash now. Anybody have any idea where these variables, especially PATH, are defined?
Edit: I'm running OS X 10.5
Source: (StackOverflow)