Results 1 to 5 of 5
- 12-20-2012, 11:07 AM #1
Member
- Join Date
- Dec 2012
- Posts
- 14
- Rep Power
- 0
I can't get jar to work on the CLI
Hello. I'm trying to use jar to check the contents of a .jar file I have made, but I just can't seem to get it to work. Is the information at Viewing the Contents of a JAR File (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files) outdated or is it something strange with my machine? If I do
on the CLI it just spits outJava Code:C;\Users\Terry>jar tf F:\jam.jar
I've just downloaded and installed the latest version of Java again just to make sure it wasn't a problem with a strange installation and I made certain it was the 64 bit version I was gettingJava Code:'jar' is not recognized as an internal or external command, operable program or batchfile
I've tried many, many variations of the command, ibut they all have obviously failed. I can't say for certain it sn't just because of a typo I keep repeatedly making because I have very poor eyesight,but I get the strong impression it's something to do with my installation. TheOperating System I'm using right now is Windows 7 64 bit.
- 12-20-2012, 11:14 AM #2
AN21XX
- Join Date
- Mar 2012
- Location
- Munich
- Posts
- 297
- Rep Power
- 2
Re: I can't get jar to work on the CLI
Obviously your jar command is not known by the system. As simple as that it cannot find the path to your jar executable in the systems PATH variable.
Either add it there or go to the folder where the "jar" toll is located and try it there... :)
I am still fascinated that your system works on the one... "C;\" :)I like likes!.gif)
- 12-20-2012, 12:12 PM #3
Member
- Join Date
- Dec 2012
- Posts
- 14
- Rep Power
- 0
Re: I can't get jar to work on the CLI
You mean there's something strange about my system? In what way? I usually did this sort of thing on Linux untill my eyesight became poor, so I don't really know what a normal file path on Windows would be like. Maybe that's why yhe jar command isn't recognized? However, I do make a pont of keeping my system as close to a default setup as I possibly cando in order to avoid strange things like this happening. I install as few programs as I can and tend to avoid system customization beyond what I need to--Like making the mouse pointer as large as possible and colour inverting. I did plug in an extra HDD after the initial installation of Windows. Could that have done something strange to the Windows' equivalent of fstab or something?
Edit: Oops. Forgot to ask. How would I view/edit the PATH variable on Windows?Last edited by Mr Wogan; 12-20-2012 at 12:17 PM.
- 12-20-2012, 12:38 PM #4
AN21XX
- Join Date
- Mar 2012
- Location
- Munich
- Posts
- 297
- Rep Power
- 2
Re: I can't get jar to work on the CLI
I suspect that there is nothing strange about your installtion... I guess you just need to add the location of the jar executable.
Try to find the path to your jar.exe, it should look like C:\Program Files\Java\jdk1.6.0_21\bin
Then add it to your PATH variable if it is not already there. Note that I think you need the JDK, not just the runtime java environment.
You may quick check if your PATH variable is properly set by using "set" in the CLI, which prints you all set variables.
Take a look here on how to change your PATH variable, as it is different depending on your installation:
How to set the path in Microsoft WindowsLast edited by Sierra; 12-20-2012 at 12:41 PM.
I like likes!.gif)
- 12-21-2012, 12:51 PM #5
Member
- Join Date
- Dec 2012
- Posts
- 14
- Rep Power
- 0
Re: I can't get jar to work on the CLI
Isn't the JDK installation process supposed to add the path for me? Maybe it was because I installed the NetBeans and JDK all-in-one one bundle instead of just doing it seperately?. I remember reading someone complaining about the all-in-one bundle a few years ago but I didn't know if they were just having a whinge because they'd broken something, or if there actually was a good reason why you might want install them separately (other than not wanting to use Netbeans, obviously).
Thanks for the help, anyway. I'll get on with making the changes.
Similar Threads
-
Please help me out with these errors? I've tried to work it out, but it didn't work
By almaty in forum New To JavaReplies: 2Last Post: 11-25-2012, 02:51 AM -
Why. Does. This. Not. Work.
By Kaytes in forum New To JavaReplies: 1Last Post: 04-06-2012, 07:50 PM -
applet call dll work in Win2000 but not work in WinXP
By manhcuongtin4 in forum Java AppletsReplies: 1Last Post: 07-14-2011, 01:45 PM -
Cant seem to get this to work
By nivekeleets in forum Java 2DReplies: 4Last Post: 11-13-2010, 07:09 PM -
how would i get this to work...?
By deeadeed in forum New To JavaReplies: 6Last Post: 12-06-2007, 02:58 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks