How To Install Java 7 on Mac OS X

For most, this would come in handy with those using the lat­est brows­er exten­sion­s/add-ons that use Java, espe­cial­ly ver­sion 7 (in the time of this writ­ing). There are two ways to go about this. First, for most users, they just need the JRE. The sec­ond are those doing devel­op­ment work and need the JDK.

Before we start the instal­la­tion process, let’s start with some pre­flight check and do the fol­low­ing in Ter­mi­nal prompt:

$ java -version

This will give you 1.6.x of some degree. Now, let’s start the instal­la­tion.

If you just need the JRE:

  1. Down­load the JRE here.
  2. Fol­low the instruc­tions, and install onto your OS X sys­tem.
  3. In your ~/.profile,1 add the fol­low­ing:
    export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
  4. Open a new Ter­mi­nal win­dow, and run the fol­low­ing to check you are run­ning the intend­ed ver­sion:
    $ java -version

    This should give you some­thing like the fol­low­ing results:

    $ java -version
    java version "1.7.0_67"
    Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

For those that need the JDK, and run­ning Home­brew, you may do the fol­low­ing:

  1. Down­load the JDK here.
  2. Install jenv via Home­brew:2
    $ brew tap jenv/jenv
    $ bre install jenv

    More info here.

  3. Add the fol­low­ing in your Bash files by run­ning these in Ter­mi­nal:3
    $ echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.profile
    $ echo 'eval "$(jenv init -)"' >> ~/.profile
  4. Con­fig­ure jenv by run­ning the fol­low­ing for exam­ple:
    $ jenv add /Library/Java/JavaVirtualMachines/jdk17011.jdk/Contents/Home
    oracle64- added
  5. Last but not least, check that you are run­ning the intend­ed ver­sion in Ter­mi­nal:
    $ java -version

I hope that helps.

  1. Or .bashrc, .bash_profile, etc. []
  2. Be sure to brew udpate and run brew doc­tor before adding any new pack­ages, always. []
  3. Again, these can be .bashrc, .bash_profile, etc. []

Hello World Revisited

OMG dude! Nev­er thought I’d be back in school. Well, actu­al­ly more like a class (for work of course). Tak­ing it at UCB Exten­sion in Down­town SF. Entire class con­sists of work­ing pros in-or-out of the tech­nol­o­gy field. Besides the three hours of lec­ture and mov­ing Thurs­day bowl­ing-nights to Wednes­days, all is okay… so far.

Our sen­sei works for Siebel. Pret­ty intel­li­gent cat who knows a lot in the tech­no­log­i­cal side of things. He has like three (or more) degrees, or some­thing like that. But yah, pret­ty inter­est­ing class struc­ture. The class is pret­ty much just based on al the home­works. So as long as its done, and done right, you get a good grade. You don’t even have to go to class, return your quizzes and/or do any kind of exams. Pret­ty sweet huh? I wish I had that kind of sys­tem back at UCI, man oh man.

I nev­er thought of actu­al­ly tak­ing an exten­sion class in the field of com­put­ers after grad­u­at­ing. I had a mind­set that if I was gonna go back into the class­room, it’ll be in the field of design/arts. But all is good, I think this class will ben­e­fit me in the long run of being a “New Media Designer/Developer”. Because being some­one that is a “hybrid” (some­one able to do both pro­gram­ming and design) is an asset to com­pa­nies. But not only that, it’s just what I like doing because:

  • I get to use my degree in Com­put­er Engi­neer­ing,
  • and get payed for doing a hob­by, my love for design.

Tight huh? Yah, so it’s only and hour-thir­ty, anoth­er half to go before Jen­nvis picks me up to trav­el down to LA for the week­end. Mean­while, I’m starv­ing and kind of tired because I slept late again—freaking Flickr! I’m so get­ting addict­ed to its com­mu­ni­ty. Not to men­tion, I am begin­ning to get more and more into pho­tog­ra­phy tech­niques, per se. I guess it all start­ed with my first ever dig­i­tal cam­era, the Canon Pow­er­shot S200; which I bought after grad­u­at­ing in the sum­mer of ’02. I just love tak­ing spur-of-the-moments/­can­dids, archi­tec­turals, low-lights and recent­ly events/shows. Oh well, I guess “its all rel­a­tive” to how the world has evolved with tech­nol­o­gy on its fore­front.

From my mind to yours, be cool… stay in school.

Woah… My Tuesday During the Summer

sherwin@THIS-CLASS-IS-HELL% gmake parser
bison -d declare.y; /bin/mv declare.tab.c declare.tab.cc
declare.y contains 1 shift/reduce conflict.
g++ -c -g declare.tab.cc
flex -it scanner.l > scanner.cc
g++ -c -g scanner.cc
g++ -c main.cc -o main.o
g++ -c symtab.cc -o symtab.o
g++ -g declare.tab.o scanner.o main.o symtab.o -o parser
sherwin@THIS-CLASS-IS-HELL% f0k f0k f0k
syntax error "f0k f0k f0k"
sherwin@THIS-CLASS-IS-HELL% well f0k you t00

And how was your Tues­day spent? Drop a com­ment or some­thin’…

From my burnt mind to yours… f0k Lab. Peace.