Jar: How-To
Hi All,
I have an applet of about 25 class files,30 images,
and an XML file to read the data. Could somebody show
how to make these into two jars one containingthe
images &
XML data and one that contains the class files? I'm not sure if this is possible. Perhaps I would have to have the two jars inside of one jar so they would both tranfer at the same time? If not maybe you could show me how to add them all into one jar that can be executed from a webpage and how to execute it.
Thanks
Ian
jar cmf myJarName1.jar *.class *.xml
jar cmf myJarName2.jar *.jpeg
OR
jar cmf myJarName *.*
can't remember if it's *.* or just plainly *
Similar Messages
-
Tools.jar: how to use it?
in my app, I use some classes of tools.jar
but I can not find the jar file in JRE directory, which is only in JDK directory.
if I distribute my app to customers, they can not use it, because they possiblly only installed JRE rather than JDK.
so how to use tools.jar?Isn't tools.jar the JDK tools, e.g., javac, javap, etc.?
What are you doing that requires those tools, such that your customer needs it?
Secondly are you sure that Sun's license allows you to distribute the stuff in tools.jar?
It seems like the only solutions would be to refactor your code to no longer use tools.jar, or tell your customers that they have to install the JDK themselves (I've seen other products do that), or to possibly get a special license from Sun. -
Package Library-Jars into Dist-Jar - how? (NetBeans)
Hi,
When I add Libraries to my project in Netbeans, when building the project they are copied to dist/lib/ - this works fine, but I'd like them to be included the dist/project.jar file...
Is there any way to do so?Hi!
What NetBeans version do You use and what kind of project do you have?
This is forum about Sun Java Studio Creator and in NetBeans web application with "Visual Web JSF" framework corresponds to Creator's project.
And for me in "Build > Packaging" there is table where You can add necessary JAR files. Are You developing web application with "Visual Web JSF" framework or not?
Thanks,
Roman. -
How do you know the version of a JAR file ?
how do you know the version of a JAR file ?
is it what is written on MANIFEST.MF ?
for example i have a JAR file
whose MANIFEST.MF has this
Manifest-Version: 1.0
Created-By: Ant 1.4.1so, whats the version of this JAR ? 1.0 ?anyway, that was JSTL..jar.
Now, come to another JAR file....
whose MANIFEST.MF has......
Manifest-Version: 1.0
Created-By: Apache Ant 1.5.1
Extension-Name: Struts Framework
Specification-Title: Struts Framework
Specification-Vendor: Apache Software Foundation
Specification-Version: 1.1
Implementation-Title: Struts Framework
Implementation-Vendor: Apache Software Foundation
Implementation-Vendor-Id: org.apache
Implementation-Version: 1.1
Class-Path: commons-beanutils.jar commons-collections.jar commons-dig
ester.jar commons-logging.jar commons-validator.jar jakarta-oro.jar s
truts-legacy.jarso, How do you believe whats the version now ? do u go with the comment "Manifest-Version: 1.0" or "Specification-Version: 1.1" ?
definitely, you would go with the "Specification-Version: 1.1" and declare this JAR as STRUTS 1.1
hmmm, so, if nothing is mentioned like above should we follow the MANIFEST version as the JSTL version ? in my earlier example i did not find any comment on ""Specification-Version" ......so , if anybody gives me that JAR , how do i decide whether its 1.0 specification or 1.1 specifucation compliant ?
can you tell whats the JSTL version of my earler example JAR file ? -
How to deploy a simple .jar (containing Helper classes) in Weblogic?
Hi,
I have created multiple .jar files.
1) MDB.jar containing all my MDB classes.
2) Bean.jar containing all my Session Bean classes.
3) Utility.jar containing remaining Helper,utility classes.
I had deployed MDB.jar, Bean.jar by using Weblogic Console, under 'Deployments'-> 'EJB Module'. How can i deploy Utility.jar ? First of all, do i need to deploy Utility.jar? Only EJB JARs need to be deployed?
If we do not deploy a non-EJB JARs, how this code will be available and is executed?
Thanks in advance.I'd recommend you deploy these 3 components together in an EAR file. THe utility jar file could go in APP-INF/lib, or you could reference it via manifest class-path entries.
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
How To Access a jar file present outside the war file through a jnlp
Aoa
I m new to this forum
I m having problem with my jnlp file
i want to know is there any way to access a jar file through jnlp.The problem is that my jnlp file is present in the war file
and i want to know how to acess a jar file through this jnlp.The scenerio is as below
I m using ear file on jboss.Its hirerchy is as
-PAN-war.war
-launch.jnlp
-PAN-app-client.jar
my jnlp file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="PAN/launch.jnlp">
<information>
<title>PanEmirates</title>
<vendor>M Fazal Ur Rehman</vendor>
<description>PanEmirates</description>
<description kind="short">PanEmirates</description>
<homepage href=""/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+"/>
<jar href="PAN-app-client.jar" download="eager"/>
<jar href="lib/javafxrt.jar" main="true" download="eager" />
<jar href="lib/Filters.jar" download="eager"/>
<jar href="lib/javafx-netbeans-fxuserlib.jar" download="eager"/>
<jar href="lib/swing-layout-1.0.3.jar" download="eager"/>
</resources>
<application-desc main-class="net.java.javafx.FXShell">
<argument>pan.Main</argument>
</application-desc>
</jnlp>
when i run launch.jnlp file it says unable to download resource http://localhost:8080/PAN/PAN-app-client.jar
how to access this jar file
Any help or comment would be highly appreciated
Regards
M Fazal Ur RehmanExcellent question. I don't see any client-jar in your EAR file structure. So I am assuming you are writing a separate client application which will talk to the ejbs deployed as part of this EAR. You need to do the following:
Write another EAR file with the following structure:
ear:
META-INF/application.xml
util.jar
client.jar
client.jar should have a META-INF/MANIFEST.MF and that should contain Class-Path:util.jar and value for Main-Class attribute.
Now deploy this new ear to your application server and execute it using Application Client Container that comes with your app server.
If you don't want to write another EAR file, then bundle th client.jar in your original EAR file.
Points to note are:
you have to repackage util.jar again inside this ear file.
For portability reason, you should use Class-Path manifest entry in client.jar. Refer to http://java.sun.com/j2ee/verified/packaging.html and J2EE platform spec section #8.2.
Hope this helps,
Sahoo -
How to verify existence/absence of debug information in a jar file
Given a jar, how can I tell if it contains debug information or not? Is there a tool for this? (e.g, like the 'file' utility on linux, which outputs whether an ELF executable is stripped or not)
AmitI'm not saying it's pretty... but there's a horrible quick & dirty way of checking for debug info
Typically the debugging information is stored is special attributes in the class files, like "LineNumberTable", "LocalVariableTable" etc.
Depending on which type of debugging setting was used to compile the source code, these will be present in the binary class file.
So, you might unjar the contents of the jar and run eg.
find "LineNumberTable" *.class
to find all classes with line number information.
I tried it on a sample class and it worked for me here.
Hey, I know it's a hack, but not everyone has time to write a full disassembler !
regards,
Owen -
How to edit MANIFEST.MF in .jar ?
I'm use java on mac osx and I can't edit MANIFEST.MF in side .jar for refer to Main()
now i have Main.jar and Talk.jar
main is in .main.jar
and another one is in /libary/Talk.jar
how to edit MANIFEST to link to another Class directory ?
this is in MANIFEST of main.jar
Manifest-Version: 1.0
Main-Class: Main
Class-Path: /libary/Talk.jar
it right ?
i can't link to Talk.jar -
How does xalan.jar work with jdk1.3.1 and not work with jdk1.4.1
Hi,
i am using java, xalan, xerces for web development. The environment is jdk1.4.1, xerces.jar, xalan.jar. i am facing problem while transforming xml, xsl. Its giving the following error
java.lang.NoSuchMethodError: org.apache.xalan.xslt.Process.getDefaultLiaison()Ljava/lang/String;
at org.apache.xalan.xslt.XSLTEngineImpl.(XSLTEngineImpl.java:367)
at org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor(XSLTProcessorFactory.java:79)
I tried with jdk1.3.1, xalan.jar, xerces.jar. Its working fine. Can anyone tell me what is the problem with jdk1.4.1 ?
Regards
AshokI have the same problem, but the version within SUN seems imcomplete,what version is ?
For example I am using the xsl tag library provided by Apache (I know this now deprecated). In its ApplyTag.java it uses XSLTDataSource this is not in the SUN 1.4 distribution so it falls over. If I add XALAN 1.0.1 it falls over because it on getDefaultLiason() because it starts loading somne classes from rt.jar and some from xalan.jar, how are you meant to override this. -
How to add jar files to applet's classpath
hi everyone,
i got an issue to add jar file's to applt's classpath,
i looked around accross many resources but getting no solution on this.
i have a commons-httpclient3.1.jar and i have to make it available it to a an applet class bundled in a jar file say myjar.jar
how can i achieve it?
any help would be much appreciated
thanksThat's a long time I haven't written applets, but if I remind well, we are able to set multilple jar in the classapth parameter, separated by semicolon.
Look the page http://java.sun.com/docs/books/tutorial/deployment/applet/html.html
Edited by: jswim on Dec 6, 2007 3:51 PM -
HOW TO REGISTER jars ???
Hi guys,
I've got a problem during (un)deployment of sda files.
If I try to undeploy my adapter.sda I get :
[permissions_collection_operator]: domain[apps//ecs.com/com.ecs.aii.af.tc.ra/connector/connectors/adapter.rar/adapter.jar] not removed, because is not registered
What does that mean? AND HOW CAN I "register" the jars?
If I include any external libraries (.jars) I get the same errorMessage for these jars too.
The structure of my adapterSDA looks like this:
adapter.sda
|-META-INF
|-|-...some xmls and manifest files
|-MY_EXTERNAL_JARS (for example xercesImpl.jar)
|-adapter.rar
|-|-META-INF
|-|-|-...some xmls and manifest files
|-|-adapter.jar
How can I prevent this???
Thank you very much for your help!!
Best regards, ChristianHi,
I just want to mention that the (un/)deployment of the
sample Adapter
[sample_ra.sda] also brings up this errors!
Can anybody tell me whats going wrong here??
Thanks in advance!
Best regards,
Christian -
Hi this is related to the wizard creating component required .jar file. Can any body tell me , how to get this jar file. I have searched in my IDE plug-in's folder. But i have nt find this.
com.sap.portal.admin.wizardframework_api.jar
how to get thid jar file.
REgards
VijayHi,
You should have com.sap.portal.admin.wizardframework in your SharingReference:
<property name="SharingReference" value="com.sap.km.application, com.sap.portal.admin.wizardframework"/>
Pls check this link,
http://help.sap.com/saphelp_nw2004s/helpdata/en/42/bf4172cb951d66e10000000a1553f6/content.htm
Hope this helps !
Regards
Srinivasan T -
How do I deploy a custom plugin jar in OVD11.1.1.5
Hi all,
I have created a custom plugin and build the jar. how do I deploy the plug-in jar in OVD11.1.1.5.Thanks for the suggestion...I did read up on the count function, but I don't think it will give me what I want. I need a a counter that increments for each payment made to a supplier, not a total of the number of payments made to that supplier.
Any other suggestions, please?
Tam. -
Hi this is related to the wizard creating component required .jar file. Can any body tell me , how to get this jar file. I have searched in my IDE plug-in's folder. But i have nt find this.
com.sap.portal.admin.wizardframework_api.jar
how to get thid jar file.
REgards
VijayVijay,
You can access the above mentioned par file from this location,
System Admin -> support -> Support Desk->ROOT/WEB-INF/deployment/pcd (download this folder)
->com.sap.portal.admin.wizardframework.par.bak->extract the file
alternatively,
u can find the same in,
\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.admin.wizardframework\lib
Thanks & Regards,
Ramganesan K
Keane Inc -
How to let users run your Java application
Hello,
I'm writing an application using JBuilder7 and it's wonderful designer: so far it is composed by only 2 class and imports java.awt.* and javax.swing.* (SDK 1.4)
Now, I've yet to finish it but I was wondering: "how will users be able to use it?"
I don't want them to install 30+ Mb of SDK so I've looked into the forums and elsewhere and come up with several answers:
1) Let them install JRE: but it's 10+ Mb and they would need to download it separately from my program.
2) Let them use somehow their browser's JVM..(should I turn my application into applet for this? I guess so)
3) Make an .exe: I know there are many programs to make .exe from java but they would make a one-platform-based file.
Also there were many hints about using .jar files to get things easier.
Is there a 4th option in which users have to download only a few mbs to use the application?
And about .jar, how should I use it?
Thank you very much for all your help :)Simply put - the users must download or be supplied the JRE. This must be installed before they can execute your java application.
As to distributing the application itself - You can jar (Java Archive) your classes into a single file.
You could as has been suggested create an EXE, but these generally are very large and tend to severely restrict the range of java technologies able to be used (EG Serialization, RMI, Reflection, class loading, ...)
Java is not intended for little tools that get installed separately - It is intended for larger applications or small applets in which case the download of the JRE is a minor concern.
Note that applets targeting Java 1.1.7 functionality work fine with most old browsers inbuilt JVMs - Your customers browser may not however have an inbuilt JVM and the user will still need to download the JRE to execute a SWING based applets.
Talden
Maybe you are looking for
-
There are no drivers for a Sony CCD-TRV608 Hi8 Camcorder for Windows 8.1. How can I solve this problem? Do I need to buy a newer or different model that plays video8 and videoHi8 tapes that IS compatible? Its a shame because I searched for months
-
Inserting dynamic image doesn't work for range of records
Hi, I'm using BI Publisher 5.6.3 and E-business Suite 12.1.3. I have set up my RTF template so that it brings in a logo image dynamically onto an invoice. The code in the "alt text" field behind my dummy image is: url:{concat('${OA_MEDIA}/',//CF_LOGO
-
[b]Start and Stop[/b]
Hello all, I recently updated my Norton Internet Securiy in my system(running Windows XP professional) with Oracle 9i R2 was running fine before the update. Now am not able to access my iSQLPlus.I checked Controlpanel services and found Http service
-
Photoshop CS6 will not install- associations issue
Every time I click the install button in the cs6 set up I get this error: "this file does not have a program associated with it for performing this action. Please install a program, or if one exists, create an association in the default programs con
-
Help! - iTunes library won't import all files
I just bought my iPod nano 3 days ago Itunes installed fine. I have a LARGE mp3 collection (around 2800 songs). When I drag the top level folder for the entire collection to the library in the source window iTunes begins to import all of the tracks,