Making jars double-clickable please help

i'm having trouble making a jar file double-clickable.... and i'm not entirely sure that i'm making the jar file correctly in the first place.
the program is called clock.java, and i can compile and run it from netbeans. the three classes, ClockView, Timestamp, and clock, are in a directory together, and clock has the main.
in order to make it double-clickable, i'm supposed to have a manifest file called Manifest.mf with a line of code:
Main-Class: clock
which i put in a text file in the same directory as clock, ClockView, and Timestamp. i name it "Manifest.mf".
from command prompt, in the same directory, i've tried typing the jar command several different ways.
jar cvf Manifest.mf clock.jar *.class
-this one makes a Manifest.mf file, but no jar. Manifest.mf is full of computer lang stuff.
jar cvf clock.jar *.class
-this makes a clock.jar, but obviously no manifest file.
these are my questions:
do i need to put in the manifest file when i make the jar? was my command line correct for this if so? is my manifest file correct if so?
if i am supposed to add it later, how do i?
is there some reason i wouldn't be able to make jar files from this directory?
when it does make the jar file, if i double-click it, i get:
Failed to load Main-Class manifest attribute from C:\Documents and Settings\paul\Desktop\java\clock\src\clock\clock.jar
i'm kind of new at this, and i've been trying to figure this out for a while. thanks for the help.

The same problem happened to me .. First every time a tried to run the jar file from the command prompt it echoed lots of error. not finding pertaining to manifest file.
Later i fixed it. And I tell you the easy way how to run the jar file from the command prompt.
When you build the ur project in NetBeans IDE. During running it tells how to run the jar file from the command prompt. But before running your project you need to right - click to your project and choose the properties and choose run and define you main class(you also click browse to automatically find the main class ).
And after that u can build. During building your project in the ouput window running you project on the command prompt is told so you can copy it and paste it in a file with .bat extension and double click to run it/

Similar Messages

  • Guys i need to get m itunes account unlocked its stopping mefor making in app purchases please help need to make a purchase within 30 minutes

    guys i need to get my itunes account unlocked its stopping mefor making in app purchases please help need to make a purchase within 30 minutes

    If you've tried to buy something and your've been charged for it (and it's not a temporary store holding charge) but haven't received it then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Eclipse, Apache POI, compiling jar file. Please help =(

    Hello =) I have written a program in Eclipse using the apache POI library. I have added the POI JAR to my build path and the program runs as it should within Eclipse. Once I export my program to a JAR file, I run it from the command line. Each time I do i get the following error:
    {C:\Documents and Settings\Koneko>java -jar "C:\Documents and Settings\Koneko\Desktop\review.jar"
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/poifs/filesystem/POIFSFileSystem" }
    I have no idea why this is happening and have searched the internet for hours looking for an answer =\
    please help.
    -Matt

    I usually put them in WEB-INF. But I thought it doesn't matter where they are if you define them correctly in the web.xml file.

  • Beginner: Can't convert a hello.class file into a jar file. Please Help!!!

    Hi, I created a hello.java file, converted into a hello.class file by using the java 2SDk compiler. The problem is that the hello.class file is in a directory I created: C:\JavaBuilder\hello.class
    I have a problem converting the hello class file into a jar file. I don't know which approach to take. I've looked at tutorials...but I keep getting more confused each time I view the tutorials on creating jar files. Please can someone help..by taking me through a step by step process. Please be explicit and do not leave or assume that I know any details because I'm a new born beginner. Thank you very much, I seriously appreciate it.

    Hi!
    first of all, you should use an upper-case character for the first letter of your classes...
    To answer your question :
    1) you must create a directory named "meta-inf" in your directory "C:\JavaBuilder"
    2) then,you must create a file named "manifest.mf" in this directory
    it's like a property file and it must contain this :
    Main-Class: hello
    (don't forget to type <enter> after "hello")
    3) in the directory "C:\JavaBuilder", you can enter the following command :
    "jar cvfM hello.jar meta-inf\manifest.mf hello.class"
    (check jar.exe is in your path)
    4) you can run your jar by the command :
    "java -jar hello.jar"

  • How can i stop Pages and Numbers JUMPING ALL OVER THE SCREEN. MAKING ME SEASICK! PLEASE HELP

    how can i stop Pages and Numbers  screen JUMPING ALL OVER the place when i just touch my mouse. i have tried and tried to change the mouse settings - but it is the software. especially Numbers. you can't even see what the page size is until you print. i am so SEASICK! PLEASE HELP.

    Thanks for the trouble to reply. this problem only happens with Pages and Numbers for me. i have done all the tricks like restarting. the main problem is that the working space is not 'stable' - it has no 'ends' even on full screen. in Numbers - UNLESS I SET IT TO 25% VIEW (which is way too small) - the actual total 'work space' is way off the grid - so every time i move the mouse the table i am working on zooms off to left or right, at the slightest touch. i have set my mouse to no gestures!
    the thing is this did not happen before the latest upgrades.
    but thanks anyway. SG.
    if you are a techy person - i have another prob. in Mail i am unable to set the SORT / VIEW messages to BY DATE.
    (it used to be ok, at one time, too). now it continually reverts to BY SUBJECT oh so annoying !
    restarting etc does not change it. resetting preferences does not change it.
    maybe i need a new Mac ?
    mine is a 27-inch, Mid 2011. running latest.

  • My macbook pro is making a weird sound, please help?

    Hello,
    i have an early 2011 model, it was running soo fine until now.
    its making a weird sound, to describe, it sounds like a small *trrr* at normal state, and at high, intense states, (playing games..) it turns into a loud *trrrrrr*, but, if i hit it gently over the keyboard, it goes away, then comes back.
    please, i dont have an apple retail store in my country, i need help from here, help me.

    first thing to do is to buy a new hard drive and an external drive before it fails so you won't lose your files.
    once you've done that, put the new hard drive in the external drive and open disk utility.
    format/erase your new hard drive as MAC OS EXTENDED Journaled.
    After that has been done, open carbon copy (if you don't have it, you can download it for free).
    Once carbon copy is open, click on clone your hard drive.  Source drive is what you're using now and your target drive is your new hard drive.
    Once carbon copy is done, turn off your macbook, open the back of your macbook, take off the hard drive and install your new hard drive.
    After you've done all those, turn your macbook back on and you're back in business.

  • Jar file problem , please help

    Hi guys , i am not sure if i am in the right place to have this post in so i'll give it a try
    i know my explanation might be a shot in the dark but i'll try my best
    i have made a program using eclips , to send emails using my email , on certain conditions
    so when that codition happenes on some class in my program
    this class will call the email class and send an email to someone
    now the problem is not in the program , because as along as this program is in eclips and i run the program in eclips , everything goes fine , No errors what so ever
    but , if i make jar file , using eclips "export"
    once i run the program , the program would run , but once the same condition that ihave specified previously happenes , the current class never calls the email class , and no emails would be sent
    i am very confused wether
    1) it throws a class not found for some wierd reason
    2) or the external library that i used to send emails , is not exported
    i tried to check the CLASSPATH file and i think everything seems to be fine , so i dont know what the problem is
    so in short
    if the program is in eclips , every thign goes fine
    if the program is a jar file , then it would work fine but once it needs to send an email , it never does and i can still work on the program , but no emails will be sent
    thanks please some one help me out with this

    for more information here is the senario
    because i see that you guys are some how lost because i am not providing enough information
    so this is a detailed info of the problem
    i have 3 classes
    1) mybankmain (jframe)
    2) mybankbody (all labels and buttons and events included here)
    now: within some events in my program ,
    it calls a class called.....
    3) myEmail
    this class imports two things that are comming from an external jar file , so in short , if the external jar file is not available the program would complain
    i run this on windows xp (SP2)
    now: if this program runs on eclips , it would do everything it is supposed to do and all kind of calculations will be done and emails will be sent on the conditions that i have specified within the program
    if i make a jar file on windows , and i run the jar file , the file would work , all functionalities will work
    EXCEPT: sending an email
    - either my class is not found
    - or external jar file is not found which causes my class not to be able to perform its tasks
    i did only one test
    which is that i switched the main and i made myEmail as a main and i tried to export the jar file
    Result: jar file doesnt work
    the way i view whatever inside my jar file , i use Winrar and it would view everythign in the jar file and i see that all my classes are included there
    if i open my CLASSPATH , i see that there is a pointer to the external jar file
    if i open my manifest : i DO NOT see the exrernal jar file in there but i do see that its pointing to my main class
    class main : mybankmain
    and there is only the version and signiture
    i hope all these additional details would help in determining the problem that ihave been trying to solve for 2 weeks now

  • HI I have an Iphone 3GS and the microphone jack works when I play music but not when making phone calls.   please help as I use it for conference calls

    Hi   I use my phone for conference calls and use the microphone jack to connect to speakers.      It doesnt work when making phone calls but when i play music on the phone the jack works with the external speaker.   

    Happy to have been of help. Hope all goes smoothly.
    BTW, for the sake of others who may help you here, it's usually most polite if you mark the post that answered your question as being the one that "solves" it, not your own post. That's how people get points here, if a questioner marks their post as either "helpful" or "solving". It's not an issue for me, but for those just starting out in the forums it may be important to them. See:
    https://discussions.apple.com/static/apple/tutorial/mark.html
    and
    https://discussions.apple.com/static/apple/tutorial/reputation.html
    Regards.

  • Buy calendar and books button is un-clickable - please help!!

    I have updated my 4 year old mac book pro to lion and installed iphoto 11 for photo stream benefits. Constructed a calendar and the buy calendar button is not clickable - it also doesn't work on older books I created - probably missing something easy here - any help??

    iPhoto -> Preferences -> Advanced
    Have you selected a Print Products Store?

  • For my iphone 4S, people can hear me sometimes but i can't hear them. I am having a hard time making phone calls. Please help me if you can.

    I can't hear my callers but i hear them sometimes. It makes some weird cracking sound.

    Apple just announced new products.  It is ALWAYS busy this time of year.  You just have to deal with it.
    Alternatively, you can contact Apple Support and get assistance that way.  Worst case scenario, they'll require a $19 fee to troubleshoot your device over the phone, which is refunded if it turns out you have a hardware issue.
    Try them at https://getsupport.apple.com or 1-800-MYAPPLE and see if they can help.
    But also try this:
    Basic Troubleshooting Steps when all else fails
    Quit the App by opening multi-tasking bar, holding down the icon for the App for about 3-5 seconds, and then tap the red circle with the white minus sign.
    Relaunch the App and try again.
    Restart the device. http://support.apple.com/kb/ht1430
    Reset the device. (Same article as above.)
    Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

  • How can i set the dos can compile and excute the jar file?please help?

    How can i set the dos prompt can compile my .java file and execute my jar file.

    Go to where you downloaded your Java SDK. Look around for a button labled "Installation." Click the button. Download the installation instructions. Read them. Then read them again.

  • I have a new laptop and i downloaded the latest version of firefox. i am having difficulty making comcast my homepage. please help.

    i have a new laptop and i downloaded the latest version of firefox. i am having difficulty making comcast my homepage. i followed the directions about moving the comcast tab over my home icon and it did not work. any suggestions?

    Use the other way, by going through the Options > General menu. <br />
    http://support.mozilla.com/en-US/kb/How+to+set+the+home+page

  • Please help. ipod will not show up and i have tried everything

    i got my ipod two days ago. ipod nano 4gb.
    when i plug it into my computer it comes up with 'do not disconnect' and occasionally a small circle icon in the top left-hand corner. the computer recognises that there is a 'mass storage device' connected, but the ipod doesnt appear in itunes or my computer.
    when i unplug the ipod it displays the apple symbol and then goes to the language selection menu. after i disconnect it i also get a message saying that the file could not be saved to the drive because it was interrupeted or something like that and i should try storing it somewhere else.
    so thinking that maybe this was it being updated, i let it plugged in all day while i was at school because surely that would be plenty of time for anything to load onto it. But when i got home today it did the same thing.
    I have two computers and the same thing happens on both.
    I have tried it using my sisters usb cable, still nothing works.
    Any ideas? Oh on one of my computers it doesnt let me uninstall itunes as well.
    And when I try to open the updater to restore the ipod it freezes the application and i have to do controlaltdelete and close it.
    I am SO angry about it right now.
    Since i only bought it a few days ago do you think i could get a repleacement from the store where i got it or will i have to go all the way through apple.
    I havnt been able to use it once and it is making me very frustrated, please help me if you have any ideas.
    x
      Windows XP Pro  

    Sally,
    OK since you using 2 computers, we will first focus on the one that will not uninstall iTunes, afterwareds we will get the ipod working on one PC first.
    On the PC that will not uninstall iTUnes, goto control panel>add and remove and try if you can to uninstall iTUnes AND quicktime. Then go here and roll down to "Clean up iTunes installer files on the computer" http://docs.info.apple.com/article.html?artnum=93976
    Once done disable any antivirus or security programs, then goto apple.com to download and install the latest iTUnes.
    Also on BOTH pcs make sure you have "ipod updater 06-28-2006" you can download and install it here http://www.apple.com/ipod/download/
    Once iTunes is properly installed on this PC, you need to only connect your nano to the main PC you use for now so we can get it working, then we'll focus on the other PC if needed

  • Please help with a Poster Frame

    I have imported an FLV into Flash using "Video Import" and selected a prebuilt skin that gives play, volume and caption control. The movie has autoplay turned off so when I viewed on the webpage it shows a black first screen and the skin beneath it. I would like to insert a poster frame that will hide when the user presses play on the skin. I was a novice with AS 1 and 3.0 is making me facepalm. Please help, I've already tried Flashkit and Actionscript.org and not gotten any answers. Thanks!!

    Okay in Frame 1 I have an AS layer I copied your code into, layer two is the movie clip with the image named 'myPoster' and the third layer contains the FLV playback named 'myVideo' so I changed the names in the code to:
    mvVideo.addEventListener(MouseEvent.CLICK,f):
    function f(e:MouseEvent):void{
    removeChil((myPoster);
    I get the following compiler errors and publish preview shows just the image:
    Scene1,Layer 'Action Script', Frame 1, Line 1 1078: Label must be a simple identifier.
    Scene1,Layer 'Action Script', Frame 1, Line 4 1084: Syntax error: expecting rightparen before semicolon.
    So I tried modifying the code to:
    mvVideo.addEventListener(MouseEvent.CLICK,f);
    function f(e:MouseEvent):void{
    removeChil((myPoster));
    Which fixed the original errors but still only the image shows and I get new compiler errors.
    Scene1,Layer 'Action Script', Frame 1, Line 4 1180:Call to a possibly undefined method removeChil.
    Scene1,Layer 'Action Script', Frame 1, Line 4 1120: Access of undefined property myPoster.
    Scene1,Layer 'Action Script', Frame 1, Line 1 1120: Access of undefined property myPoster.
    Thanks for your patience and help!

  • I am trying to update my ipad from iOS 4.3.5 to 6.1.3. 6 hours ago it said 49 hours and now says 53 hours. I am using a wifi connection. Why is this taking so long? at this rate i really don't see any progress. Please help!

    I am trying to update my ipad 2 from iOS 4.3.5 to 6.1.3. 6 hours ago it said 49 hours and now says 53. I am making no progress. Please help. I am using wifi connection.

    You have to connect the iPad to your computer to update.
    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.1.3. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
    Tip 2 - If you're updating via wifi, place your iPad close to your router to preclude getting a corrupted download.
     Cheers, Tom

Maybe you are looking for