Java Doc for SystemUtils.java in  » IDE-Netbeans » nbi » org » netbeans » installer » utils » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » nbi » org.netbeans.installer.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.installer.utils.SystemUtils

SystemUtils
final public class SystemUtils (Code)

author:
   Kirill Sorokin


Field Summary
final public static  intBUFFER_SIZE
    
final public static  intDELTA_DELAY
    
final public static  StringERROR_CANNOT_GET_DEFAULT_APPS_LOCATION_KEY
    
final public static  StringERROR_CANNOT_PARSE_PATTERN_KEY
    
final public static  StringFILE_SEPARATOR
    
final public static  intINITIAL_DELAY
    
final public static  StringJAVA_HOME
    
final public static  StringLINE_SEPARATOR
    
final public static  intMAX_DELAY
    
final public static  longMAX_EXECUTION_TIME
    
final public static  StringNO_SPACE_CHECK_PROPERTY
    
final public static  StringPATH_SEPARATOR
    
final public static  StringUSER_HOME
    


Method Summary
public static  FilesListaddComponentToSystemInstallManager(ApplicationDescriptor descriptor)
    
public static  voidcorrectFilesPermissions(File parent)
    
public static  voidcorrectFilesPermissions(File... parents)
    
public static  LaunchercreateLauncher(LauncherProperties props, Progress progress)
    
public static  LaunchercreateLauncher(LauncherProperties props, Platform platform, Progress progress)
    
public static  FilecreateShortcut(org.netbeans.installer.utils.helper.Shortcut shortcut, ShortcutLocationType locationType)
    
public static  FilecreateShortcut(Shortcut shortcut, LocationType locationType)
     Create shortcut at the specified location that is set using locationType.
public static  ExecutionResultsexecuteCommand(String... command)
    
public static  ExecutionResultsexecuteCommand(File workingDirectory, String... command)
    
public static  List<File>findExecutableFiles(File parent)
    
public static  List<File>findExecutableFiles(File... parents)
    
public static  List<File>findIrrelevantFiles(File parent)
    
public static  List<File>findIrrelevantFiles(File... parents)
    
public static  intgetAvailablePort(int basePort, int... forbiddenPorts)
    
public static  FilegetCurrentDirectory()
    
public static  FilegetCurrentJavaHome()
    
public static  PlatformgetCurrentPlatform()
    
public static  FilegetDefaultApplicationsLocation()
    
public static  Map<String, String>getEnvironment()
    
public static  StringgetEnvironmentVariable(String name)
    
public static  StringgetEnvironmentVariable(String name, EnvironmentScope scope, boolean expand)
    
public static  StringgetFileSeparator()
    
public static  List<File>getFileSystemRoots()
    
public static  longgetFreeSpace(File file)
    
public static  StringgetHostName()
    
public static  StringgetLineSeparator()
    
public static synchronized  NativeUtilsgetNativeUtils()
    
public static  FilegetPacker()
    
public static  StringgetPathSeparator()
    
public static  intgetPermissions(File file)
    
public static  FilegetShortcutLocation(org.netbeans.installer.utils.helper.Shortcut shortcut, ShortcutLocationType locationType)
    
public static  FilegetShortcutLocation(Shortcut shortcut, LocationType locationType)
    
public static  FilegetTempDirectory()
    
public static  FilegetUnpacker()
    
public static  FilegetUserHomeDirectory()
    
public static  StringgetUserName()
    
public static  List<T>intersect(List<? extends T> list1, List<? extends T> list2)
    
public static  booleanintersects(List<? extends Object> list1, List<? extends Object> list2)
    
public static  booleanisCurrentJava64Bit()
    
public static  booleanisCurrentUserAdmin()
    
public static  booleanisDeletingAllowed(File file)
    
public static  booleanisJarSignatureVeryfied(File file, String description)
    
public static  booleanisLinux()
    
public static  booleanisMacOS()
    
public static  booleanisPathValid(String path)
    
public static  booleanisPortAvailable(int port, int... forbiddenPorts)
    
public static  booleanisSolaris()
    
public static  booleanisWindows()
    
public static  voidremoveComponentFromSystemInstallManager(ApplicationDescriptor descriptor)
    
public static  voidremoveIrrelevantFiles(File parent)
    
public static  voidremoveIrrelevantFiles(File... parents)
    
public static  voidremoveShortcut(org.netbeans.installer.utils.helper.Shortcut shortcut, ShortcutLocationType locationType, boolean deleteEmptyParents)
    
public static  voidremoveShortcut(Shortcut shortcut, LocationType locationType, boolean deleteEmptyParents)
    
public static  FileresolvePath(String string)
    
public static  FileresolvePath(String path, ClassLoader loader)
    
public static  StringresolveString(String string)
    
public static  StringresolveString(String string, ClassLoader loader)
    
public static  voidsetDefaultEnvironment()
    
public static  voidsetEnvironmentVariable(String name, String value)
    
public static  voidsetEnvironmentVariable(String name, String value, EnvironmentScope scope, boolean expand)
    
public static  voidsetPermissions(File file, int mode, int change)
    
public static  voidsleep(long millis)
    
public static  List<T>substract(List<? extends T> list1, List<? extends T> list2)
    

Field Detail
BUFFER_SIZE
final public static int BUFFER_SIZE(Code)



DELTA_DELAY
final public static int DELTA_DELAY(Code)



ERROR_CANNOT_GET_DEFAULT_APPS_LOCATION_KEY
final public static String ERROR_CANNOT_GET_DEFAULT_APPS_LOCATION_KEY(Code)



ERROR_CANNOT_PARSE_PATTERN_KEY
final public static String ERROR_CANNOT_PARSE_PATTERN_KEY(Code)



FILE_SEPARATOR
final public static String FILE_SEPARATOR(Code)



INITIAL_DELAY
final public static int INITIAL_DELAY(Code)



JAVA_HOME
final public static String JAVA_HOME(Code)



LINE_SEPARATOR
final public static String LINE_SEPARATOR(Code)



MAX_DELAY
final public static int MAX_DELAY(Code)



MAX_EXECUTION_TIME
final public static long MAX_EXECUTION_TIME(Code)



NO_SPACE_CHECK_PROPERTY
final public static String NO_SPACE_CHECK_PROPERTY(Code)



PATH_SEPARATOR
final public static String PATH_SEPARATOR(Code)



USER_HOME
final public static String USER_HOME(Code)





Method Detail
addComponentToSystemInstallManager
public static FilesList addComponentToSystemInstallManager(ApplicationDescriptor descriptor) throws NativeException(Code)



correctFilesPermissions
public static void correctFilesPermissions(File parent) throws IOException(Code)



correctFilesPermissions
public static void correctFilesPermissions(File... parents) throws IOException(Code)



createLauncher
public static Launcher createLauncher(LauncherProperties props, Progress progress) throws IOException(Code)



createLauncher
public static Launcher createLauncher(LauncherProperties props, Platform platform, Progress progress) throws IOException(Code)



createShortcut
public static File createShortcut(org.netbeans.installer.utils.helper.Shortcut shortcut, ShortcutLocationType locationType) throws NativeException(Code)



createShortcut
public static File createShortcut(Shortcut shortcut, LocationType locationType) throws NativeException(Code)
Create shortcut at the specified location that is set using locationType.
For the current moment the following logic is implemented:
  • For Windows FileShortcut is created as an .lnk file.
    InternetShortcut is created as a standard .url file.
  • For Linux/Solaris FileShortcut is created as a .desktop entry with type Application if the target is normal file.
    If the file is actually a directory then a symlink is created
    InternetShortcut is created as a .desktop entry with type Link.
  • For MacOS FileShortcut on desktop is created as a symlink (with, possibly, moving up-parents to the first .app).
    InternetShortcut on desktop is created as a standard .url file.
    "Start Menu" file shortcuts for MacOS are created at Dock.
    InternetShortcut creation in Dock actually does nothing since it seems that there is no way add an internet shortcut ot the Dock at all.



executeCommand
public static ExecutionResults executeCommand(String... command) throws IOException(Code)



executeCommand
public static ExecutionResults executeCommand(File workingDirectory, String... command) throws IOException(Code)



findExecutableFiles
public static List<File> findExecutableFiles(File parent) throws IOException(Code)



findExecutableFiles
public static List<File> findExecutableFiles(File... parents) throws IOException(Code)



findIrrelevantFiles
public static List<File> findIrrelevantFiles(File parent) throws IOException(Code)



findIrrelevantFiles
public static List<File> findIrrelevantFiles(File... parents) throws IOException(Code)



getAvailablePort
public static int getAvailablePort(int basePort, int... forbiddenPorts)(Code)



getCurrentDirectory
public static File getCurrentDirectory()(Code)



getCurrentJavaHome
public static File getCurrentJavaHome()(Code)



getCurrentPlatform
public static Platform getCurrentPlatform()(Code)



getDefaultApplicationsLocation
public static File getDefaultApplicationsLocation() throws NativeException(Code)



getEnvironment
public static Map<String, String> getEnvironment()(Code)



getEnvironmentVariable
public static String getEnvironmentVariable(String name) throws NativeException(Code)



getEnvironmentVariable
public static String getEnvironmentVariable(String name, EnvironmentScope scope, boolean expand) throws NativeException(Code)



getFileSeparator
public static String getFileSeparator()(Code)



getFileSystemRoots
public static List<File> getFileSystemRoots() throws IOException(Code)



getFreeSpace
public static long getFreeSpace(File file) throws NativeException(Code)



getHostName
public static String getHostName()(Code)



getLineSeparator
public static String getLineSeparator()(Code)



getNativeUtils
public static synchronized NativeUtils getNativeUtils()(Code)



getPacker
public static File getPacker()(Code)



getPathSeparator
public static String getPathSeparator()(Code)



getPermissions
public static int getPermissions(File file) throws IOException(Code)



getShortcutLocation
public static File getShortcutLocation(org.netbeans.installer.utils.helper.Shortcut shortcut, ShortcutLocationType locationType) throws NativeException(Code)



getShortcutLocation
public static File getShortcutLocation(Shortcut shortcut, LocationType locationType) throws NativeException(Code)



getTempDirectory
public static File getTempDirectory()(Code)



getUnpacker
public static File getUnpacker()(Code)



getUserHomeDirectory
public static File getUserHomeDirectory()(Code)



getUserName
public static String getUserName()(Code)



intersect
public static List<T> intersect(List<? extends T> list1, List<? extends T> list2)(Code)



intersects
public static boolean intersects(List<? extends Object> list1, List<? extends Object> list2)(Code)



isCurrentJava64Bit
public static boolean isCurrentJava64Bit()(Code)



isCurrentUserAdmin
public static boolean isCurrentUserAdmin() throws NativeException(Code)



isDeletingAllowed
public static boolean isDeletingAllowed(File file)(Code)



isJarSignatureVeryfied
public static boolean isJarSignatureVeryfied(File file, String description) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException(Code)



isLinux
public static boolean isLinux()(Code)



isMacOS
public static boolean isMacOS()(Code)



isPathValid
public static boolean isPathValid(String path)(Code)



isPortAvailable
public static boolean isPortAvailable(int port, int... forbiddenPorts)(Code)



isSolaris
public static boolean isSolaris()(Code)



isWindows
public static boolean isWindows()(Code)



removeComponentFromSystemInstallManager
public static void removeComponentFromSystemInstallManager(ApplicationDescriptor descriptor) throws NativeException(Code)



removeIrrelevantFiles
public static void removeIrrelevantFiles(File parent) throws IOException(Code)



removeIrrelevantFiles
public static void removeIrrelevantFiles(File... parents) throws IOException(Code)



removeShortcut
public static void removeShortcut(org.netbeans.installer.utils.helper.Shortcut shortcut, ShortcutLocationType locationType, boolean deleteEmptyParents) throws NativeException(Code)



removeShortcut
public static void removeShortcut(Shortcut shortcut, LocationType locationType, boolean deleteEmptyParents) throws NativeException(Code)



resolvePath
public static File resolvePath(String string)(Code)



resolvePath
public static File resolvePath(String path, ClassLoader loader)(Code)



resolveString
public static String resolveString(String string)(Code)



resolveString
public static String resolveString(String string, ClassLoader loader)(Code)



setDefaultEnvironment
public static void setDefaultEnvironment()(Code)



setEnvironmentVariable
public static void setEnvironmentVariable(String name, String value) throws NativeException(Code)



setEnvironmentVariable
public static void setEnvironmentVariable(String name, String value, EnvironmentScope scope, boolean expand) throws NativeException(Code)



setPermissions
public static void setPermissions(File file, int mode, int change) throws IOException(Code)



sleep
public static void sleep(long millis)(Code)



substract
public static List<T> substract(List<? extends T> list1, List<? extends T> list2)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.