Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use Java7 without installing from dmg

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use Java7 for some development work but I don't want to install it and make it the default VM over the entire system. What I tried to do was download the linux tar.gz file, throw it in a directory, setup some PATH info and run java - version but when I do that it says 'cannot execute binary file'. So much for *nix.

Anything I can do to make the above work or is there another way to go about this? Again, I don't want (can't) disrupt the OSX version of Java that is currently installed.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11887
203
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg Bolinger wrote:So much for *nix.


Huh? I don't think I have ever seen anything anywhere stating that *nix systems should be binary compatible. In fact it is pretty much guaranteed that they wont be, since you can run *nix on both big-endian and little-endian machines, and the libraries that your binaries are linked to will be different on different machines, and ....
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read this and what it sounds like to me is that I can just use the settings to manage which VM is accessible. I would rather control this via shell scripts but if going into a UI and clicking checkboxes work, I can live with that. Can anyone confirm?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg Bolinger wrote:I read this and what it sounds like to me is that I can just use the settings to manage which VM is accessible. I would rather control this via shell scripts but if going into a UI and clicking checkboxes work, I can live with that. Can anyone confirm?


Yeah on a Mac, I would install Java without a dmg. And you can easily have many versions of Java installed. To set the default you go to Utilities - Java Preferences and just move the one you want as the default to the top. But all the others can be checked on and usable. For instance, Open Office requires Java 6. But all I needed was Java 6 installed and check boxed for Open Office to find it, I didn't have to set any command line variables for Open Office.

Mark
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Spritzler wrote:Yeah on a Mac, I would install Java without a dmg.


Is that a typo? It contradicts the rest of your post.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34671
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg,
I installed the Java 7 dmg and then set my existing Java 6 to be the default. It works just fine. (What I did)
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg Bolinger wrote:
Mark Spritzler wrote:Yeah on a Mac, I would install Java without a dmg.


Is that a typo? It contradicts the rest of your post.


Sorry I meant I wouldn't install Java without. Or more positively instead of a double negative.

Only use the .dmg for installation.

Mark
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to both. I think I am good to go now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic