Smrita
Smrita

Reputation: 1279

Could someone explain the what .settings folder of an eclipse java project contain?

So whenever someone creates a project in Eclipse it creates the following folder

.settings -org.eclipse.jdt.core ( Its something related to eclipse jdt but what exactly is it? Does it specify the kind of compiler that should be used? )

Upvotes: 1

Views: 993

Answers (2)

TheLostMind
TheLostMind

Reputation: 36304

The settings folder just contains a preferences file which describes the preferences of your project.

example : for a project in my workspace, the file org.eclipse.jdt.core.prefs it contains :

eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7

All project specific settings and what is enabled, what is not etc.

Edit : org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled From eclipse docs -When enabled in conjunction with a Java target platform lesser than or equal to "1.4", the compiler will no longer generate JSR instructions, but rather inline corresponding subroutine code sequences (mostly corresponding to try finally blocks). The generated code will thus get bigger, but will load faster on virtual machines since the verification process is then much simpler. This mode is adding support for the Java Specification Request 202 to pre-"1.5" Java target platforms. For a Java target platform greater than or equal to "1.5", the inlining of the JSR bytecode instruction is mandatory and this option is ignored.

Upvotes: 1

SparkOn
SparkOn

Reputation: 8946

The .settings directory contains – or at least should contain – vital information needed to successfully build your project inside Eclipse, such as the character encoding used for source code, Java compiler settings etc

The .settings folder is used by various plugins to set persistent 'Properties' as opposed to 'Preferences' to specify project specific settings that should be preserved.

Upvotes: 1

Related Questions