aspose file tools*
The moose likes Mac OS and the fly likes On my new Mac Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "On my new Mac" Watch "On my new Mac" New topic
Author

On my new Mac

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Guys,

I today bought the MBP 13" model. This is the older model as it came under a good discount.

Now, I would like to install Java / Maven / Ant / ActiveMQ / Tomcat / Eclipse

For the most it is plain vanilla installation. I downloaded all the softwares that I needed (the zip files) and extracted them to a folder that I created in my Users directory. How do I set the MAVEN_HOME, TOMCAT_HOME, ANT_HOME? JAVA_HOME was automagically set when I installed JDK. Ideas on how to set the other home variables?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

In your .bash_profile in ~.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

I just tried running mvn -version from the terminal. It shows me the version. I did not set anything. This is what I see



When I tried which java, I got the following:



From where are all these coming?

Can you please elaborate on the .bash_profile?
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

I understand that Maven and Ant comes pre-installed in Mac OSX. Now how do I overwrite those with the new versions? I just downloaded the zip files and unpacked them to a folder called Softwares that I created in my Users folder.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

The .bash_profile is a shell script that executes when you open a Terminal instance (or start up any bash shell). I tis there you can set up environment variables and aliases.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Just noticed that the Java that is already there was from the default OS bundled version. I would like to do a fresh install. I downloaded the jdk dmg file. But when I double clicked it, why the heck Mac OS won't ask me the location that I want to install it?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Joe Harry wrote:Just noticed that the Java that is already there was from the default OS bundled version. I would like to do a fresh install. I downloaded the jdk dmg file. But when I double clicked it, why the heck Mac OS won't ask me the location that I want to install it?


Because on a Mac there are default locations for Java, and you wouldn't want to put it somewhere else. Also Mac is never up to date on the latest Java as the Java that is supported on a Mac. So currently it is Java 6. I can't install Java 7 on my Mac.

Hope that makes sense.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

You update Java through the Software Update mechanism (in the "apple"). You don't install it from a .dmg.

There was just an update today, as a matter of fact.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Like I mentioned in my post above, I already have Java 7 which came as a default installation with the Mac. But I would like to have it installed on a different location. You guys say that it is impossible to do that which is a bit of letting down. Even though it is a Mac, it is a personal computer and I want to male it personal by installing the softwares that I want.

There should be some ways to do a custom java installation. I would try my luck with google to find any pointers on Java installation on a Mac.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

By the way, how do I find if my Mac has a 64 bit or a 32 bit OS?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

Joe Harry wrote:Even though it is a Mac, it is a personal computer and I want to male it personal by installing the softwares that I want.

Good luck with that approach.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Actually, Mac makes it easier by providing Java at a version it supports so that you don't have to worry about it


I already have Java 7 which came as a default installation with the Mac.


Huh??? Apple only supports Java 6 currently. They don't come installed with Java 7. To get 7, you have to go to Oracle.

here are some more info

http://maclord.ozarweb.com/mevzu/install-java-on-mac-lion/

and from here near the bottom
http://www.ewert-technologies.ca/blog/articles/installing-java-on-mac-osx-lion

Java 7 is not yet supported for Mac OS/X, but will be supported by the OpenJDK project.


Really Oracle, as they have a dmg for installing Java.
http://www.seobloggs.com/2012/05/how-to-install-and-uninstall-java-7-for.html

But it will still have you put Java into their special directory. It is just better organized there, in my mind.

Mark
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Thanks for the post. I would try to follow what's being said in those articles.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

the .bashrc and .bash_profile scripts are executed when shells start up.

For some important programs, like NetBeans and the MAMP version of MySql, you need real system-wide environement variables, not shell specific ones.

Official Apple docs:
http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Pat Farrell wrote:For some important programs, like NetBeans and the MAMP version of MySql, you need real system-wide environement variables, not shell specific ones.


Ah, yet another reason to add to my "this is why I don't use Netbeans" list.


GenRocket - Experts at Building Test Data
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Gregg Bolinger wrote:Ah, yet another reason to add to my "this is why I don't use Netbeans" list.

You can do that. but it makes sense to me, you start it from the app launcher, not from a shell. Nothing you do in a shell has any impact on other shells or programs started other ways.
IMHO, this is one thing that OS-X does right.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Pat Farrell wrote:
Gregg Bolinger wrote:Ah, yet another reason to add to my "this is why I don't use Netbeans" list.

You can do that. but it makes sense to me, you start it from the app launcher, not from a shell. Nothing you do in a shell has any impact on other shells or programs started other ways.
IMHO, this is one thing that OS-X does right.


OMG, I am agreeing with Pat. ;) JK.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: On my new Mac