Forwarded to me from a friend
class fun {
public static void main(String[] args)
{
Integer a=10; Integer b=10; Integer c=1000; Integer d=1000;
System.out.println(a==b);//true
System.out.println(c==d);//false }
};
http://www.owasp.org/index.php/Java_gotchas#Immutable_Objects_.2F_Wrapper_Class_Caching
http://tech.puredanger.com/2007/02/01/valueof/
Friday, 30 July 2010
Wednesday, 28 July 2010
Why did my eclipse crash ?
I just found out the log files for eclipse live in the
workspace_directory/.metadata/.log
If your wondering why your eclipse crashed this might help you track down the issue.
workspace_directory/.metadata/.log
If your wondering why your eclipse crashed this might help you track down the issue.
PermGen Error Eclipse 3.5.2 jdk 1.6.0_21
java.lang.OutOfMemoryError: PermGen space
So I had to get a pc rebuilt at work and had to reinstall everything. I downloaded Eclipse Galileo IDE for Java EE Developers from here :
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/galileosr2
and the latest sdk from sun which at the time was 6 update 21
I then added the Android eclipse plugin and set it up as normal.
I started to create a HelloWorld Android application and found eclipse repeatedly crashed and froze up, almost 20 times, when I was doing basic editing.
I tried removing the mylyn plugin but this made no difference so then I tried jdk 6 update 20 and this resolved my issue.
http://java.sun.com/products/archive/j2se/6u20/index.html
http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
which states
The Eclipse 3.3 - 3.6 launchers for Windows have a problem with the Oracle/Sun Java VM version '1.6.0_21'. You have three choices to work around this:
1. switch back to '1.6.0_20' (as of July 19, 2010 it can still be downloaded here)
2. Change the commandline for launching or add the following line after "-vmargs" to your eclipse.ini file:
-XX:MaxPermSize=256m
(Detailed instructions/examples)
3. For Helios, download the fixed eclipse_1308.dll and place it into
(eclipse_home)/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
helps if I RTM
So I had to get a pc rebuilt at work and had to reinstall everything. I downloaded Eclipse Galileo IDE for Java EE Developers from here :
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/galileosr2
and the latest sdk from sun which at the time was 6 update 21
I then added the Android eclipse plugin and set it up as normal.
I started to create a HelloWorld Android application and found eclipse repeatedly crashed and froze up, almost 20 times, when I was doing basic editing.
I tried removing the mylyn plugin but this made no difference so then I tried jdk 6 update 20 and this resolved my issue.
http://java.sun.com/products/archive/j2se/6u20/index.html
http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
which states
The Eclipse 3.3 - 3.6 launchers for Windows have a problem with the Oracle/Sun Java VM version '1.6.0_21'. You have three choices to work around this:
1. switch back to '1.6.0_20' (as of July 19, 2010 it can still be downloaded here)
2. Change the commandline for launching or add the following line after "-vmargs" to your eclipse.ini file:
-XX:MaxPermSize=256m
(Detailed instructions/examples)
3. For Helios, download the fixed eclipse_1308.dll and place it into
(eclipse_home)/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
helps if I RTM
Subscribe to:
Posts (Atom)