What JRE version does Flex Builder 2 standalone use?
With the release of the Flex Builder 2 Java technote I became curious of all the JVM settings in the standalone version. Here are my results and a method of switching the JVM used by the standalone builder.
This is not necessarily recommend or throughly tested, but its pretty basic stuff.
First is to check out the version that comes with the Flex Builder 2 standalone version. You can do this in two ways.
Way #1:
Open up a command prompt and type in “C:\Program Files\Adobe\Flex Builder 2\jre\bin>java -version”. You should see something like this,
java version “1.4.2_09″
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
Way #2:
Open up Flex Builder 2 and go to Help -> Product Details… -> Configuration Details and do a search on “java.runtime.version=”. You’ll file the same “1.4.2_09″
Ok now for changing out the JRE. Close the Flex Builder 2 and clear any process running that might be using the left jre/bin/java.exe. Then go into “C:\Program Files\Adobe\Flex Builder 2″ make a backup of the “jre” folder. The delete out the file (I had to shutdown a lot of process to do it). Then copy over the jre folder from they newer Sun install, you’ll want to use Sun’s Java JRE/JDK 1.4.2_10 or earlier or 1.5.0_05 or earlier as the technote states.
I tested it a little and things to seem to be fine, I’ll leave mine with the newer 1.5.0_06 jre I have installed and post any problems. But either way some further tests could be done to see if there is a performance gain.
Another note, the “C:\Program Files\Adobe\Flex Builder 2\FlexBuilder.ini” file lets you set the Java args. This is important for performance also. If you are working with large applications and know about how Java’s JVM does garabage collection you can set the Xms and Xmx to your desired values. Sun’s defaults are 64Mb a piece, and I see that the FlexBuilder.ini defaults them to 128M and 512M. If you have more Ram on your machine you can try pushing this values higher, but keep them divisible by 8 of course. And you do not need to go over roughly 1400M on windows because of a limitation of the Java JVM’s heap size.