In case you need to switch Java version in Mac OSX, here is the solution:
In Mac OSX 10.4.x, JAVA_HOME is located at /Library/Java/Home, but it is actually a symbolic link to /System/Frameworks/JavaJVM.Framework/Versions. You will see a list of JDK version in this folder. Also, you will find another symbolic link called CurrentJDK which actually point to your current JDK. You can simply change the symbolic link to your desired version. Then it's done.
For symbolic link usage, here is a sample:
>ln -s ActualFilename LinkFileName
The above solution is tested on Mac OSX 10.4.x. I am not sure whether the path is the same in previous Mac OSX. Please check by yourself.
Wednesday, 31 January 2007
Thursday, 25 January 2007
Eclipse out of memory problem
Sometimes eclipse will prompt you an error about out of memory. I am not sure whether it happens in Windows system with nowaday Eclipse 3.2.1. But it does always happen in my Mac machine. So as many blog or information site mention, we can change the eclipse loading parameters. In Mac, you should locate the eclipse.app file inside your eclipse installation folder.
By "right click" to show the menu, choose "Show Package Contents". Then choose Contents -> MacOS. You should see the file eclipse.ini.
Inside elicpse.ini, add/change to the following lines:
-Xms256m
-Xmx512m
-XX:PermSize=128m
-XX:MaxPermSize=256m
Then the out of memory problem should be solved.
By "right click" to show the menu, choose "Show Package Contents". Then choose Contents -> MacOS. You should see the file eclipse.ini.
Inside elicpse.ini, add/change to the following lines:
-Xms256m
-Xmx512m
-XX:PermSize=128m
-XX:MaxPermSize=256m
Then the out of memory problem should be solved.
Enable root in Mac OSX
By default, Mac OSX disable root to login. To turn on, you simply go to /Applications/Utilities and look for NetInfo Manager.
Inside NetInfo Manager, select Security -> Authenticate to enable changes.
Then select Security -> Enable root user.
If you did not enter any root password before, system will ask you to do so. After enable your root user, make sure you deauthenticate the NetInfo Manager. Just in case if some other people makes some "funny" things in your machine.
Enjoy!
Inside NetInfo Manager, select Security -> Authenticate to enable changes.
Then select Security -> Enable root user.
If you did not enter any root password before, system will ask you to do so. After enable your root user, make sure you deauthenticate the NetInfo Manager. Just in case if some other people makes some "funny" things in your machine.
Enjoy!
Turn off MySQL Autostart at Mac OSX
I have been searching around on how to disable auto start for MySql daemon at Mac OSX. Here is the solution.
Locate the file at /etc/hostconfig.
You will be able to find an item MYSQLCOM=-YES- . Simply change it to MYSQLCOM=-NO-. Then it will not run MySQL daemon when system start up.
Of course you will need a root privilege. For information on how to enable root in Mac OSX (cause it is disabled by default). Please refer to my Mac blog section.
Just for your information, the original startup script is located in /Library/StartupItems directory.
Version of machine:
- Mac OSX 10.4.x
- MySQL 5.0.x
Locate the file at /etc/hostconfig.
You will be able to find an item MYSQLCOM=-YES- . Simply change it to MYSQLCOM=-NO-. Then it will not run MySQL daemon when system start up.
Of course you will need a root privilege. For information on how to enable root in Mac OSX (cause it is disabled by default). Please refer to my Mac blog section.
Just for your information, the original startup script is located in /Library/StartupItems directory.
Version of machine:
- Mac OSX 10.4.x
- MySQL 5.0.x
Subscribe to:
Posts (Atom)
