• Intro Headers Instructions Macros Commands
  • Fork me on GitHub
    • Introduction
    • How to install bnd
    • Guided Tour
    • Guided Tour Workspace & Projects
    • Concepts
    • Best practices
    • Build
    • Project Setup
    • Generating JARs
    • Versioning
    • Baselining
    • Service Components
    • Metatype
    • Contracts
    • Bundle Annotations
    • Accessor Properties
    • SPI Annotations
    • Resolving Dependencies
    • Launching
    • Startlevels
    • Testing
    • Testing with Launchpad
    • Packaging Applications
    • JPMS Libraries
    • Wrapping Libraries to OSGi Bundles
    • Generating Documentation
    • Commands
    • For Developers
    • Tips for Windows users
    • Tools bound to bnd
    • Headers
    • Instruction Reference
    • Instruction Index
    • Macro Reference
    • Macro Index
    • Plugins
    • External Plugins
    • Settings
    • Errors
    • Warnings
    • Frequently Asked Questions
  • -systemproperties PROPERTIES

    public Workspace(File dir, String bndDir) throws Exception {
    	super(getDefaults());
    	dir = dir.getAbsoluteFile();
    	if (!dir.exists() && !dir.mkdirs()) {
    		throw new IOException("Could not create directory " + dir);
    	}
    	assert dir.isDirectory();
    
    	File buildDir = new File(dir, bndDir).getAbsoluteFile();
    	if (!buildDir.isDirectory())
    		buildDir = new File(dir, CNFDIR).getAbsoluteFile();
    
    	this.buildDir = buildDir;
    
    	File buildFile = new File(buildDir, BUILDFILE).getAbsoluteFile();
    	if (!buildFile.isFile())
    		warning("No Build File in " + dir);
    
    	setProperties(buildFile, dir);
    	propertiesChanged();
    
    	//
    	// There is a nasty bug/feature in Java that gives errors on our
    	// SSL use of github. The flag jsse.enableSNIExtension should be set
    	// to false. So here we provide a way to set system properties
    	// as early as possible
    	//
    
    	Attrs sysProps = OSGiHeader.parseProperties(getProperty(SYSTEMPROPERTIES));
    	for (Entry<String,String> e : sysProps.entrySet()) {
    		System.setProperty(e.getKey(), e.getValue());
    	}
    
    }
    
    • GitHub