Rat-Hole Mac OS
Rat-Hole Mac OS
Classic Mac OS, as it's now known, had a decade-long honeymoon period. From its release in 1984 until 1994, it enjoyed a healthy development life that included several major revisions. But by 1994, the limitations of the OS were apparent to technophiles both inside and outside Apple. Sure, there was a lot of legacy cruft from the 80s in what was then known as System 7, but the real problems were more fundamental. These problems were so well-known that I'm sure anyone who was a 'PC enthusiast' back in those days can rattle them off. Classic Mac OS lacked two very important features. Say it with me, folks:
Memory protection and preemptive multitasking
In the early 1990s, Apple created the Copland project to add these two features to its operating system. Yes, a lot of new end-user features were going to be added as well, but memory protection and preemptive multitasking were Copland's raison d'être.
Popular Rules Made by Presidents. Thumb Master: Any time the President puts down their thumb the last person to follow must drink. Eye Contact: Anyone who makes eye contact with the President must drink. Beer Bitch: The President picks one person for the job of getting everyone beer at the table. Little Man: Everyone has a pretend 'little man' on the lip of their beer, and they must remove him. See full list on colonialpest.com. I considered installing 4.4.0, then 4.4.1, but the install guide for 4.4.0 was very strict about the Java version, and I am reluctant to go down that rat-hole (no offense intended to rats). Actually, if you don't need to use Java code in your Octave applications (and most users don't), you can ignore that Java requirement entirely! Apr 30, 2015 Let Microsoft’s wrong choice of a CEO lead them further down the rat hole that Ballmer T. Clown began digging years ago. Related article: Desperate Microsoft announces tool for porting iOS apps.
For a Limited Time - Discount of 50%. PDF Security Pro Edition is fantastic utility to add, remove or modify password security of PDF documents in batch. In addition, It allows to batch modify metadata information of PDF documents. PDF Security Pro is an easy to use utility to encrypt.
Funny story—as it turns out, it wasn't too easy to add these features to classic Mac OS while also maintaining backward compatibility with existing software. Oh, and did I mention that Apple switched processor architectures around this time as well? By 1996, the Copland project was dead, and classic Mac OS still lacked memory protection and preemptive multitasking.
Thus began a downward spiral that included several more frantic, abortive attempts to solve Apple's OS dilemma. We all know how it ended. A series of unlikely events led to the return of Steve Jobs and the refashioning of NeXTSTEP into Apple's new operating system—yes, an operating system with memory protection and preemptive multitasking. Phew.
So, here we are in 2005, with severalmajorrevisions of Mac OS X behind us. Maybe we Mac users are feeling a bit smug, knowing that we once again have The Best Operating System™. Of course, I felt that way in 1991 when System 7 was released, too. But a mere five years later, things were going downhill fast. Hm.
Will Mac OS X suffer the same fate? Surely not, you say. Mac OS X is The World's Most Advanced Operating System! But this is exactly the kind of thinking that lets an OS crisis sneak up on you. It's worthwhile to think about what Mac OS X will need in order to remain competitive two, five, even ten years in the future.
AdvertisementObviously Mac OS X will need (and will get) a ton of new features in the coming decade or so. The trick is to find the equivalent of 'memory protection and preemptive multitasking.' That is, the features that will be essential in the future, but that are very hard to add while still supporting existing software.
I'm tempted to make this a two-part post, asking the readers to write their opinions in the comments area first, and then revealing mine in a follow-up post. But that'd be cruel (or lame, take your pick), and I'm sure plenty of people would have the same ideas I do. Why let them steal my thunder?
So, here it is. Here's what I think will quickly become Mac OS X's most glaring technical limitation, and what could lead to another Copland-style disaster if Apple isn't careful. Here's what Mac OS X is missing today that will be very difficult to add later without causing big problems for existing software and developers:
Rat-hole Mac Os Download
A memory-managed language and API
<cue dramatic music>
Both of Mac OS X's primary application development APIs require the programmer to manually manage memory. Carbon is a C-based API, and memory management doesn't get much more manual than plain-old C these days. Cocoa uses Objective-C, which abstracts memory management with a retain/release system, but the programmer must still explicitly trigger or schedule these actions. Under the covers, Objective-C is just a runtime engine on top of C anyway, so it's no surprise that manual memory management is still part of the development experience.
But why is this a bad thing? Doesn't manual memory management offer more opportunities for optimization? Aren't languages with totally automatic memory management 'slower' than their lower-level brethren? Yes and yes. But 'more abstracted' is a better way to think of those 'slower' languages, and 'more abstracted' always wins in the end, especially when it comes to operating systems and application development.
I don't want to go down the rat-hole of programming language religion, but suffice it to say that languages (and their associated APIs) that support automatic memory management are the future of software development. In fact, in many cases, they're the present. Java has made great strides in the server arena, and languages like Perl, Python, and Ruby are coming from the other direction. C, C++, and yes, even Objective-C, are being squeezed in the middle.
AdvertisementAs was the case with the memory protection and preemptive multitasking crisis, Microsoft is way out ahead on the memory-managed language/API front. MS has its own new programming language, C#, and is working on an all-new memory-managed API to supplant the venerable C-based Win32 API. These are both projects that were started years ago, and that are finally coming to fruition today.
Whither Apple? Back when C# and the API that would come to be known as WinFX were on the drawing board at Microsoft, Apple was kind of busy trying to finally get over that pesky 'memory protection and preemptive multitasking' thing. Today, Carbon and Cocoa are just settling down; Tiger is the first Mac OS X release to be accompanied by a promise from Apple that APIs won't be intentionally broken in future releases.
Put bluntly, Apple is way behind here. Yes, 'Copland' behind.
Even if Apple is smart and 'borrows' an existing memory-managed programming language (hello, C#), there's still that pesky API issue. Apple recently killed their Objective-C/Java bridge, and with good reason. Bridges stink. So forget about an Objective-C/C# bridge. And no, don't talk to me about adding garbage collection to Objective-C. That is exactly the sort of 'half-way' mindset that led to Copland. No, Apple needs to pull a WinFX and rethink the whole widget, so to speak, from top to bottom.
New APIs are extremely risky and hard to pull off, of course. Plus, Apple's just coming off a big transition, moving from the Mac Toolbox to Carbon and, for new development, to Cocoa. It's way too soon to even think about another move, right? Sure, if you're a developer. But if you're Apple, you'd damn-well better be thinking about it—not only thinking about it, but beginning work.
Oh yeah, that's right, there's some other transition going on right now, isn't there? Well, fine, delay the whole memory-managed language/API thing a year or two if necessary. But someone, somewhere at Apple had better be thinking long and hard about this issue. If Apple does get itself into another Copland-style jam around 2010, I'm not sure there'll be any pre-fab 'modern operating systems' hanging around for them to purchase and refurbish this time.
Lost 6 hours of my life tracking down this issue, and of course in the end it turns out to be my user error, although as always as a developer you challenge whether it needed to be this hard to debug.
Objective
What was I trying to achieve was to create mac app bundle to put in a dmg to distribute my java desktop app. In Eclipse, generated a Mac app bundle using the export task.
Into Finder, double clicked the app and nothing happens. A quick search around Console, shows:
A quick google makes suggestions like there’s no main entry point defined in the jar file
This however is a rat-hole, there is indeed no main entry point defined in the manifest but a few more searches reveal the package isn’t invoked using java -jar xx.jar, it’s invoked using java -cp xx.jar mainEntryPoint. So we check the Info.plist in the app bundle, and find the main class is defined. So what’s going wrong?
This article http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html seems to imply a tool is needed at Java 7, so yep, great but why wouldn’t that be in eclipse already, i.e. why would eclipse claim to produce an app bundle if it did it the wrong way? Is it? Time to go build one manually and see.
Manually creating an App Bundle, Java 7 (1.7.0_45-b18), Mac OS X 10.9.2
Downloaded appbundler-1.0.jar from https://java.net/projects/appbundler/downloads, as described in the Oracle article above and put it in a test directory.
Set up the build.xml file from the various entries on the java.net and Oracle articles referenced above and running ant causes a no such file exception. It’s looking for an Info.plist file to be in the build directory. Odd, this isn’t mentioned anywhere!
Helpful: http://supunmali-myexperience.blogspot.co.uk/2012/10/jar-bundler-mac-os-x.html, resolved by setting JAVA_HOME but then I hit another problem:
If you’re not an experience Ant user (and I am not!), what this means is I forgot a target statement in the build.xml file, here’s the file I used at this stage which worked ….. or so I thought, it certainly allowed Ant to build the app bundle.
And this gave me:
Frustratingly, trying to launch the generated .app bundle, I got exactly the same errors. What was going on here? I checked the Mac OS X Gatekeeper security level, it’s set to allow apps downloaded from anywhere so this should work!
Solution
There are many articles on various things which cause the 10810 error, from process table full to permissions and missing libraries.
What a huge diversion all these ratholes are you can go down. This is all so sketchy, returning errors meaning “unknown error”, meaningless “return code 1” in the syslog.
Mac Os Download
Bottom line is: do not try and follow the examples, work stuff out. Mine was failing because ……. I had assumed the main method name needed specific in the mainclassname statement, as is shown in the Oracle example. As soon as I made it the class name, and not the method it worked. i.e.
Should I post this? After all it was my error in specifying it wrongly. Yes, because if anyone else is searching for answers in this murky, poorly documented space, made messy by Apple divorcing Java without a properly focused handing of the baton to Oracle….. this might just help!
I’m now scared … Mac, Sandbox, App Store: And the world just got infinitely more complicated …. http://www.intransitione.com/blog/take-java-to-app-store/
Rat-Hole Mac OS