Results 1 to 12 of 12
Thread: .Jar Not Recognized
- 08-05-2010, 08:57 PM #1
Member
- Join Date
- Aug 2010
- Posts
- 5
- Rep Power
- 0
.Jar Not Recognized
Sorry guys i'm confused and not sure if this is the place, but i downloaded the new Java, jre6_21, and now all my .jar files arn't recognized.. I tried opening with..
C:\Program Files\Java\jre6\bin\Javaw.exe
But that doesn't seem to work.. Can anyone help me or if this isn't the forum for this can someone tell me where it would be? :P
- 08-05-2010, 09:16 PM #2
all my .jar files arn't recognizedThat command shouldn't work as shown. It needs the -jar option before the jarfilename.C:\Program Files\Java\jre6\bin\Javaw.exe
Have you tried opening a command prompt and using the "java.exe -jar" command?
Can you double click on a jar file and have it execute?
Look at the registry's file extension association table entry:
Open Windows Explorer
Click on Tools menu
Click on Folder Options
Select File Types tab
Scroll down in the "Registered file types:" list until you see an entry for JAR.
Select the JAR entry.
Click the Advanced button
In the Edit File Type window scroll down the list of Actions until you see the one in bold.
Select the bold one
Click the Edit button
Select, Copy and paste here what is in the "Application used to perform action:" window.
Be careful not to change anything and Cancel your way out of the open windows.
In Windows explorer what does it show in the Type column?
- 08-05-2010, 09:29 PM #3
Member
- Join Date
- Aug 2010
- Posts
- 5
- Rep Power
- 0
I do java.exe -jar only a bunch of other commands come up?
Also i have windows 7, i saw no File Types tab or anything related..
- 08-05-2010, 09:30 PM #4
please copy and paste the full text of what you see.I do java.exe -jar only a bunch of other commands come up?
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.
Sorry about Windows 7. I have no idea where MS has hidden that table or how to get to it.
Try Google.
Have you read the API doc for how to use the java.exe command? Is your usage correct?
- 08-05-2010, 09:34 PM #5
Member
- Join Date
- Aug 2010
- Posts
- 5
- Rep Power
- 0
And i've tried googling it all that i get is a bunch of programs that require cash to use..Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\owner>java.exe -jar
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
Any advice from here?Last edited by Java Tyler; 08-05-2010 at 09:40 PM.
- 08-05-2010, 09:50 PM #6
You left off the name of the jar file.
Did you read what was on the screen?
Have you read the API doc for how to use the java.exe command?or java [-options] -jar jarfile [args...]
(to execute a jar file)
- 08-12-2010, 02:51 AM #7
Member
- Join Date
- Aug 2010
- Posts
- 5
- Rep Power
- 0
Sorry for the delay here is wat i get

That is what i got when i run it ps it worked 1 time in cmd but i forgot to snapshot it.
- 08-12-2010, 03:17 AM #8
You left off the command line. Did you forget the -jar option?
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.
- 08-12-2010, 04:08 AM #9
Member
- Join Date
- Aug 2010
- Posts
- 5
- Rep Power
- 0
Ps. It showed the picture i posted up there b4.Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\owner>java -jar RSBot.jar
Last edited by Java Tyler; 08-12-2010 at 04:53 AM.
- 08-12-2010, 03:26 PM #10
Somehow your typing in part of it and showing an image doesn't show that what you have typed in caused what is shown in the image.
Can you copy and paste here the FULL screen for when you execute the command line and it generates the error. Don't post the image, copy and paste as described before in posts #4 and #8
- 08-12-2010, 03:30 PM #11
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
- 08-12-2010, 03:36 PM #12
For example:
D:\JavaDevelopment>java D:\JavaDevelopment\acme.jar
Exception in thread "main" java.lang.NoClassDefFoundError: D:\JavaDevelopment\acme/jar
Caused by: java.lang.ClassNotFoundException: D:\JavaDevelopment\acme.jar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: D:\JavaDevelopment\acme.jar. Program will exit.
Similar Threads
-
javac is not recognized command...
By javastudent87 in forum New To JavaReplies: 6Last Post: 07-30-2010, 05:50 AM -
Javac not recognized
By OscarLiu in forum New To JavaReplies: 8Last Post: 06-29-2010, 03:10 PM -
'java is not recognized' vista
By dylan mc in forum New To JavaReplies: 3Last Post: 08-16-2009, 05:54 PM -
Javac is not recognized?
By Java idiot in forum New To JavaReplies: 4Last Post: 08-03-2009, 06:54 PM -
javac command not recognized
By sunshine39 in forum New To JavaReplies: 7Last Post: 03-04-2009, 03:54 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks