How to make jar file for this compilation method ?
can any one tell me how to make jar file for this compilation
D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJava
*this is a compile code:-*
D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
*and this is a run code:-*
D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJavanow how make JAR file ?
Assuming IEInJava only uses classes inside the jdic jar, this is one way. D:\java\browser\IEInJava> jar cf yourjar.jar IEInJava.classThen to run it you would use D:\java\browser\IEInJava> java -cp jdic.jar;yourjar.jar IEInJavaAnother way would use the jar manifest file to specify the Main-Class and Class-Path.
Similar Messages
-
How to make .jar file for a multiple class program
I have a code for a chat room that contains two folders , one for Server and one for Client
What I need is to create a jar file for the server and a jar file for the clients
but here the first problem , I have a file that named (SocketMessengerConstants.class) that is located outside the two folders and is being read by the two projects .
I mean the server uses it while running and the client uses it too .
the second problem is : I don't know how to create a jar file at all !
please tell me how to do it in detail
Thank youChuckBing wrote:[Packaging Programs in JAR Files|http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]
I tried to read this tutorials before I come here but I couldn't understand it
can you please tell me a specific steps to follow instead of the explaining .. because I understand the explanation but I can't apply it -
How to make jar files availabe for deployed EJBs
Hi,
I'm interested on how to make jar files availabe for deployed EJBs.
My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
classpath, but I think that shouldn't be the way. Is there somthing in the admin
console to make jars available or do I have to insert it in the ear file? And
if so, where do I hve to place it?
Thanks
ClaudiaPut the util.jar in the ear with your ejb jars - at the same level (i.e. in
the root) - but do not include them in the manifest.xml.
Also each ejb jar that refers to util.jar must have util.jar on its internal
classpath in the manifest.
"Claudia" <[email protected]> wrote in message
news:3d537db5$[email protected]..
>
Hi,
I'm interested on how to make jar files availabe for deployed EJBs.
My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
classpath, but I think that shouldn't be the way. Is there somthing in theadmin
console to make jars available or do I have to insert it in the ear file?And
if so, where do I hve to place it?
Thanks
Claudia -
Help! How to create Jar file for a packaged class?
Hi!
I am new in jar complexities. I made a swing frame that just prompts a JOptionPane when executed. I accomplished the same using jar without packaging my class SwingTest.
But when i package it, it doesn't run. Can any one tell me how to make jar file of packaged classes and include images in the jar files too!
Really Thanx!Call the Jar from the commandline to see the exceptions thrown.
java -jar <jarFileName> <className> -
How to make Jar files in JBuilder
I would like to know how to make jar files using JBulider. I have a problem with a project that I am working with in Swing. I have made the project on JBuilder and when I make a jar file it will not run upon clicking.
Any body with an answer, please help
AbhiIt sounds like your Main-Class is not set properly in your manifest. To set your Main-Class, please follow these directions:
http://java.sun.com/docs/books/tutorial/jar/basics/run.html -
How to make jar files at runtime in a server application
I am using Jung API and i need to load the class files in this JAR file for my application at runtime.
I am using an applet which uses this API which is loaded with the help of a Servlet.
The code is getting compiled but the JAR files and associated classes are not available at the runtime
How to make themk avalable.
I have tried various options like placing jar files in
WEB-INF/lib
$Catlina_Home/commons/lib
But it is not working can anyone help me it is of high urgency to me
How to make that classes in the JAR file available to my applet at runtimeSuperJavaHello wrote:
How to make that classes in the JAR file available to my applet at runtimeAhh! The runtime is an appler! The applet is on the Client, and the Client does not have access to the Server's classpath. You need to un-pack the JAR, then re-pack the classes into the JAR used to pack your Applet, the one that you are using as the code source in the applet tag. -
hi
i want to make my jar file of my own package name "practise".
can u help me in making jar file.
what is the command to make jar file?
expected name of jar--> runner
package for which i want to make jar----> practise
plz help me in this regard.
i m very greatfull to your precious comments and suggestions.hi
if u r creating first time means...
jar cf filename.jar *.*
u want to update jar
jar uf filename.jar *.*
extract
jar xfv filename.jar
(filename is ur package name)
do this...
. -
Can we make jar file for simple j2se application
Hi..Can we make a jar file for simple j2se application so that it can be executed on any system like .exe file...
Read the JAR files section in Sun's Java tutorial.
-
How To make jar file through Command Promt and run it through Command Promp
Now i am using Netbeans to create jar file but i want to create jar file for my project through command line and also want to run through command line
Note: This thread was originally posted in the [JDK's Monitoring & Troubleshooting Tools|http://forums.sun.com/forum.jspa?forumID=538] forum, but moved to this forum for closer topic alignment.
-
How can I make .jar files for applications?
My jar program creates jar files but won't open the program when I double click them. I use the command:
jar cvf *.jar filenames
The jar file is created but won't execute. Can anyone tell me what i am doing wrong?
Thanks
JibyHello !
Well, I had the same problem a week or two ago !
First, in your *.java, don't use any package...I mean, don't do a package of your program (I guess there is a way to make it work with, but it would need a little bit more work...).
Then, with the jar tools, use the command
-jar cf jar_that_you_want_to_create.jar class-that_you_include_in_your_jar.class
With that, a jar will be created, and when you will try to "run" it, it will say that it can not find the main class...
You need a Manifest !
Create a text file MyManifest.text, and write that in your text file :
Main-Class: classname
follow the same as i wrote above. leave a blank after colon and a blank line after the first line like above.
then, well, use tha jar tool again:
-jar umf MyManifest.txt jar-file-you-created.jar
To "run" it, double click on it, or use the java tool:
java -jar jar_you_created.jar
Thanks to Phani, who helped me with that !!
Splitsch -
How to deploy jar file for use within mapping user-defined fcn
Hi all,
I have a java class I'd like to called from a mapping user-defined function.
Here's what I've done (but hasn't worked)
1. Added 'package com.<mycompany>.xi.util.base64 to the source class file and compiled it.
2. Created a sda with a plain provider.xml file, i.e. no references were made to any other library files.
3. Deployed the sda to the xi 3.0 j2ee server successfully using SDM.
4. Under the Visual Admin tool, I see that the library was deployed successfully.
5. In the import text box in the user-defined function (design time), I enter com.<mycompany>.xi.util.base64.*.
A syntax check returns an error indicating the package could not be found.
Can anyone give me pointers as to how I can get this working?
Thanks,
--jtbHey James,
No! That's not the right way!
What you have done is for accessing external JMS & JDBC drivers in their corresponding adapters. For the access inside a mapping user defined function, it's enough if you import the jar files.
Look at this blog and you will be very clear!
/people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
regards,
Felix -
How to make .jar files executable by double clicking
hi,
I've been trying to make my .jar file created via ANT Tool executable by double clicking it but I'm not being successfull. I looked at the ANT Tool for making manifest.mf and I included most of the attributes listed there and later found that Main-Class attribute is required but its not mentioned in the documentation.
So, I'll be very greatful to receive any suggestions
regards,
Jayya I've been doing things the same way mentioned there but it isn't working. here is the code for it:
//All the .class files are in the build directory and the class files are under the package org.home.proj.
<!-- For making .jar files -->
<target name="jar" depends="compile" description="Makes CyberStation.jar from the CyberStation code.">
<mkdir dir="${bin}" />
<jar jarfile="${bin}/CyberStation.jar" basedir="${build}">
<exclude name="**/run.bat" />
<manifest>
<attribute name="Buily-By" value="${user.name}" />
<attribute name="Main-Class" value="org.home.proj.CyberSoft" />
<section name="org/home/proj/CyberSoft.class">
<attribute name="Sealed" value="false" />
</section>
</manifest>
</jar>
</target>It show the error: Could not find the main class. The program will exit.
regards,
Jay -
How to make installer file for windows?
Hi,
I want to make a installer file for auto installing the ssl certificate. My folder contains following files:
1. importpfx.exe
2. Main.java
3. Main.class
4. TestCertificate.p12
I want to bundle above files into a single setup file.How should it be done?
Thanks in AdvanceIf you want to make an installer file for windows, i think below link is suitable for your requirement. I never tried this approach of creating the installer file of java applications. But while reading the description of it, i thought that it may suits to your requirement.
Here is the link : http://www.ej-technologies.com/products/install4j/overview.html
Description : install4j is a powerful multi-platform Java installer builder that generates native installers and application launchers for Java applications. install4j excels in its ease of use, its extensive platform support and its powerful screen and action system
Thanks,
Uday. -
CS3, Encore; How to make a file for a mediaplayer
Hallo there,
How can I make a file in Encore CS3 that is readeble in a mediaplayer like a Popcorn.
I know how to build a Blu-ray ofcourse, but I want to deliver a file to my customer for his mediaplayer.
Can someone help me, because Adobe helpline in Holland does not cover Adobe CS3 anymore.
I hope to hear from someone out there on this planet
Greetings,
BertFrom Encore nothing that results in a single file.
2 options.
1) Build to a folder and play the DVD folder. The method varies on the mediaplayer. For Windows Media Player on XP, I just right click the first .ifo file in the VIDEO_TS folder and "Play."
2) From Encore, Export to Flash. The produces a web page (and folders) that can be played locally through a browser. -
How to make jar file of application using JMF
Hi
i developed an application which uses JMF it works well during compilation and displays audio and video too.
but after builting jar file it doesn't works.
abdulWell you've found the root of your problem. It's not necessary the JMF. It's when you make a jar file, you need to include the dependencies. I don't think it' legal to include the JMF in a program you sell or distribute, so be careful there.
However, to include dependencies in jar files is not a hard task. The simplest method is to unjar the dependency and place it at the top or your classpath; then make a jar that includes both your program, and the dependency.
A more long term solution is to use a build system such as ant or maven to create the package using available scripts or plugins. The "Uberjar" plugin for maven comes to mind.
-vito
Maybe you are looking for
-
Would porting a month-to-month feature phone line out cancel my unlimited?
Hi, I have the following lines in my family plan. 1 = Unlimited 2 = Unlimited 3 = feature phone, month-to-month 4 = feature phone, contract I want to port #3's phone number out to a different carrier since the user wants her own independent line. I h
-
Iphone 5 not charging after connected via usb and charge icon appears and charge sound occurs.. Need immediate help! Thank you!
-
How to get Midi echo function?
I can't get midi echo function: triggering contemporary 3 (or more) channels of a multi instruments. How can it be done?
-
Complete information of struts page flow diagram in JDeveloper 10g
thank you for giving me the previous information now i want to ask u the full information of the struts page flow diagram in jdeveloper 10g please send me the complete information through diagrams Regards Vikas Sheel Gupta
-
Dang Frustrated with Dreamweaver CS3!
For the past 23 years I have taught myself all the computer programs I use from Freehand, Photoshop, lllustrator, Indesign, plus many others yet I rarely had to look up something in a book and get the answer. Not so with Dreamweaver! I can't seem to