Command-Line JARring -- Help Needed

Okay... so in Windows Command Prompt I'm at the directory of all my .java and .class files and I type:
jar cvf MyJar.jar .
And when I click on the JAR it says
"Failed to load Main-Class Manifest attribute from ..."
So how do I fix this? Do I have to create a manifest file myself?

Okay... so in Windows Command Prompt I'm at the
directory of all my .java and .class files and I
type:
jar cvf MyJar.jar .
The command you posted will use the default manifest file, which does not contain a specification for the main class. If you want an executable jar, then you need to create a manifest and include it.
http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

Similar Messages

  • Missing image command line utility help

    Hi all,
    I can't seem to find the name of the utility (command line) that is very similar to ImageMagick. I know it's there because I used it before. It lets you manipulate images in various ways including resizing, changing the format, the colorspace tetc. I'm prety sure it'll even let you insert text on top of the image and save as xxx. I'm not a total geek ( I wish I was sometimes) so I'm not sure if it's a Darwin or BSD thing.
    Please help.
    Thank You,
    Rich

    Is this it? I typed "man -k image" into a terminal window and found (among lots of other things):
    NAME
    sips -- scriptable image processing system.
    SYNOPSIS
    sips [image-query-functions] imagefile ...
    sips [profile-query-functions] profile ...
    sips [image-modification-functions] imagefile ...
    [--out result-file-or-dir]
    sips [profile-modification-functions] profile(s) ...
    [--out result-file-or-dir]
    DESCRIPTION
    This tool is used to query or modify raster image files and ColorSync ICC
    profiles. Its functionality can also be used through the "Image Events"
    AppleScript suite.
    ...

  • Main command line class help

    hi,
    i've set up a command line interface which gets the number of input lines and command lines a user requires for their factory layout how can i now assign an index variable to the user input values so i can arrange the factory layout. Any code help would be great, thanks

    Could you be more elaborate please? Are you asking about how to use the command line arguments in the main() method?

  • Photo to line art, help needed

    Hello - I'm struggling with a rather simple task: turning this image (http://img13.imageshack.us/img13/3641/limb1.jpg) into basic, b+w, vector line art. I'm not sure of the best approach. I've considered making a grid of squares and warping it to fit the shape, or using the pen to more or less trace the image...unfortunately, the image is poorly shot + lit so I can't use any automated trace tools. I'd love some help if someone knows a good approach!
    Necessary info: os x 10.5, CS2.

    I assume you have a high res version of the photo. Working in Photoshop, I would adjust levels to bring out the squares. Then use dodge and burn tools to further isolate them (you may have to paint in a couple). Then you can probably get a decent auto-trace. Of course, by then you could have traced it.
    To trace it you could simply draw lines horizontally and vertically, in line with the squares, then convert them to a live paint object and fill in the intersecting squares.

  • Help needed with jar file

    hi, first of all sorry if my post is in wrong forum...but my application is done using swing so i am posting this here....and regarding my question...
    I have made an GUI using Java swings and my application is working fine. Now i want to make an executable jar file for my GUI. I have read some tutorilas on making jar files and this is what i have done...
    i have created a manifest file called mainClass.txt which has
    Main-Class: MainWindow ,where MainWindow is my main class name.
    Then i ran the jar utility with this command line:
    jar cmf mainClass.txt example.jar *.class
    With this line, I told jar to create a JAR file (option c) with modifications to the manifest file (option m) as specified within mainClass.txt, naming the JAR file (option f) as example.jar and including everything that matches the pattern *Class
    everything is file till now but my problem is ...I have some library files from JFreechart software included in my GUI to generate barcharts..How can i include these library files in my example.jar file..
    Kindly help me
    Thanks
    byee

    I had this problem too. I ran my program out of JCreator and it worked flawlessly. I jarred it up into and Executable Jar and I would get a runtime error explaning I have not included the correct libraries.
    What I did was look at the error, for example say it said something like:
    org.uhoh.PathSys ClassDefNotFound (or something similar to this)
    What I did was extract the library that contained that class file. Then in my project file where I kept my classes I made the folder org, then in org I made uhoh. Inside uhoh I copied over PathSys.class.
    I hope I addressed the problem you speak of. I am only a novice but this is how I figured it out. If anyone knows a better way let us know =D

  • Getting SimpleChat.mxml example running in the command-line

    Hi,
    I am working on getting a connection to cocomo working. Unfortunately, the documentation is highly unclear about how to get this running from the command-line(not to mention the example file in flash builder 4 crashes when run...).
    Directly run, this is the error I'm getting:
    $ /Developer/flex_sdk_4/bin/mxmlc cocomo_load.mxml
    Loading configuration file /Developer/flex_sdk_4/frameworks/flex-config.xml
    /Users/vlion/Documents/work/flixn/repos/vss/sandbox/cocomo_load.mxml(72): Error: Could not resolve  to a component implementation.
    /Users/vlion/Documents/work/flixn/repos/vss/sandbox/cocomo_load.mxml(84): Error: Could not resolve  to a component implementation.
    When adding --show-actionscript-warnings=true --strict=true, I get the same warning.
    I have afcs.swc in the directory I'm running this from.
    However, when run with --library-path=., I receive a slew of "could not find resource bundle for local en_US" warnings. Setting the local to en_US doesn't help the matter.
    Reviewing the discussions I found online, this appears to be related to namespace issues. However, it is unclear what the namespace issue is.
    What, exactly, is the problem, and what needs to be set to resolve it?
    Message was edited by: pnathan_: added filename and some readability formatting.

    Hi,
    Thanks for bringing this in notice to us. Since we were not building the examples in command-line with flex 4,  we didn’t see this problem earlier.
    The problem happened because our LCCS components were built with halo component and namespace in flex 3. So, when you are using the spark framework and flex 4, if you do not mention that you also need the halo theme , our components won't work. Flex Builder takes care for it but while doing command-line compiling you need to mention the theme specifically. If you run your current script with Flex 3 sdks, it would have built fine. This has nothing to do with our namespaces or using locale.
    I am attaching a quick ant build script which I used to build our DefaultPods example with Flex 4 sdks( this script file is in same folder as DefaultPods.mxml).
    You can see the build  script and make any changes ( since I used for windows) and let us know if everything works fine for you.
    Thanks again for bringing it to our notice. We will make sure that this gets added to the docs in next-release.
    Thanks
    Regards
    Hironmay Basu
    Here is the Ant Script
        <property name="cocomoSDK.dir" value="$/../../../cocomo" />
        <property name="FlexSDK.dir" location="C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0" />
        <property name="mxmlc.jar" location="${FlexSDK.dir}/lib/mxmlc.jar" />
        <property name="cocomo.lib.dir" location="$/../../../cocomo/lib/" />
                    <!launcher>
                            <arg value="-output=$/DefaultPods.swf" />
                            <arg value="-file-specs=$/DefaultPods.mxml" />
                        </java>
            </target>
    </project

  • BBIPS - Command Line Utilities

    BBIPS - Command Line Utilities - Just released !
    I wrote these after working on the main bbips program recently, and decided that individual functions could also be seperate programs, sometimes making it easier to chain them together to do multiple operations to image files.  This is the first release, and this contains 20 seperate programs to manipulate your images files.
    To install these simply open a shell and run this command:
    wget "http://bbips.org/downloads/bbipsinstall.sh"; sh bbipsinstall.sh; rm -f bbipsinstall.sh
    This will do the following.
    1. Create a directory if not already present "~/.bbips"
    2. Download into that directory "bbips-clu.tar.gz"  (http://bbips.org/downloads/bbips-clu.tar.gz)
    3. Extracts everything from bbips-clu.tar.gz to "~/.bbips"
    4. Removes the file bbips-clu.tar.gz (cleanup)
    5. Downloads the file bbipsbashrc (overwrites it if it exists) (http://bbips.org/downloads/bbipsbashrc)
    6. Checks to see if your .bashrc file has already been modified yet
    7. If .bashrc hasn't been modified, sources in the bbipsbashrc file.
    8. Exits
    Now.... if you follow the directions, you will close this shell and open a new shell (effectively reloading your bashrc file for you).  Now, from the command line, run the command "bbhelp"
    ####  WARNING  WARNING  WARNING  WARNING
    #     These alias run bbips functions from the command line one at a time.
    #     They also change the image your working on, and do NOT make copies !
    #              THESE ALIAS'S RUN COMMANDS THAT CHANGE IMAGES DIRECTLEY !!!
    #        THIS SET OF BBIPS FUNCTIONS DOES NOT MAKE BACKUP COPIES OF YOUR IMAGES !!!
    #      IT IS SUGGESTED THAT YOU ONLY RUN THESE COMMANDS ON COPIES OF YOUR IMAGES AND NOT THE ORIGINALS !!
    ####  WARNING  WARNING  WARNING  WARNING
    What does this stuff do ?  -- bbhelp
    These commands run from the command line and edit/modify all the jpegs in a directory.
    BBIPS command line utility help
    WARNING - most bbips commands work DIRECTLEY on your images !!!
    It is recommended that you work on jpg COPIES ONLY to prevent loss of originals.
    bbcopy | Create a directory and COPY all images into it.
    bbresize | RESIZEs all images width x height
    bbrotate | ROTATEs all images clockwise x number of degrees
    bbflip | FLIPs images top to bottom vertically.
    bbflop | FLOPs images side to side horizontally.
    bbatxt | ADDS TEXT to images.
    bbborder | Creates a border on all images color x size
    bbgrayscale | Converts images to Black and White
    bbsepia | Converts all images to SEPIA toned x percentage
    bbpaint | Simulates an oil painting on all images
    bbnormalize | Normalizes all images
    bbcolorize | Colorizes all images. Format rgb.
    bbgamma | Gamma correct for all images
    bbsolarize | Solorizes all images.
    bbhelp | This lists the bbips command alias's
    bbindex | Creates a index.jpg of all .jpg (not .JPG) files.
    bbgzip | Creates a GZIPped file containing all the images.
    bbapcom | APpend COMments to the images.
    bbrecom | Displays (REads) COMments on all images.
    bbwrcom | WRites COMments to all images, overwriting any existing comments.
    If you find these useful..... let me know   Feedback is always appreciated.
    Crouse
    http://usalug.org/phpBB2/viewtopic.php?p=84980

    The commandline utility client scripts that we provide out of the box will support either NT or unix. Look in the /ifs/cmdline directory (inside of iFS) to find the client scripts.
    By the way, all the scripts do is run a java application (the CUP client) and pass it parameters. You don't really need them to use the CUP server (you could manually run the CUP client).

  • SCCM 2012 - Problems running vbscript or simple command line

    Hey everybody, I'm having a heck of a time trying to get SCCM 2012 to deploy some very simple Vbscripts or even a simple command line.  I need to deploy some registry fixes across the company as well as a Vbscript that uninstalls some old applications. 
    If I run these scripts/commands outside of SCCM everything works fine, inside of SCCM it always shows "succeeded" but it doesn't actually run correct on the client.
    What's confusing to me is the use of distribution points when you're running a command line that doesn't actually have any source files.  For instance this is what I'm trying to run "regedit /s \\servername\folder\registryfix.reg".  I've also tried
    a similar bat file as well with the same result.  I've tried it with a source folder specified, I've tried it using Run Program From Server or Download locally.  I've gone through everything I can think of but can't get it to work.
    Similarly with a vbscript I'm trying "cscript.exe /s \\servername\folder\uninstallapps.wsf" and various different settings in the package deployment.
    I'm really confused here guys so any help would be greatly appreciated.  Thanks

    What I have found is that if you try and run the REG.EXE command line directly, either as a program or via a CMD/BAT file, the 64-bit redirection will occur.  So, if you had something like this in a program or via a CMD/BAT file that ran against a 64-bit
    system:
    REG ADD HKLM\Software\Microsoft\Test /v Test /d Test
    You would end up with this registry entry existing under:
    HKLM\Software\Wow6432Node\Microsoft\Test
    That's because SCCM uses the 32-bit launcher to take care of this and redirection occurs - You can see this via the "CCM32BitLauncher.log" on the client.
    To work around this problem, I have done the following:
    On a reference machine, create/export the registry entry I want into a *.reg file - An example export of "Test.reg" for the above mentioned registry entry would look something like this:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Test]
    "Test"="Test"
      2.  Stick our "Test.reg" file in a source share, create a package with the share as the source content, and distribute it
      3.  Create a program for the package with a command line like this: 
    REG IMPORT Test.reg
    This is obviously not as clean as having a command line with a package to distribute, but I find it works fine for me and gets around the redirection for registry entries.

  • How to execute command line by Java

    Hi all,
    I have the following DOS command line that I need to execute it through Java:
    C:\Documents and Settings\Mxmler\Desktop\bin>vr1tovr2 Box.wrl -o Box2.wrl
    I know that I have to use Runtime.getRuntime().exec, But can anyone show me how to use it for the above?
    Thanks

    Mxmler wrote:
    I need your help please
    Forget about the first thread
    vr1tovr2 located inside a sub directory called converted (not in the main directory of the project constructed by eclipse)You have to tell the system where to find the program you're trying to run. You can specify the full path to the executable. Alternatively, you can specify the PATH environment variable when you call exec() (and I presume there's something similar for java.lang.ProcessBuilder). Read the docs.
    Box.wrl & Box2.wrl (will be generated) both of them are located in another directory called usrYou can either specify full paths to those files, or you can set the current working directory when you call exec(). So you'd tell exec() that you're in the directory where those files are. Read the docs.
    I have tried to do the following and I got the following error message: CreateProcess error=2, The system cannot find the file specifiedYou need to do what I said above, in particular, the first one (where you tell the system where to find the program you're trying to run).
    String path = System.getProperty("user.dir");
    String userFolder = "usr";
    String fileName = "mxmler";
    String extension = ".wrl";
    Runtime.getRuntime().exec("vr1tovr2 "
                + Key.QUOTE
                + path
                + Key.FORWARD_SLASH
                + userFolder
                + Key.FORWARD_SLASH
                + fileName + extension
                + Key.QUOTE
                + " -o "
                + Key.QUOTE
                + path
                + Key.FORWARD_SLASH
                + userFolder
                + Key.FORWARD_SLASH
                + fileName + "v2" + extension
                + Key.QUOTE);If you're going to break it down like that, then don't use the version of exec() that takes a single String for the whole command line. Use the version of exec() that takes an array of Strings (the first String in the array is the program to run, and the remaining strings in the array are arguments to that program).

  • Run test case from command line

    Hi  All,
    Working environment : VS 2013 professional 
    Project type : Unit test project for (Windows 8.1 and Windows phone 8.1)
    I have a set of unit test cases and want to run it on command line.I tried MSTest.ext and vstest.console.exe for running test case but not succeed.  
    command :  MSTest.exe /testcontainer:path of project dll
    command :  vstest.console.exe path of project dll
    Type of Error
    Error : Unit test case for windows store and windows phone app can't be run outside appcontainer. 
    Error : No tests to execute
    command :  MSTest.exe /testcontainer:path of appx
    command :  vstest.console.exe path of appx
    Error : root certificate error 
    I just want to run windows 8.1 and windows phone 8.1 run test cases from command line.
    Thanks in advance.

    Hi vicky2468,
    Based on your issue, as far as I know that if we want to run unit test for windows store and windows phone app using mstest.exe or vstest.console.exe in command line, you will need to execute the .appx instead of the dll in command line.
    In addition, I tried to run the appx for unit test in command line,
    but I found that I also get the same issue as yours. I could not execute the appx for unit test in command line successfully.  But if we run it with VS IDE in Test
    Explorer windows, it seems that it works fine.
    So I suggest you can submit a feedback for this issue, to get the issue confirmed and diagnose by product team, would you please create connect report for it? You will get email notification for update.
    http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx
    When you submit the connect, I suggest you can provide your project for product team so that product team will
    be better help you solve this issue.
    If you submit it, please share me the link here, I will help you vote it. I think we could get the latest information
    from the product team experts. Of course, if I get any latest useful information, I will update it here.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • S1WS6.1 cron/schedulerd command line invocation

    I would like to know how to call the new scheduler from a start-up script so as to avoid any problems with rebooting.
    I have been told by a Sun tech that S1WS6.1 has inherited the issue that ES/IWS had with ns-cron not starting upon an OS reboot. I used to call:
    ns-cron -d [startup directory] to work around this problem.
    Any help would be much appreciated. The Sun documentation is sorely lacking in this area.

    Hi Jim,
    It should work from command line as well, although I will admit that I've not yet tested this with 6.1(runs in 6.0). To start schedulerd from command line, you will need to setup the necessary environment variables(this gets taken care of for you when starting it from admin-serv GUI).
    My guess is that its not working for you correctly because the needed environment variables are not set correctly.
    Thanks
    Manish

  • Coldfusion 10: execute as command line

    Using CF10 on a unix system.  Attempting to use cfexecute on perl and batch files do not work but they run fine when executed directly from command line.  The perl and bat file permissions are set so anyone can execute them.  Does anyone know if I make coldfusion execute the perl or bat file as if it was running as a command line?  May need to designate specific user the execute them as.
    <cfexecute name="#EDRSDIR#/uploadconvertwrapper.pl" arguments="#filedirectory# #finalfilename# #dcnflag# #splflag# outputFile="/dev/null" timeOut="0" />
    <cfexecute name="#EDRSDIR#/uploadconvert.bat" argumensts="#filedirectory# #finalfilename# #dcnflag# #splflag# outputFile="/dev/null" timeout="0" />

    What about:
    correcting the spelling of 'arguments';
    dropping the .pl and .bat extensions;
    giving the timeout a value greater than 0;
    adding an error variable which you can output for debugging.
    <cfexecute name="#EDRSDIR#/uploadconvertwrapper" arguments="#filedirectory# #finalfilename# #dcnflag# #splflag# errorVariable="errorOutput" timeout="10" />
    <cfexecute name="#EDRSDIR#/uploadconvert" argumensts="#filedirectory# #finalfilename# #dcnflag# #splflag# errorVariable="errorOutput" timeout="10" />

  • Command line in Unix

    Post Author: mcarver1
    CA Forum: General
    Does anyone know of a way to invoke crystal reports in Unix from a command line.  I need to be able to run and export to a PDF file.  Thanks !

    Hi,
    unser the /your_ODI_HOME/agent/bin folder.
    Excute this
    sh startscen.sh REFRESH_ID 001 GLOBAL 5 -NAME=agent_ODI
    REFRESH_ID=Your Scenario name
    001:Version
    GLOBAL:Context name
    5=Log Level
    agent_ODI=Your agent name
    Regards

  • Packaging a .bar file for the BlackBerry Tablet (Playbook) Simulator Using Command Line.

    Hi there, I've been trying to deploy one of my AIR apps on the BlackBerry Tablet (PlayBook) Simulator and and have run into a problem packaging the .bar file using the command line.  I started this off by reading the article at:
    http://www.adobe.com/devnet/devices/articles/blackberry_playbook_battery.html
    I followed some of the steps there, but found this article on how to package my files using a command line more helpful (the Adobe article doesn't even explain how to package the .bar file using the command line):
    http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Compile-and-Debug-witho ut-Flash-Builder-Using-a-Command-Line/ta-p/628675
    Everything was going great until I went to compile my application and received the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/qnx/bbt/airpackag
    er/BarAirPackager
    Caused by: java.lang.ClassNotFoundException: com.qnx.bbt.airpackager.BarAirPacka
    ger
            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)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: com.qnx.bbt.airpackager.BarAirPackager.  Program
    will exit.
    Has anyone run into this issue when trying to package a .bar file for the BlackBerry Tablet (Playbook) Simulator?  I've tried using a SWF published in CS5 and CS4.

    Just thought I'd reply to my own post, in case someone else runs into this problem.  Make sure you have the latest and greatest versions of the JDK and JRE installed on your system, in addition to the requirements listed in BlackBerry's list of installs:
    http://us.blackberry.com/developers/tablet/adobe.jsp

  • How to install Developer Tools via command line

    Hello,
    is there a way, to install the Developer Tool via Command line?
    I need only the unix tools.
    I have to install the unix tools over a ssh connection.
    Thanks in advance and best regards
    Martin

    I followed the link you gave.  The only download I saw was for Xcode 4, and they either wanted $5 to purchase it from the app store or a 1 year mac developer license thing which was $100.
    <Edited by Host>

Maybe you are looking for

  • How do I edit a PDF with PDF Pack?

    how do i edit a pdf pack?

  • CELL-01528: Unable to create the log file in directory

    Hi , We have Qtr-Exadata I'm getting error msg in 2 of Storage Servers when trying access cellcli CELL-01528: Unable to create the log file in directory                          /opt/oracle/cell11.2.2.3.2_LINUX.X64_110520/cellsrv/deploy/log. Error: C

  • CSS Liquid Layout Problem

    I'm trying to do a simple masthead that will span the width of the page. The masthead consists of a logo on the left, and a big graphic on the right (it is a long story...). The left side of the big graphic fades into the background, and the logo and

  • Db_dump output

    I am having trouble understanding some of the output from db_dump. It looks like it is saying I have nothing in my database? I have a 1.3 gb database I am able to open and when I was sending in some keys into db->get that should have been found, were

  • Photoshop wont allow me to create a 3d extrusion or mesh layer

    Daniel Montgomery Jun 8, 2014 9:51 AM (in response to Daniel Montgomery) Ok, I wasn't able to take a snip shot of the 3d drop down menu.... when i do select the 3d tab, new 3d extrusion and from selected layer and new mesh from layer are both highlig