How can I create a jar file?
-
I tried creating a jar file using the jar command in the command prompt but I get "jar is not recognised as an internal or external command, operable program or batch file".. I viewed various tutorials from the net and got the same technique of passing through command prompt. But I think my command prompt doesn't support the jar command ... How can I create a jar file now?? Thanks in adv
-
Answer:
Check your environment variable. Doesn't seem like java install folder is set in your path.
Confused at Yahoo! Answers Visit the source
Other answers
When you say you have java installed, you mean the java development kit right? just installing the java runtime which is all you need to run java applets is not enough, jar is a program inside of the jdk. make sure THIS is what you got: http://java.sun.com/javase/downloads/widget/jdk6.jsp its about 76mb, the java runtime is much smaller ,like around 10mb If you're sure you have the JDK, then you must not have jar in your path, do a search on your computer for jar or jar.exe and then from the command line you want to go into that folder and then type jar, then you want to add whatever folder jar is located in to your path so that you can run jar no matter what folder you're in. here's how to add a folder to your path: http://www.windowsitpro.com/article/configuration/how-can-i-add-a-new-folder-to-my-system-path-.aspx
you have to install java for that
I can't remember whether or not the jar tool comes with the JDK or JRE. I think you have to have the JDK installed. If you're on windows, which it sounds like you are, you will need to modify your PATH environment variable to include the directory that jar is in. This will usually be something like C:\<path to jdk>\bin.
1) Find the directory where java is installed. Let us assume it is C:\java. Then go to C:\java\bin. If you find jar.exe in this bin directory, then you are good. 2) Set the path to the java bin directory. 3) Then try to type jar in your command prompt. To set your path: there are several ways. 1) To set it from command prompt, in the command prompt type SET PATH=%PATH%;C:\java\bin 2) Then hit enter 3) Note: if you have installed java in a different directory type that directory name. I have just provided C:\java as an example. If you don’t find the jar.exe in your java’s bin directory, then you need to uninstall java and install the JDK (not just the JRE). You need JDK for jar. You must have a copy of the Java Runtime Environment (JRE) on your system to run Java applications and applets. To develop Java applications and applets, you need the Java Development Kit, which includes the JRE Here is the link to download java. http://java.sun.com/javase/downloads/index.jsp
Related Q & A:
- In Visual Studio 2012 or 2013, how can I register a DLL file on Windows 7 64-bit computer using a Custom Action command?Best solution by Stack Overflow
- How can I burn a .rmvb file onto a DVD for viewing on a regular DVD player?Best solution by Yahoo! Answers
- How can I open a vcf file?Best solution by file.org
- How can I open a jpeg file?Best solution by answers.microsoft.com
- How can I open a .mmo file?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.