This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Mac OS and the fly likes Use Java7 without installing from dmg Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Use Java7 without installing from dmg" Watch "Use Java7 without installing from dmg" New topic
Author

Use Java7 without installing from dmg

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11432
    
  85

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 ....


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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


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

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

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)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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

Joined: Jul 11, 2001
Posts: 15299
    
    6

Thanks to both. I think I am good to go now.
 
 
subject: Use Java7 without installing from dmg