Sponsored Content
Top Forums Shell Programming and Scripting How to get CRC check sum of files in java EAR file without extracting .jar/.war files to disk.? Post 302968985 by Chubler_XL on Wednesday 16th of March 2016 05:51:04 PM
Old 03-16-2016
As the .jar/.war files are compressed in the .ear file they is no way without extracting them to list their contents.

However, this could certainly be automated with a script (which would be extracting each .jar/.war file to a temp location and listing this in "under the hood").

From a user point of view you could do:

Code:
# getearcrc my-application.ear
Archive              CRC-32    Name
-------              --------  ----
file-core.jar        8d995904  META-INF/MANIFEST.MF
file-core.jar        cf8577fe  a.class
...
utilcommon.jar       2224558c  MalformedJsonException.class
utilcommon.jar       020bca22  StringPool.class


Last edited by Chubler_XL; 03-16-2016 at 06:56 PM..
 

9 More Discussions You Might Find Interesting

1. Programming

regarding extracting of packet and checking its crc

hello, I have implemented a 32bit crc generation algorithm. Now at the receiver side i need to check the crc for that....i need to add the message in the packet and the crc and divide it with the key common at both side and the remainder should be zero. now how to add crc which is hexadecimal... (4 Replies)
Discussion started by: madfox
4 Replies

2. Shell Programming and Scripting

replacing files in an EAR file after extracting

{Hello All, Here is what I am trying to do: I have an archive file: AppName.ear jar -tvf AppName.ear 60459 Thu May 01 09:29:36 EDT 2008 /SharedResources/Application/App.dat 67542 Thu May 01 09:29:36 EDT 2008 JDBCConn/Application/App.dat 14488 Thu May 01 09:29:36 EDT 2008 config.xml ... (0 Replies)
Discussion started by: chiru_h
0 Replies

3. AIX

checking the version revisions of a java file inside the ear using KSHELL in AIX.

consider on day1, in PVCS repository we have java files like a.java,b.java with version revision 1.0, through ANT build script we have compiled and created an ear,named c.ear in AIX build server.we have transfered this ear from build server to portal server through FTP using KSHELL. consider... (0 Replies)
Discussion started by: kareemaashik
0 Replies

4. Programming

JAVA - External JAR files in UNIX

Hi, I have to run my JAVA programs in UNIX server. The java program uses some external jar files for compiling. I have set the classpath to the folder where all the jar files are present using EXPORT classpath command. But when i compile, it shows errors.. saying that the classes relating... (8 Replies)
Discussion started by: satish2712
8 Replies

5. Shell Programming and Scripting

Unpack (extract) EAR / JAR files

i have about 30 .EAR files, every ear file have 1 .JAR file. so i need to extract .EAR files then extract .JAR files, and one important thing is that every archive must bee extracted to separate folder. i try with gzip, but when i extract 30 ear files i cant make separate folders.... (1 Reply)
Discussion started by: waso
1 Replies

6. Shell Programming and Scripting

need a shell script to extract the files from source file and check whether those files existonserve

Hi, I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is # echo $0 -sh My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies

7. Shell Programming and Scripting

build rpm with SPEC file for packaging .jar and some .sh files..

Good day people, Hereby wish to have your advise for below: I have some .jar files, some script files (install.sh, action.sh) , and a libaes.so file. Basically, the .jar files compute the operation of my system and define the working directory for my system. My current scenario: i trigger... (1 Reply)
Discussion started by: cielle
1 Replies

8. Shell Programming and Scripting

Shell file to run other shell files running jar files

Hi, I am trying to write a shell script that will go to another folder and run the script in that folder. The folder structure is kind of like this: /MainFolder/ |-> MainShellScript.sh | |-> Folder1/ |-----|-> script1.sh |-----|-> FileToRun1.jar | |-> Folder2/ |-----|-> script2.sh... (3 Replies)
Discussion started by: sleo
3 Replies

9. Shell Programming and Scripting

Sort html based on .jar, .war file names and still keep text within three groups.

Output from zipdiff GNU EAR comparison tool produces output in html divided into three sections "Added, Removed, Changed". I want the output to be sorted by jar or war file. <html> <body> <table> <tr> <td class="diffs" colspan="2">Added </td> </tr> <tr><td> <ul>... (5 Replies)
Discussion started by: kchinnam
5 Replies
asadmin-deploy(1AS)						   User Commands					       asadmin-deploy(1AS)

NAME
asadmin-deploy, deploy - deploys the specifiedcomponent SYNOPSIS
deploy --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive] [--virtualservers virtual_servers] [--contextroot context_root] [--force=true] [--precom- pilejsp=false] [--verify=false] [--name component_name] [--upload=true] [--retrieve local_dirpath] [--dbvendorname dbvendorname] [--cre- atetables=true|false | --dropandcreatetables=true|false] [--uniquetablenames=true|false] [--deploymentplan deployment_plan] [--enabled=true] filepath Deploys an EJB, web, connector or application. If the component is already deployed or already exists, it is forcefully re-deployed if the --force option is set to true. The --createtables and --dropandcreatetables options are booleans and therefore can take the values of true or false. These options are only used during deployment of CMP beans that have not been mapped to a database (i.e., no sun-cmp-mappings.xml descriptor is provided in the module's META-INF directory). They are ignored otherwise. The --createtables option and --dropandcreatetables option are mutually exclusive; only one should be used. If drop and/or create tables fails, the deployment does not fail; a warning message is provided in the log file. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. --echo setting to true will echo the command line statement on the standard output. --interactive prompts you for the required options that are not already specified. --virtualservers comma separated list of virtual server name. --contextroot valid only if the archive is a web module. It is ignored for other archive types; defaults to filename without extension. --force makes sure the component is forcefully (re)deployed even if the specified component has already been deployed or already exists. --precompilejsp by default is set to false which does not allow the JSP to pre-compile during deployment. Instead JSPs are compiled during runtime. --verify if set to true, the syntax and semantics of the deployment descriptor is verified. --name name of the deployable component. --upload when set to true, uploads the deployable file to the administration server. If the filepath of the deployable file is mounted to the server machine, or if the administration server is running locally, set the upload option to false. --retrieve retrieves the client stub JAR file from the server machine to the local directory. --dbvendorname name of database vendor being used. Default is the corresponding entry in the cmp-resource() element of the sun- ejb-jar.xml file. If not specified the default is SQL92. Thereby the DDL files to create and drop tables will be generated in SQL92 format. --createtables creates tables at deploy of an application with unmapped CMP beans. Default is the corresponding entry in the cmp- resource element of the sun-ejb-jar.xml file. If not specified, defaults to the entries specified in the deployment descriptors. --dropandcreatetables drops tables at redeploy of an already deployed application with unmapped CMP beans. If not specified, the tables will be dropped if the drop-tables-at-undeploy entry in the cmp-resource element of the sun-ejb-jar.xml file is set to true. The new tables are created if the create-tables-at-deploy entry in the cmp-resource element of the sun- ejb-jar.xml file is set to true. On redeploy the tables created by the previous deploy are dropped before creating the new tables. --uniquetablenames guarantees unique table names for all the beans and results in a hashcode added to the table names. This is useful if you have an application with case-sensitive bean names. --deploymentplan takes the deployment plan, which is a JAR containing Sun-specific descriptors, and deploys it. This should be passed along when deploying a pure EAR file. A pure EAR file is an EAR without Sun-specific descriptors. --enabled if set to true (default), allows user to access the application. If set to false, user will not be able to access the application. OPERANDS
filepath path to the deployable file on the local machine if the --upload option is set to true; otherwise the absolute path to the file on the server machine. Example 1: Deploying a J2EE application Deploy (install) the J2EE application packaged in the Cart.ear file. asadmin> deploy --user admin --password admin123 --host murph --port 4848 Cart.ear Command deploy executed successfully Example 2: Deploying a Web application with the default context root Deploy the Web application in the hello.war file at the hello context root. asadmin> deploy --user admin hello.war Command deploy executed successfully Example 3: Deploying an enterprise bean (EJB component) Deploy and enterprise bean with container-managed persistence (CMP) and create the database tables used by the bean. asadmin> deploy --user admin --createtables=true EmployeeEJB.jar Command deploy executed successfully Example 4: Deploying a connector module (resource adapter) Deploy a connector module packaged in a RAR file. asadmin> deploy --user admin jdbcra.rar Command deploy executed successfully EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-undeploy(1AS), asadmin-list-components(1AS) J2EE 1.4 SDK March 2004 asadmin-deploy(1AS)
All times are GMT -4. The time now is 08:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy