Some of those information should be able from a Plugin through the org.eclipse.core.runtime.Platform
class, as shown by the org.eclipse.debug.internal.core.SystemVariableResolver
source code:
public String resolveValue(IDynamicVariable variable, String argument) throws CoreException {
if ("ARCH".equals(argument)) { //$NON-NLS-1$
return Platform.getOSArch();
} else if ("ECLIPSE_HOME".equals(argument)) { //$NON-NLS-1$
URL installURL = Platform.getInstallLocation().getURL();
IPath ppath = new Path(installURL.getFile()).removeTrailingSeparator();
return getCorrectPath(ppath.toOSString());
} else if ("NL".equals(argument)) { //$NON-NLS-1$
return Platform.getNL();
} else if ("OS".equals(argument)) { //$NON-NLS-1$
return Platform.getOS();
} else if ("WS".equals(argument)) { //$NON-NLS-1$
return Platform.getWS();
}
return null;
}
Platform.getCommandLineArgs()
should complete the display for the eclipse session (not for your program though).
For a RCP program, see this thread
Using the
Application start(IApplicationContext context)
method:
String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);