Java Doc for JarCreation.java in  » IDE » tIDE » tide » export » 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 » tIDE » tide.export 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   tide.export.JarCreation

JarCreation
final public class JarCreation (Code)
Creation of the project jar file, with a lot of associated features.




Method Summary
public static  ProcessaddFilesFromSourceFolder(File jarExecutor, File jarFile, File source_home, boolean includeSourceFiles, boolean includeResourceFiles, List<String> ignoredEndings)
    
public static  voidcompress_pack200(File src, File dest)
     pack200 and gzipped, => very good compression success...
public static  voidcreateBatchLauncher(File javaExecutor, File jarFile, String jvmOptions, String appOptions)
     A small batch launcher to start the jar app with the JVM arguments ( A double click on a jar will ignore them...
public static  ProcesscreateClassesJarFile(File jarExecutor, File jarFile, File classesDest, String mainClassName, List<File> classPath, File customManifestFile)
    
public static  voidcreateJNLPLauncher(File jarFile, String jvmOptions, String appOptions, String mainClassJavaName, List<File> classPath, String codeBase, String title, String vendor, String homepage, String descr, String j2seversion, String xmx, boolean isSigned)
     A jnlp launcher to start the jar through the net.
public static  voidcreate_separate_SourcesZipFile(File sources_home, List<SourceFile> allSources, List<File> resources, File dest)
    
public static  ProcessindexJarFile(File jarExecutor, File jarFile)
     Since 1.3, create an index (incomplete ! ?) of the jar and the jars in the class-path.
public static  voidreplaceJarWithPack200Decompressed(File jarFile, File pack200GzFile)
     Pack200 rearranges the contents of the resultant JAR file.



Method Detail
addFilesFromSourceFolder
public static Process addFilesFromSourceFolder(File jarExecutor, File jarFile, File source_home, boolean includeSourceFiles, boolean includeResourceFiles, List<String> ignoredEndings) throws Exception(Code)
Updates the given jar file with all the given files from the source folder (images, .java, ...) null if no files are found.



compress_pack200
public static void compress_pack200(File src, File dest) throws Exception(Code)
pack200 and gzipped, => very good compression success... 5 to 9 on pure class contents! Be careful, the signature is NOT conservated, because pack200 let a great freedom for the reconstruction, some variable tables may be shuffled ! and sha-1 and other bytecode verifications are no more of same signature !!! => normalize the jar before signing ! PROBLEM: uses JVM memory and causes problems... => call in another JVM !



createBatchLauncher
public static void createBatchLauncher(File javaExecutor, File jarFile, String jvmOptions, String appOptions) throws Exception(Code)
A small batch launcher to start the jar app with the JVM arguments ( A double click on a jar will ignore them... [Jan2006] ).



createClassesJarFile
public static Process createClassesJarFile(File jarExecutor, File jarFile, File classesDest, String mainClassName, List<File> classPath, File customManifestFile) throws Exception(Code)

Parameters:
  customManifestFile - is null (normal case), a correct and complete manif will be createdDon't include classes excluded from project !( they are also not compiled => not in the classes folder )=> project must be cleared and compiled first.



createJNLPLauncher
public static void createJNLPLauncher(File jarFile, String jvmOptions, String appOptions, String mainClassJavaName, List<File> classPath, String codeBase, String title, String vendor, String homepage, String descr, String j2seversion, String xmx, boolean isSigned) throws Exception(Code)
A jnlp launcher to start the jar through the net. Overtakes most settings from the project, as classpath, main method, ... app arguments, jvm arguments (not all are supported, be careful !)



create_separate_SourcesZipFile
public static void create_separate_SourcesZipFile(File sources_home, List<SourceFile> allSources, List<File> resources, File dest) throws Exception(Code)
To retrieve all the sources, use
 List allSources = MainEditorFrame.instance.sourcesTreePanel.getTreeModel().getAllSourceFiles();



indexJarFile
public static Process indexJarFile(File jarExecutor, File jarFile) throws Exception(Code)
Since 1.3, create an index (incomplete ! ?) of the jar and the jars in the class-path. Important: the files to index are prsent in the classpath manifest entry and MUST be present in the destination folder (where the jar is)



replaceJarWithPack200Decompressed
public static void replaceJarWithPack200Decompressed(File jarFile, File pack200GzFile) throws Exception(Code)
Pack200 rearranges the contents of the resultant JAR file. The jarsigner hashes the contents of the class file and stores the hash in an encrypted digest in the manifest. When the unpacker runs on a packed packed, the contents of the classes will be rearranged and thus invalidate the signature. Therefore, the JAR file must be normalized first using pack200 and unpack200, and thereafter signed. [Nov2007] Could be also made with "pack200 --repack myarchive.jar" (Here's why this works: Any reordering the packer does of any classfile structures is idempotent, so the second packing does not change the orderings produced by the first packing. Also, the unpacker is guaranteed by the JSR 200 specification to produce a specific bytewise image for any given transmission ordering of archive elements.)



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.