Wednesday, April 28, 2010

MySql 5 will not allow you to insert a large blob

using mysql 5 , i tried to insert a large stream and found out that i have to set a variable in my.ini file. the variable takes a value in bytes as following :


max_allowed_packet='value'



for example, for 100MB :


max_allowed_packet=104857600

setting the jvm for eclipse

There is a way to make sure what JVM your eclipse will use to run. By setting this configuration you will specify the exact place of your JVM for eclipse.

in windows you should add the following code into your eclipse.ini file. Just make sure you put the "-vm" and the path of your java executable in separated lines. and make sure you put them before -vmargs .



-vm
C:\Java\JDK\1.5\bin\javaw.exe


an example of linux :

-vm
/opt/sun-jdk-1.6.0.02/bin/java



-- an example of mac os :

On a Mac OS X system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the MacOSContents


-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
folder under