Bug 70284 [1.5] class file with "1.4 compatibility" cannot be run in Java 1.4
If I compile a simple class in Eclipse with the following compliance settings, it won't run in a 1.4 JVM. It appears the .class file relies on 1.5 libraries, despite the compatibility setting. Compiler compliance: 1.5 Generated .class compatibility: 1.4 Source compatibility: 1.5 Here's my source code: public class TestConcat { public static void main(String[] args) { String w = "world"; System.out.println("Hello " + w); } } The resulting exception: Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/StringBuilder at TestConcat.main(TestConcat.java:13)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CompilerConfigurationBlock.java
PreferencesMessages.getString("CompilerConfigurationBlock.ignore") 
		};
		
		String[] enabledDisabled= new String[] { ENABLED, DISABLED };
		
		String[] visibilities= new String[] { PUBLIC, PROTECTED, DEFAULT, PRIVATE  };
		
		String[] visibilitiesLabels= new String[] {
				PreferencesMessages.getString("CompilerConfigurationBlock.public"), 
				PreferencesMessages.getString("CompilerConfigurationBlock.protected"), 
				PreferencesMessages.getString("CompilerConfigurationBlock.default"), 
				PreferencesMessages.getString("CompilerConfigurationBlock.private") 
		};
		int nColumns= 3;
				
		GridLayout layout = new GridLayout();
		layout.numColumns= nColumns;
		
		Composite outer= new Composite(folder, SWT.NULL);
		outer.setLayout(layout);
		
		String label= PreferencesMessages.getString("CompilerConfigurationBlock.pb_javadoc_support.label"); 
		addCheckBox(outer, label, PREF_JAVADOC_SUPPORT, enabledDisabled, 0);
		
		layout = new GridLayout();
		layout.numColumns= nColumns;
		layout.marginHeight= 0;
		
		
		Composite composite= new Composite(outer, SWT.NULL);