Executabe Jar File: Please Help

Here is the problem. I had no problem before creating and running executable jar files at work or at home. I write the manifest file and then run "jar cmf mymanifestfile jarfile.jar *.class" and everything is fine. Both my work and home computer were set up to execute jar files, so all I had to do was click on the option.
Now here is the problem. At work, they just installed PKZIP and now that is default for opening jar files. I still want it to execute the jar file though, so last night, when I went home, I right clicked on a jar file I had, clicked on properties, and saw that where it said "Open With" I had javaw. Sooo.. today, I come back to work, right click on a jar file here, and then where it says "Open With" I change it to "javaw" but now when I click on the file, it gives me a Java Virtual Machine error saying it can not find the main file. I am positive that this jar file was created correctly. Furthermore, if I go to the DOS prompt and run it using "java -jar jarFile.jar" it runs just fine (If I do "javaw jarFile.jar", it does NOT work).
So my question is this: what do I need to set the "Open With" program to for executing jar files. Is there a way to do command line parameters so I can open with "java -jar". Please help.
Any help would be very appreciated.

Also, another thing that is weird is this.
The old jar files that I created at home, run fine at home (execute when I double click them), and if you look at the properties they are run with "javaw", but, the new jar files I create, that I create exactly the same way as the ones I created before, dont work when I double click them.

Similar Messages

  • .jar files Please help

    Good day all.
    I am very new to java and admittedly not a very technologically savvy person. However, I play the card game "Magic: The Gathering"? and wish to play online because not any of my friends play. I use a macintosh computer. I researched Magic Online and found you could download a free trial from Wizards of the Coast Website, but it was not for Macs. I continued to research and found something called "WebWizard" a program allowing Mac users to play Magic Online. I downloaded the necessary files and attempted to install them. The two files were named 'ww.jar' and 'cards.jar'. When I opened 'ww.jar' it said "Jar Launcher: The jar file "ww.jar" couldn't be launched. Check the Console for possible error messages". I opened 'cards.jar' and received the same message. Using what little intelligence I have in regard to Java, I opened a search for anything related to it, and found the Java Web Start application. I started up the application and followed the instructions, and was asked to locate the files I wanted to view. I located the first, 'ww.jar', and it opened a page full of what I assume was programming language that had been translated into what the symbols would be on my computer - Total gibberish. I opened the 'ww.jar' once again and the error message did not appear. Instead, the WebWizard window started up!
    However, I needed to get the 'cards.jar' file to work so I could start playing Magic Online. I tried to do the same thing with Java Web Start, but 'cards.jar' failed to open when I located it. I tried opening the file anyways, but nothing happened.
    I have worked for about an hour on trying to get this to work, and have not found any way. Please help me out!

    If you just want to play casually, you can use Magic Workstation. It's free, but it won't let you play with other people on Magic Online, but I think it does have some tournaments of its own (but not for prizes). Another older piece of software that isn't used as much anymore is Apprentice. I don't know if either of these run on a Mac.
    Depending on what version of Mac you're using (and if you have a PowerPC processor), you might be able to use Virtual PC (which costs money) to install a Windows image on your computer, and then virtually run Magic Online (if you obtain the Windows image from a file sharing network instead of purchasing Windows legitimately, this is illegal).
    You could also try using VMware Player (which is free software) to run Windows virtually on your computer and play Magic Online that way. I'm not sure if VMware runs on a Mac though.
    Please don't try all of these things until something works; this will be very time consuming. Give us some more background on where the Jar files came from and, if you can, the error messages printed to the Java console. Also, how much do you know about computers? If you know how to compile source code that will probably increase your options since I believe the source code for VMWare Player is available.

  • Images in jar file, Please help!!

    Hello,
    This is my code, I am trying to add images to buttons in ToolBar. The code along with images works if I say "java ABC", but dont work(images dont appear) when I jar the files. I have tried all the possible methods, Please help me.
              new2 = new JButton(new ImageIcon("images/new.gif"));
              /*try{
              ClassLoader loader=getClass().getClassLoader();
              URL fileLocation=loader.getResource("./images/new.gif");
              Image img=Toolkit.getDefaultToolkit().getImage(fileLocation);
              new2 = new JButton(new ImageIcon(img));
              }catch(Exception e) { e.printStackTrace(); }*/
              //new2 = new JButton(new ImageIcon(ClassLoader.getSystemResource("images/new.gif")));
              //new2 = new JButton(new ImageIcon(Toolkit.getDefaultToolkit().getImage(getClass().getResource("./images/new.gif"))));
              //ImageIcon oo = new ImageIcon();
              //new2 = new JButton(oo.setImage(getClass().getResource("images/new.gif")));
                   new2.setToolTipText("New");
    Thanks
    James

    Hello,
    The code is too big to post, I am adding the code that is required to get changed, please see it
              open2 = new JButton(new ImageIcon("images/open.gif"));
                   open2.setToolTipText("Open");
                   open2.addActionListener(this);
                   open2.addMouseListener(new MouseAdapter()
                        public void mouseEntered(MouseEvent me)
                             status.setText("Opens a file");
                        public void mouseExited(MouseEvent me)
                             status.setText("open");
    Thanks
    James

  • I am new with JAR files please help me

    Hi Dear All,
    I am new with JAR files, I know concept, but dont know how to careate JAR, and how do i use it?
    Please help me.
    Thanks

    This tutorial covers that:
    http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

  • URLClassLoader - with JAR Files- - - Please Help

    Hi all,
    I have two seperate JAR files which contain same files but different progressive versions.JAR 1 is version V1 and JAR 2 is Version V1.1
    I have a program which loads classes from these two JARS and runs certain comparsions on them.CODE IS SHOWN and SO is ERROR.PLEASE HELP and ADVISE.Im on a UNix box using JDK 1.3.
    CODE:
    ====
    1.In my main i define the TWO JARS PATHS and the item to compare called ENTITYNAME as:
    String jarFile1 = "/xenv/GFINet_Java/6.2_Z1/1.3.X/gfinet_entities.jar";
    String jarFile2 = "/xenv/GFINet_Java/6.1_Y1/1.3.X/gfinet_entities.jar";
    String entityName = "gfinet.entities.GFIBasketEntity";
    2.Then i call the function
    EntityVersionComparator evc = new EntityVersionComparator();
    evc.test(jarFile1, jarFile2, entityName);
    3.Test function loads the JARS
    private void test(String jarFile1, String jarFile2, String entityName) throws Exception {
    URLClassLoader jar1 =
    (URLClassLoader)newClassLoader(jarFile1);
    URLClassLoader jar2 =
    (URLClassLoader)newClassLoader(jarFile2);
    4. Load that item ENTITYNAME FROM JAR.
    // load GFIBasketEntity from Jar1
    GFIBaseEntity ent1 =
         (GFIBaseEntity)loadClass(jar1, entityName).newInstance();
    PROBLEM ERRORS:
    ==============
    Exception in thread "main" java.net.MalformedURLException : no
    protocol :/xenv/GFINet_Java/sun4/6.2.Z2/Solaris8/3.3.2/1.3.X/lib/gfinet_entities.jar
    at java.net.URL.<init>(URL.java:473)
    at java.net.URL.<init>(URL.java:376)
    at java.net.URL.<init>(URL.java:330)
    at EntityVersionComparator.newClassLoader(EntityVersionComparator.java:143)
    at EntityVersionComparator.test(EntityVersionComparator.java:88)
    at EntityVersionComparator.main(EntityVersionComparator.java:74)
    WHATS GOING ON..Is there something wrong with the path?Pls advise
    jason

    I also in my CODE have:
    private ClassLoader newClassLoader(String path)
    throws MalformedURLException
    { URL url = new URL(path);
    return new URLClassLoader(new URL[]url);

  • .jar File please help

    Hello,
    suppose I have three .jar files: file1.jar, file2.jar and file3.jar.
    these file are in the folder c:\folder.
    how can i specify all this files in my classpath without specifying them one by one. now i'm doing it like:
    classpath=c\folder\file1.jar;c:\folder\file2.jar;c:\folder\file3.jar
    I will like to do this at once
    can someone help me please?
    thanks.

    If u mean that u want only one jar file must be added to classpath, then extract file1.jar, file2.jar and file3.jar to some path (say myFolder). Then, zip the contents of myFolder (don't zip myfolder as well!) into one jar file (zip creates a .zip file - rename it as a .jar file). So, u have one jar file with the contents of 3 jar files. But I seriously don't see why u want to do this. The semicolon terminated way of adding jars would work just as well right?

  • Executable Jar file, please help!!!

    I know this has been posted many times before, but Im going insane, and nothing is working, I will now have spent more time trying to make an executable jar file, than the time I spent actually writing the program, here's my problem
    I got two classes, tictactoe.class, and whichBox.class, I want to make a jar file, I have tried many types of manifest files, none worked, my Main() is in tictactoe.class, if ANYONE can help me get this working I will give them dukes!!!!!

    I know this has been posted many times before, but Im
    going insane, and nothing is working, I will now have
    spent more time trying to make an executable jar file,
    than the time I spent actually writing the program,
    here's my problem
    I got two classes, tictactoe.class, and
    whichBox.class, I want to make a jar file, I have
    tried many types of manifest files, none worked, my
    Main() is in tictactoe.class, if ANYONE can help me
    get this working I will give them dukes!!!!!
    your manifest file should look like this...
    Manifest-Version: 1.0
    Main-Class: tictactoeplease note there must be a line return at the end of tictactoe. so the file should have three lines.
    if you have this correct the only other thing i can suggest is are you sure it is your manifest file that is being added to the jar.
    your jar command should look like the following assuming the jar files is called Game, your manifest is called game.mf and both files reside in the default package.
    jar -cvfm Game.jar game.mf *.class hope this helps.

  • Problem with jar file please help!!

    Hi everybody
    I make a jar file using Jbuilder;my application interact with oracle and when i try to run it ,I get the following message:
    "no driver was found "
    however i add the oracle driver in my jar file as a library dependencies.
    could some one help

    I don't know whether this will help you or not.
    You have mentioned that drivers are added into jar file which you have created. Similar situation I faced. In my case I added classes12.zip for ORACLE thin drivers. For this to work I had to set classpath for this zip file. Once I set the classpath for this zip file my application started working fine.
    So if you are using any zip or jar file for your driver you will have to define it in your classpath.
    Mushy

  • I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can

    I'm getting this problem when trying to update my iphone 3gs it says that the iphone software could not be contacted and I went on youtube got some advise to go into my hard drive to fix the error I have nothing in my host file please help me if you can this is all new to me.

    Read this: iOS 4: Updating your device to iOS 5 or later
    ... oh I think it is a 3gs or a 3
    This makes a difference. What does it say in Settings > General > About?

  • HOW TO - Create new from clipboard and process multiple files - please help

    Need help - have new version of photoshop on trial only ATM...
    Want to know - HOW TO:
    1. Create new from clipbaord
    2. Process multiple files
    Please help.

    For clipboard copy, I start with File > New and the size will be set to what's in the clipboard. Then once the new file is opened, Edit > Paste will place the clipboard contents as a layer in the new document.
    You must remember to use the command Layer > Flatten Image of you want to save as jpeg or any other file format that doesn't support layers.
    For processing multiple files,
    File > Automate > Batch or
    File > Scripts > Image Processor...
    Check the User guide or google information for those commands if you have specific needs.
    Gene

  • Illustrator CS4 wont save files, please help?

    You can edit a file, go to save, close it down, then when you re-open it the changes made have not been saved?? No error message or warning pops up, and it all looks ok like it has saved properly, until you open it up again. This also happens when you use 'save as' command if you use the original file name. If however you type in a different file name - it saves ok. But obviously that is not great as you cant now trust or rely on the save mechanism of the programme, to make sure any changes to artwork have been stored!! I have never seen an issue like this, it is worrying, I hope somebody can help?
    Thanks.
    We are running CS4 on windows7 - yes PC!!!

    We save in EPS, and its not just one file, its a variety of different files and it seems to be random as to which files it does it on, some work fine - some don't. And it can be anything from a minor text change to a colour change, it doesnt seem to matter on the change made, it reacts the same.
    The files are saved over a network connection to a large external hard drive.
    Its really puzzling and now starting to cause problems as we do a fair bit of work in it, and can't trust one of the most important features, and that any changes that have been done have been saved and stored!
    Hope maybe you can help with any thoughts at all.
    Cheers.
    Date: Thu, 24 Jun 2010 03:41:40 -0600
    From: [email protected]
    To: [email protected]
    Subject: Illustrator CS4 wont save files, please help?
    What file format do you save it in?
    What kinds of changes did you make in that file?
    Where do you save the file (removable or network media)?
    >

  • How to view corrupted word files, please help?

    Can't view doc corrupted file .How to recover unsaved documents WORD? how to view corrupted word files, please help

    It could be Word or even Windows that is having the problem. Before you start trying to restore a backup or repair a file, try opening other documents.
    Try opening your "corrupt" document from another computer. Also you can try to make a copy of corrupted files. (It could work) : http://www.filerepairforum.com/forum/microsoft/microsoft-aa/word/968-i-would-be-grateful-for-any-help-to-repair-or-the-procedures-word-files
    But if nothing helps, you can try to recover it by using DOCX Viewer Tool Download free demo versions of this software from website: http://www.docx.viewertool.com/ It’s
    gonna help.

  • I try to download abode acrobat xi pro from abode download asssistant,it shows download is completed.but iam not able to get thet downloaded file,please help me

    i try to download abode acrobat xi pro from abode download asssistant,it shows download is completed.but iam not able to get thet downloaded file,please help me

    oatgeo wrote:
    I  checked the proxy and it should be OK. That's mean I have to try and try again until I get it from the slow servers.
    Yes.

  • Lost unsaved Garage Band File - PLEASE HELP

    Lost unsaved Garage Band File - PLEASE HELP
    I had an audio file made on Garage Band but it was unsaved. I left my computer on at night and for some reason this morning my computer had seemed tor restart. I opened the garage band file but nothing came up.
    Is there any way I can recover this 'unsaved file'? It must be stored in cache somewhere.
    Someone please advise.
    Thanks.

    I would just like to say Thanks to HangTime up there. This trick worked 100% ... I had recorded 8 or 9 rather long tracks; for an unexpected reason (first time I've ever seen the "gray screen of death") the popup window came up and in several languages told me I needed to restart the computer; did what it told me to, begrudingly. Came back online, opened the GB file, nothing was there. Yet, when I checked package contents for the file (which I didn't even know existed, compartmentalized "Media", until after reading this), there were the tracks! I owe you both for getting this up and running... album creds just may be in line. ~Matt

  • Program not executing in jar file. Help please.

    I went through the tutorial about jars on the sun website and i created a jar file with a hello world program like this:
    "cd E:\Batch
    jar cfm test.jar m.txt test.class
    PAUSE"
    My m.txt contains this text:
    "Main-Class: test.class"
    The jar file is created. No errors.
    Then i try and run the jar with this:
    "cd E:\Batch
    java -jar test.jar
    PAUSE"
    I get "NoClassDefFoundError: test/class"
    All the dos command are run form batch files and everything is in the same directory.
    I've searched around google and this website for answers but i have failed to find anything.
    Does anyone have any suggestions i can try to fix this? I've ran out of ideas.

    Ah thats what the problem was. That was driving me
    mad thanks. So whatever you put in a jar file must be
    in a package or you can't run it.
    Message was edited by:
    JahvahNo. You can also not put it in a package, but when you specify the main-class attribute in the manifest file, be sure that you don't tell it that it is in a package.

Maybe you are looking for