File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mac OS and the fly likes So I bit the bullet and installed Mountain Lion. Trying to install Java 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "So I bit the bullet and installed Mountain Lion. Trying to install Java 7" Watch "So I bit the bullet and installed Mountain Lion. Trying to install Java 7" New topic
Author

So I bit the bullet and installed Mountain Lion. Trying to install Java 7

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Yep, I know in other threads I said I just wasn't going to install Mountain Lion because I loved Spaces. The good thing I see with Mountain Lion as opposed to Lion, is that when you create new Desktops it automatically assigns CTRL-# for each desktop, so it works exactly like spaces for me. I had to get Java 7, that is why I installed it last night. Still getting used to scroll direction, but I was familiar with all the other new stuff, and it doesn't take long to get used to them. Especially since I would play with Mountain Lion at the Apple Stores so I was already used to those.

While installing Java 7 was really easy. Getting it to show me java -version or javac -version still shows me Java 6 though. I went to the Java Utilities app and unchecked the 2 Java 6 listed there and moved Java 7 to the top, but that didn't help.

I also do have a

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

in my .profile. But I thought that after installing and moving it up in the utile that that was the type of change that would be made, making the CurrentJDK… stuff now point to the Java 7 directory.

I even commented out the export and re sourced my .profile but that didn't work.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I bet you need Java 7 for Vert.x.

I opted for the linux in a VM route to play around with Java 7 because I still need 6 to do my other work.


GenRocket - Experts at Building Test Data
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Gregg Bolinger wrote:I bet you need Java 7 for Vert.x.

I opted for the linux in a VM route to play around with Java 7 because I still need 6 to do my other work.


You know it.

I have been using ftp to copy my Groovy scripts for vertx to a Centos VM, still coding on my Mac in IntelliJ with Java6. I also have Mint and Ubuntu VMs in VMWare Fusion and did that for a little bit, but I would much rather have it right on the Mac directly. Just downloaded LibreOffice to replace Open Office since OO doesn't work with Java 7.

Mark
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

By the way. vertx is amazing. I created a chat server with rooms and direct messaging in 140 lines of Groovy code. I am now in the middle of writing a whole game server with vertx

Mark
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Getting slightly off topic here, but IntelliJ doesn't care of OpenJDK 7. It prefers Oracle's 7. Not sure which you're using.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Gregg Bolinger wrote:Getting slightly off topic here, but IntelliJ doesn't care of OpenJDK 7. It prefers Oracle's 7. Not sure which you're using.


Oracle's 7u7

Mark
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Got Java 7 working now. Had to run

/usr/libexec/java_home -v 1.7.0_07 --exec javac -version

Mark
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

So is there any way to do this and still use Java 6?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Gregg Bolinger wrote:So is there any way to do this and still use Java 6?


What exactly do you mean? to do what? Use vertex? vertex requires Java 7 no matter what.

Mark
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

What I mean is, how difficult is it to have 6 and 7 installed on OSX? I suppose I could have one of them installed as the main jvm and just have the other version tucked away in a folder that I can use via path adjustments when necessary.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Gregg Bolinger wrote:What I mean is, how difficult is it to have 6 and 7 installed on OSX? I suppose I could have one of them installed as the main jvm and just have the other version tucked away in a folder that I can use via path adjustments when necessary.


Yes, just like linux you can have multiple versions of Java installed and have certain applications use different versions etc. For instance, In order to startup Open Office, it requires 6 even though I now have 7 at the top. So I just went into the Utilities folder for the Java preferences and just had 6 also checked off, but at the bottom of the list. Now Open Office can find Java 6 and use it to run. Also in IDEA I can have one project use 6 and another open at the same time using 7.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: So I bit the bullet and installed Mountain Lion. Trying to install Java 7