executable jar file of swing application using eclipse

execuitable jar file of swing application using eclipse

Page 1 of 1

3 Replies - 6867 Views - Last Post: 21 December 2010 - 10:20 PM Rate Topic: -----

#1 kirti.adsul  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 02-November 10

executable jar file of swing application using eclipse

Posted 21 December 2010 - 09:54 PM

View Postkirti.adsul, on 21 December 2010 - 01:34 AM, said:

I have create jar file in eclipse with mean-feast.MF file

Manifest-Version: 1.0
Main-Class: com.Swing.Form.FRM_LOGIN




and i have tried to run this file from command prompt
with command : c:\java -jar D:\Barcodereader.jar

but it gives error so please give me example for this it is very urgent.
C:\>java -jar swingDemo.jar
-jar: illegal argument
usage: java [-options] class

where options include:
-help print out this message
-version print out the build version
-v -verbose turn on verbose mode
-debug enable remote JAVA debugging
-noasyncgc don't allow asynchronous garbage collection
-verbosegc print a message when garbage collection occurs
-noclassgc disable class garbage collection
-ss<number> set the maximum native stack size for any thread
-oss<number> set the maximum Java stack size for any thread
-ms<number> set the initial Java heap size
-mx<number> set the maximum Java heap size
-classpath <directories separated by semicolons>
list directories in which to look for classes
-prof[:<file>] output profiling data to .\java.prof or .\<file>
-verify verify all classes when read in
-verifyremote verify classes read in over the network [default]
-noverify do not verify any class
-nojit disable JIT compiler


Is This A Good Question/Topic? 0
  • +

Replies To: executable jar file of swing application using eclipse

#2 kirti.adsul  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 02-November 10

Re: executable jar file of swing application using eclipse

Posted 21 December 2010 - 10:02 PM

I have created create swing Application jar file file using export option in eclipse with Man-feast.mf but it gives error during it running on command prompt using

java -jar d:\swingDemo.jar

error as follows:

C:\>java -jar swingDemo.jar
-jar: illegal argument
usage: java [-options] class

where options include:
    -help             print out this message
    -version          print out the build version
    -v -verbose       turn on verbose mode
    -debug            enable remote JAVA debugging
    -noasyncgc        don't allow asynchronous garbage collection
    -verbosegc        print a message when garbage collection occurs
    -noclassgc        disable class garbage collection
    -ss<number>       set the maximum native stack size for any thread
    -oss<number>      set the maximum Java stack size for any thread
    -ms<number>       set the initial Java heap size
    -mx<number>       set the maximum Java heap size
    -classpath <directories separated by semicolons>
                      list directories in which to look for classes
    -prof[:<file>]    output profiling data to .\java.prof or .\<file>
    -verify           verify all classes when read in
    -verifyremote     verify classes read in over the network [default]
    -noverify         do not verify any class
    -nojit            disable JIT compiler



so please guide me..
Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8346
  • View blog
  • Posts: 31,904
  • Joined: 06-March 08

Re: executable jar file of swing application using eclipse

Posted 21 December 2010 - 10:13 PM

Strange when I do java -help the -jar argument is specified

Quote

Microsoft Windows [Version 6.0.6002]
Copyright © 2006 Microsoft Corporation. All rights reserved.

C:\Users\pbl>java -help
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

C:\Users\pbl>


You have a lot less options. Which JRE version are you using ?
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8346
  • View blog
  • Posts: 31,904
  • Joined: 06-March 08

Re: executable jar file of swing application using eclipse

Posted 21 December 2010 - 10:20 PM

Duplicate topics merged. Please avoid duplicated posts.

And why would you want to create a .exe ?
Users can simply double click on the .jar file.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1