Professional Documents
Culture Documents
jar
/home/oracle/SNP2/apps/apps_st/appl/wms/12.0.0/java/jar
javac -classpath $JAVA_TOP ItemQuantitiesInquiry.java
javac -classpath $CLASSPATH ItemQuantitiesFunction.java
javac -classpath $CLASSPATH ItemQuantitiesInquiry.java
Question
How do I create a .JAR file?
Answer
Java Archive (JAR) files allow developers to package many classes into a single file. JAR files also use
compression, so this can make applets and applications smaller.
Creating a .JAR file is easy. Simple go to the directory your classes are stored in and type :-
jar -cf myfile.jar *.class
If your application or applet uses packages, then you'll need to do things a little differently. Suppose
your classes were in the package mycode.games.CoolGame - you'd change
to the directory above mycode and type the following :- (Remember to use / on UNIX systems)
jar -cf myfile.jar .\mycode\games\CoolGame\*.class
Now, if you have an existing JAR file, and want to extract it, you'd type the following
jar -xf myfile.jar
Working with JAR files isn't that difficult, especially if you've used the unix 'tar' command before. If
you're planning on packaging an applet for Internet Explorer, or an
application for Microsoft's jview, you might also want to consider .CAB files.
setenv CLASSPATH
class files
/home/oracle/oracle/apps/custom/deckers
Move jar file to middle tier using an ftp tool
Extract jar file using : jar -xfv ModelReport.jar
/home/oracle/oracle/apps/custom/deckers
CONTROL+X CONTROL+A
/home/oracle/PROD/apps/apps_st/comn/java/classes
/home/oracle/PROD/apps/apps_st/comn/java/classes