List the contents of jar, ear, war files
Hi All,
It has been several years since I have worked in java and now I am trying to get caught back up :-).
My question is: Is there a standard utility that can dump/list the contents of the packaging files: jar, ear, war?
Thanks in advance!
You can use winzip. OR you can use the jar command provided in JDK.
jar -tvf <<your archive (jar, war, ear)>>
Similar Messages
-
Terminal: how do I list the contents of directories for specific files?
I want list all quicktime movies under a specific directory (and then output this into a file)
When I do this: ls -Rl
This list everything under the folder and subdirectories - the 'l' flag I used to get just file names
When I do this: ls -Rl *.MOV
Nothing is found
I've tried: ls -Rl *MOV
I'm sure I'm missing something fundamental
Thanks
OmarUse a command such as:
ls ~/Desktop/Archive/*.mov
Case matters when doing this; using MOV and mov will produce different results. This doesn't work if done with the R flag.
(87610) -
How to list the contents of an OSX directory, and output to text file?
hello there any hints with any known program that does following
I have recorded my music directory to DVD and now i would like to make an .txt file what the dvd contains...cos its way of hand to write all 100xx files by hand...
How to list the contents of an OSX directory, and output to text file?
any prog that does that? any hints?
best regardsThis script makes a hierarchical file listing all files in a folder and subfolder:
Click here to launch Script Editor.
choose folder with prompt "Choose a folder to process..." returning theFolder
set theName to name of (info for theFolder)
set thepath to quoted form of POSIX path of theFolder
set currentIndex to theFolder as string
do shell script "ls -R " & thepath returning theDir
set theDirList to every paragraph of theDir
set newList to {"Contents of folder \"" & theName & "\"" & return & thepath & return & return}
set theFilePrefix to ""
repeat with i from 1 to count of theDirList
set theLine to item i of theDirList
set my text item delimiters to "/"
set theMarker to count of text items of thepath
set theCount to count of text items of theLine
set currentFolder to text item -1 of theLine
set theFolderPrefix to ""
if theCount is greater than theMarker then
set theNestIndex to theCount - theMarker
set theTally to -1
set theFilePrefix to ""
set theSuffix to ""
repeat theNestIndex times
set theFolderPrefix to theFolderPrefix & tab
set theFilePrefix to theFilePrefix & tab
if theTally is -1 then
set theSuffix to text item theTally of theLine & theSuffix
else
set theSuffix to text item theTally of theLine & ":" & theSuffix
end if
set currentIndex to "" & theFolder & theSuffix
set theTally to theTally - 1
end repeat
end if
set my text item delimiters to ""
if theLine is not "" then
if word 1 of theLine is "Volumes" then
set end of newList to theFolderPrefix & "Folder: > " & currentFolder & return
else
try
if not folder of (info for alias (currentIndex & theLine & ":")) then
set end of newList to theFilePrefix & tab & tab & tab & "> " & theLine & return
end if
end try
end if
end if
end repeat
open for access file ((path to desktop as string) & "Contents of folder- " & theName & ".txt") ¬
with write permission returning theFile
write (newList as string) to theFile
close access theFile -
How to see the contents of jar file?
Hi
is there any way we can see the contents of jar file.(Since it is similar to zip file can we unzip it and see the contents)In total commander Ctrl + PageDown
-
How to get the contents of jar file?
Hi
is there any way we can see the contents of jar file.(Since it is similar to zip file can we unzip it and see the contents)You can use:
this->getClass().getResourceAsStream("/something.txt")
where 'something.txt' is a file inside your .jar -
How-to list the contents of a Data Pump Export file?
How can I list the contents of a 10gR2 Data Pump Export file? I'm looking at the Syntax Diagram for Data Pump Import and can't see a list-only option.
Regards,
Al Malinuse the parameter SQLFILE in the impdp which writes all the sql ddl's to the specified file.
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_import.htm
SQLFILE
Default: none
Purpose
Specifies a file into which all of the SQL DDL that Import would have executed, based on other parameters, is written.
Syntax and Description
SQLFILE=[directory_object:]file_name
The file_name specifies where the import job will write the DDL that would be executed during the job. The SQL is not actually executed, and the target system remains unchanged. The file is written to the directory object specified in the DIRECTORY parameter, unless another directory_object is explicitly specified here. Any existing file that has a name matching the one specified with this parameter is overwritten.
Note that passwords are not included in the SQL file. For example, if a CONNECT statement is part of the DDL that was executed, it will be replaced by a comment with only the schema name shown. In the following example, the dashes indicate that a comment follows, and the hr schema name is shown, but not the password.
-- CONNECT hr
Therefore, before you can execute the SQL file, you must edit it by removing the dashes indicating a comment and adding the password for the hr schema (in this case, the password is also hr), as follows:
CONNECT hr/hr
For Streams and other Oracle database options, anonymous PL/SQL blocks may appear within the SQLFILE output. They should not be executed directly.
Example
The following is an example of using the SQLFILE parameter. You can create the expfull.dmp dump file used in this example by running the example provided for the Export FULL parameter. See FULL.
impdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=expfull.dmpSQLFILE=dpump_dir2:expfull.sql
A SQL file named expfull.sql is written to dpump_dir2.
Message was edited by:
Ranga
Message was edited by:
Ranga -
JDeveloper 10g, ADF, ANT:How to define ant task for EAR & WAR file creation
I am trying to automate the deployment process of our ADF Faces & BC application. I have reviewed this doc:
http://download.oracle.com/docs/cd/B31017_01/web.1013/b28951/anttasks.htm
and followed the procedure for integrating ant onto the server. I can build the project and also successfully deploy the ear file. Howerver, I did not find any instruction on how to generate the EAR file. Can anyone point me to the right place for this task definition?
Here is my current build.xml file.
<?xml version="1.0" encoding="windows-1252" ?>
<!--Ant buildfile generated by Oracle JDeveloper-->
<!--Generated Jul 16, 2007 12:20:13 PM-->
<project name="CRDBApps" default="build-all" basedir="." xmlns:oracle="antlib:oracle">
<property file="build.properties"/>
<property file="ant-oracle.properties"/>
<target name="clean-all" depends="">
<ant antfile="build.xml" dir="CRDBView" target="clean"/>
<ant antfile="build.xml" dir="CRDBLib" target="clean"/>
<ant antfile="build.xml" dir="CRDBModel" target="clean"/>
</target>
<target name="build-all" depends="clean-all">
<ant antfile="build.xml" dir="CRDBView" target="compile"/>
<ant antfile="build.xml" dir="CRDBLib" target="compile"/>
<ant antfile="build.xml" dir="CRDBModel" target="compile"/>
</target>
<target name="deployear" depends="">
<echo message="-----> Deploying the application module deployment (ear) file"/>
<oracle:deploy deployerUri="deployer:oc4j:opmn://myserver/home"
userid="oc4jadmin"
password="password"
file="CRDBView/deploy/CRDBApps.ear"
deploymentName="CRDBApps"
bindAllWebApps="default-web-site"/>
</target>
</project>
thanks!
WesThanks all for the tips. After reading up a bit today on ear/war files and ant. I ended up just creating a task to mimic the ear/war file structure. My script isnt pretty but I'll work on refining that later. Here is what I have if anyone ever is interested:
<target name="war" depends="">
<echo message="Executing target war..."/>
<mkdir dir="war"/>
<copydir src="CRDBView\public_html" dest="war\"/>
<copydir src="CRDBView\classes" dest="war\WEB-INF\classes"/>
<copydir src="CRDBModel\classes" dest="war\WEB-INF\classes"/>
<copydir src="CRDBLib\classes" dest="war\WEB-INF\classes"/>
<echo message="Creating war file..."/>
<jar basedir ="war" destfile="CRDBApps.war"/>
<echo message="Done executing target war..."/>
</target>
<target name="ear" depends="war">
<echo message="Executing target ear..."/>
<mkdir dir="ear\META-INF"/>
<copydir src="CRDBView\deploy\META-INF" dest="ear\META-INF"/>
<copy file="CRDBApps.war" todir="ear\"/>
<jar basedir ="ear" destfile="CRDBApps.ear"/>
<echo message="Done executing target ear..."/>
</target>
<target name="cleanAndDeployCRDBApps" depends="build-all,deployear">
<echo message="Executing target cleanAndDeployCRDBApps..."/>
<delete dir="war"/>
<delete dir="ear"/>
<echo message="Done executing target cleanAndDeployCRDBApps..."/>
</target>
<target name="deployear" depends="ear">
<echo message="Executing target deployear"/>
<oracle:deploy deployerUri="deployer:oc4j:opmn://myserver:6003/home"
userid="oc4jadmin"
password="password"
file="CRDBApps.ear"
deploymentName="CRDBApps"
bindAllWebApps="default-web-site"/>
<delete file="CRDBApps.ear"/>
<delete file="CRDBApps.war"/>
<echo message="Done executing target deployear"/>
</target>
... -
How to view the content (contained objects) of transport files without importing?
Hi,
we do often receive transport files (DATA and CODILE) from third parties.
If is is done correctly the supplier of the transport files devliver also additional information about the detailed content of the transport, e.g object lists as plain text file, so that we are informed which objekts will be imported in advance.
But some suppliers don't. Or we want only check, if additional info and real transport content match.
So for that reason I am looking for a possible way to view the object list of such transports without adding it to the import queue or importing it to a sandbox system or even add it to the import buffer..
Most likely this should be done by a standalone tool (on Windows) or a tool running on SAP accessing the transportfiles (preference: stored only on the client PC and not added to the transport directory)
So my question is: Is there any tool that can extract the object list from the transport files and display it?
Helst regards
Helmut FischerHelmut,
If you don't have access to the server console, it might be possible to 'trick' tp into working from a workstation, but I wouldn't bet on it. You'd have to fake up a profile for it. I haven't tried this.
Peering into the contents of a delivered transport file would be something that your Basis team would typically do. My suggestion is to work with them, either to use tp command-line option from the server console, or if that's not reasonable, then yes, go ahead and add it to the import queue of one of your sandbox systems. You can always delete it from the queue again later. If you don't actually import it, it isn't going to hurt anything.
To do any of these options is going to require some level of filesystem access to your transport host, as you need to copy the two files that make up the transport there. You need to put the 'K' file into \usr\sap\trans\cofiles and the 'R' file into \usr\sap\trans\data. Then, you can either use the tp command-line tool, or you can go into STMS, go into the import queue of any system in the transport domain (so a sandbox is fine), and use Extras... Other Requests... Add and type in the transport request ID. Yes, this adds some entries about the transport into a few tables, but it doesn't actually import the transport, and it doesn't change anything about your system. It just allows the transport to show up as importable in the queue, and that will make it so that you can read the object list of the transport. Then, if you decide not to import it, you can delete it from the queue, and your system is back to the way it was before. Also, doing this will not put the transport into any other system's queue. Even if you import the transport (into a sandbox system), it won't show up in any other system's queue until you forward it.
Regards,
Matt -
How to setup the default run page in WAR file
Can anyone please tell me how to setup the default run page in WAR file using JDeveloper? I want the login page to be the default page of the application. Thanks!
This is usually done in an .XML or other configuration file based on the particular web application container you are using.
For example, in Tomcat Java Container, its the following parameter in the /conf/web.xml file:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
You will need to look at the documentation for your server container.
thanks -
How to list the content of a URL
Hi All,
I am wondering whether the method of listing the content of a URL, is the same as listing a directory on a local system? The listing of a local directory can be achieved with the following code for example:
File dir = new File("directoryName");
String[] children = dir.list();
if (children == null) {
// Either dir does not exist or is not a directory
} else {
for (int i=0; i<children.length; i++) {
// Get filename of file or directory
String filename = children;
// It is also possible to filter the list of returned files.
// This example does not return any files that start with `.'.
FilenameFilter filter = new FilenameFilter() {
public boolean accept(File dir, String name) {
return !name.startsWith(".");
children = dir.list(filter);
// The list of files can also be retrieved as File objects
File[] files = dir.listFiles();
// This filter only returns directories
FileFilter fileFilter = new FileFilter() {
public boolean accept(File file) {
return file.isDirectory();
files = dir.listFiles(fileFilter);However, I am not sure whether it is as simple as replacing "directoryName" with "http://www.abc.com/photos" when using java.net.*.
I am automating a task to download all photos in a gallery at certain website.
Any assistance would be very much appreciated.
Many thanks,
JackHi paulcw, JoachimSauer,
Thanks for answering to this post.
I am only trying to automate some downloads of quite a of photo albums of relatives overseas. It only takes a few weddings to take hours to download. Moreover, the reason for having made the photos on the Internet so that the relevant parties can do their own download at their convenience for free as opposed to costing the individual to spend time and money on burn dozens of DVDs... After all, this is information age we are living in.
Lastly, I am hoping to use the getContentType() method to determine the exact type of image such as jpg, gif, etc but doesn't appears that it is doing the right job. Is there any other way to do this instead?
Thanks a lot again,
Jack -
EAR/WAR File Deployment Query on WEBLOGIC SERVER
Hi,
We are running weblogic server version 10.3.4.0 where EAR/ WAR files deployed on single server and that has been configured in the current WebLogic Server domain. These applications are up and running fine. We need to deploy a new WAR file on the same domain. My questions are:
@ Whether I can deploy new WAR file without STARTing and STOPing weblogic server instance?
@ When deploying new WAR file, whether it will affect existing deployed files or will it affect any other running services for a fraction of second?
Note: This new WAR file is independent application and will not affect any other services in the future.
Please assist.
Thanks,
DheerajThank you for your help but the result is still the same.
I deployed the library on weblogic server suggested by you.
File Deployed as library = oracle.adf.desktopintegration.model.ear
From the folder = C:\Oracle\Middleware\oracle_common\modules\oracle.adf.desktopintegration.model_11.1.1
It is active.
After this I loaded jdeveloper and deploy the same sample application and found that the result is same.
Pls let me know where I am going wrong.
Regards,
Masood
[11:53:09 AM] ---- Deployment started. ----
[11:53:09 AM] Target platform is (Weblogic 10.3).
[11:53:09 AM] Retrieving existing application information
[11:53:09 AM] Running dependency analysis...
[11:53:09 AM] Building...
[11:53:09 AM] Deploying 2 profiles...
[11:53:09 AM] Wrote Web Application Module to C:\JDeveloper\mywork\10MinDemo\ViewController\deploy\10MinDemo_ViewController_webapp.war
[11:53:10 AM] Wrote Enterprise Application Module to C:\JDeveloper\mywork\10MinDemo\deploy\10MinDemo_Project1_10MinDemo.ear
[11:53:10 AM] Deploying Application...
[11:53:10 AM] [Deployer:149191]Operation 'deploy' on application '10MinDemo_Project1_10MinDemo' is initializing on 'ADFServer'
[11:53:11 AM] [Deployer:149193]Operation 'deploy' on application '10MinDemo_Project1_10MinDemo' has failed on 'ADFServer'
[11:53:11 AM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application 10MinDemo_Project1_10MinDemo on ADFServer.: .
[11:53:11 AM] Weblogic Server Exception: weblogic.management.DeploymentException:
[11:53:11 AM] Caused by: java.lang.ClassNotFoundException: oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener
[11:53:11 AM] See server logs or server console for more details.
[11:53:11 AM] weblogic.management.DeploymentException:
[11:53:11 AM] Deployment cancelled.
[11:53:11 AM] ---- Deployment incomplete ----.
[11:53:11 AM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer) -
I cant list the contents of my *llb help please
I have this error message "An error occurred while listing the contents of xxxx.llb"
I think the file is corrupted can I recover the vi's inside?
Attachments:
Cont Acq&Chart modified.llb 637 KBNI might be able to. You can try contacting them by going to NI Support. A corrupt llb when you don't have a current backup can be a major problem. That is why they should never be used in development to save your VIs. The intent of an llb was to give the use the ability to create VIs with longer names than the old dos 8.3 format. The only reason to use an llb now is to make distribution of a project simpler. Good luck.
-
Deploying ColdFusion 8 project via EAR/WAR file
I was wondering what considerations to take when deploying a ColdFusion 8 project as an EAR/WAR file. Is it possible to create the file on one computer (eg: development) and run it on another (eg: server)?
ecalibur_lk wrote on 1/14/2010 11:47 PM:
With ColdFusion packaged into the EAR, do you need ColdFusion installed on the environment you are deploying it on for it to work?
No. You need to have a J2EE server like JBoss or JRun.
If so, does it make a difference on what version of ColdFusion it is packaged with (eg: Developer vs. Enterprise edition)?
If you want to We package our EAR files without a license key and
leave it up to our clients to make sure they have the proper licenses
for their environment. If they put a key in the properties file, we use
the Admin API to register the instance. If they don't put a key in the
properties file, the instance is a developer edition.
Do you know of somewhere that describes how to build an EAR file via ANT and how to deploy it?
http://www.adobe.com/devnet/coldfusion/articles/ear.html -
What is the difference between JAR and WAR
would u pls tell me how to answer the Diffrences between JAR and WAR, if interwiever asked
I hope you know what a JAR file is. If not, you need to study the Deployment trail in The Java Tutorial.
If you have basic knowledge about programming web applications in Java, you should also know what a WAR file is. It's a special kind of JAR file that contains a standard directory structure, which includes a WEB-INF directory with the deployment descriptor and other parts of the web application. -
hi
my team is using oracle 10g Application srever[9.0.4] and jdeveloper..
ear/war files are prepared for deployment.
can i encrypt them while deploying them at custmers site for testing..
regards
avinashAs far as I know this is not possible.
Maybe you are looking for
-
Linking to a specific image in a gallery
Hi All, I'm putting together a book where I have image references within the text of the chapters. Ideally, I'd like to be able to click on the image reference (text) such that an image appears as a gallery overlay, which would then allow me to view
-
Can not open OMF file in Soundtrack
I'm trying to open an OMF file in Soundtrack that was exported from FCP and it gives me this. CNSExceptionWrapper type = 16777216, error = 1886547263, message = error: Failed to open or create audio file for writing. What should i do?
-
Gap in graphic only in Mac IE 5x...help fix?
My site so far looks the way I want it too in IE 7 (I am assuming 6 too), Firefox, and Safari. BUT there is a gap in the graphics in IE 5x on the Mac. I have tried reverse engineering it, but I can't figure out what the hell the problem is. Can someo
-
Enabled Apache and now my MacBook Pro won't start at all
Subject pretty much says it all. I was enabling Apache, php and installing ioncube. Restarted the computer, because I wanted to make sure Apache really was restarting... and now the computer will not come on at all. I hear the CD start-up bit and the
-
How to search transcription metadata in multiple clips?
Working a on documentary with 20 hours of Scarlet interview footage. We've had a transcription service type everything out and I have synced the anaylasis with the script. My question is, can I search for a keyword and have it jump through all the