Problems with JAR and manifest files

Hi
I have a simple class MyClass.class (not in a package) which contains:
     public static void main( String[] args ) {
          javax.swing.SwingUtilities.invokeLater(new Runnable() {
                           public void run() {
                               new MyClass();
     }and a manifest file Manifest.mf which contains:
Manifest-Version: 1.0
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Main-Class: MyClassand i am using the following line to create a JAR file:
jar -cvmf Manifest.mf  MyClass.jar MyClass.classHowever when I try to run the file I get the following error:
Could not find the Main file. Program will exit

And another one
although this one has an answer it doens't solve mine (I have a line at the end of my manifest)

Similar Messages

  • Problem with Preview and PSD files - random gray square

    Hi guys, hope you can help...
    I've got a problem with Preview and PSD files.
    If I open in Preview both an original jpg straight from my reflex and the photoshop version of the same picture, the psd file presents a gray square (of what it seems unrendered image) in a random area of the photo (sometimes in the center.). The square is quite big...
    If I zoom in or zoom out it disappears...if I scroll to another photo and then back to the psd, the square it's there again...sometimes in a different position.
    I've tried the same psd on my older iMac with leopard...and got no problem at all.
    I suspect it got something to do with my Ati...
    (this is the second iMac 27...the first went back for gray banding on the lcd screen and flickering and yellow tinge........)
    Thanks for your help.
    DAve.

    maybe I'm onto something...
    I've just found out that opening Preview in 32bit mode (instead of default 64bit) works flawlessly with any psd files. If I switch back to 64bit mode, Preview is much faster but the gray square comes back...
    It seems like the i7 is much faster than the Ati....
    Any more realistic ideas?

  • Problem with Java and Zip Files

    Hello there everyone. I have a problem with trying to zip up directories with empty folders in them. They zip fine with my code, but according to winzip, the number of files in the archive is incorrect. It's supposed to have a total of 288 files in it, but when it's zipped up, it only says 284. I mention specifically the "empty directories" note because the zipping works fine without empty folders.
    Below is the code for the zip method:
    public static void zip(File[] list, File zipfile, File zipRoot)
         throws IOException {
          if (!zipfile.exists()) {
                   zipfile.createNewFile();
              else if (!zipfile.isFile()) {
                   throw new IOException("The zip file, " + zipfile.getAbsolutePath()
                             + " is not a file.");
              if (list.length == 0) {
                  LOG.error("The list of files to zip up is empty.");
              for (int i = 0; i < list.length; i++) {
                   if (!list.exists()) {
                        throw new IOException("The file or directory, " + list[i].getAbsolutePath()
                                  + " does not exist.");
              FileOutputStream fos = new FileOutputStream(zipfile);
              ZipOutputStream zos = new ZipOutputStream(fos);
              for (int i = 0; i < list.length; i++) {
                   if (LOG.isDebugEnabled())
                        LOG.debug(i + ": " + list[i].getName());
                   String entryName = getRelativeName(list[i], zipRoot);
                   if (list[i].isDirectory()){
                        if (list[i].listFiles().length == 0){
                             ZipEntry entry = new ZipEntry(entryName + "/");
                             zos.putNextEntry(entry);
                   else {
                        ZipEntry ze = new ZipEntry(entryName);
                        zos.putNextEntry(ze);
                        byte[] buffer = new byte[8096];
                        FileInputStream fis = new FileInputStream(list[i]);
                        int read = 0;
                        read = fis.read(buffer);
                        if (LOG.isDebugEnabled())
                        LOG.debug("\tFound " + read + " bytes.");
                        if (read == -1){
                             //empty file, but add it for preservation.
                             //zos.write(buffer,0,0);
                        while (read != -1) {
                             zos.write(buffer, 0, read);
                             read = fis.read(buffer);
                        fis.close();
                        zos.closeEntry();
              zos.close();
    The files look like they're there, but I need the system to be able to determine the number correctly. 
    Here's the interesting thing:  It zips the files, and then when I use the size() method for zip files in java, it says 284 files.  But when I unzip, it says 288 again.  It's like there's files missing when compressed, but when decompressed, they return.  Note that the files are actually there.  If I open the archive in a third party app such as Winzip AND Winrar AND IZarc, they all show 288 files.  Any idea what would make the number of files appear incorrectly in a zip file when zipped by java with the code above?  Thanks in advance.
    - Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured out the problem. When zipping files in windows using winzip, it doesn't explicitly count folders as a "file/folder" as a file in itself. It will create the folders for files to go in, but the folder itself will not be 'counted' when you query the info of the file itself. You have more control of the zip file in java, and can count the folder as a file or not.

  • Problems with JMF and audio files.

    Sofware:
    Java Version 1.5.0_03
    JMF Version 2.1.1e
    Windows XP SP2
    I have a application that consists of 2 parts. The first is an editor for creating exercises, like multiple-choice, matching and so on. The second part is a &#8220;client&#8221;, used to solve the exercises. The client uses Java Webstart.
    When I include audio clips in the exercises they play just fine using the client, but in the editor program I just get a clicking sound, and then the application stops responding.
    The strange part is that the editor and client use the exact same code to playback audio clips.
    The old version of the editor (developed for Java 1.3.x) works just fine under Java 1.3.x, but when the same byte-code is launched under Java 1.5 I get the same problem (clicking sound and then the application stops responding).
    Any suggestions?

    When installing JMF, two new packages are stored in the jre\lib\ext folder : jmf.jar and sound.jar.
    Sound.jar contains the same api that are in the packages sound.midi and sound sampled contained in jre.
    Maybe these new api are an improved version but i noticed some trouble playing sound and i delete sound.jar file, now it works fine.
    Try this, maybe you had the same problem.

  • Problems with syncing and transferring files

    Hi there. Im having problems with syncing my Ipod Touch and uploading files. Ive managed to transfer multiplr MP3 fils but i noticed that when i disconnectktwith my PC. All the sings are gone. What could have haplened?
    Please help.
    Thanks.

    Apologies for the misspellings.
    Basically i have tried uploading my MP3 files (one by one) in my device. then i tried uploading films. then when i disconnected my device all my songs on the device is gone. i do not know what happened exactly.
    it would seem the current iTunes version is "unstable". having uploaded 50 songs, doing them one by one only to find out out it got wiped out in the device for some reason.
    any explanation for this?
    Thank you.

  • [solved] Problem with Amarok and flac-files

    When I installed Arch for the first time a couple of months ago, I was happy to find that some flac-files that didn't play in Amarok on my Debian installation was now played back perfectly. However, upon trying to play these files today, Amarok refuses to play them. I get an error stating that there is no suitable demux plugin for the files. Other flacs play back fine though, and the problem files play back perfectly in mplayer.
    Another thing I would be very happy to resolve is that I have a few files that use japanese in their tags. IIRC these displayed correctly in Amarok on my Debian install, but in Arch all I see is squares where there should be japanese, despite me installing both arphic-ukai and arphic-uming packages. What am I missing?
    All help appreciated!
    Last edited by Emphrygian (2007-04-20 22:36:45)

    Your tip worked like a charm and the files now play perfectly in Amarok once again.
    I solved my second problem by installing the ttf-sazanami package from AUR and adding both sazanami gothic and sazanami mincho as substitute fonts for Sans Serif (my default font) in qtconfig (not sure that I really needed both though, but hey, it works now ).
    Last edited by Emphrygian (2007-04-20 22:35:37)

  • Windows 8 Elements 11 Problem with DNG and CR2 files

    Have a Windows 8 machine with Elements 11 which has Camera Raw 7.4 installed and showing correctly in the editor. The Browser shows thumbnails of the DNG and CR2 files, but when an attempt is made to edit them, the editor opens but does not open the file. Same thing happens if I try to open the file using the File Open from the menu.
    Also I have been through the help and forums and found an article about opening jpeg files as Camera Raw files (http://blogs.adobe.com/pselements/open-jpeg-files-in-adobe-camera-raw-in-photoshop-element s/) and this does not work either.
    Help please !

    Disclaimer:  The following applies to WINDOWS EXPLORER.  I don't use Bridge so I don't know if it's applicable at all to Bridge.
    Adobe does not provide a codec for viewing Canon raw files as thumbnails.  Canon has one for free but it only works on a 32 bit Windows system.
    Early this year I found a free download for displaying raw file thumbnails that works on an x64 Windows system.  Since that time the author realized there's a real demand for this software and has started charging for it.  In any case, I find it works very well.
    http://www.fastpictureviewer.com/codecs/
    -Noel

  • Problems with UAC and NTFS File Permissions on a File Server.

    LarryG. wrote:
    It looks to me like your account doesn't have the proper permissions on all of the sub folders.  Can you verify that?  Once you have the proper permissions this issue should go away.
    This is a feature, not a bug.  You do not have permissions.

    Hello Everyone,I'm curious about your experience with UAC and NTFS permissions--in particular on a file server. In my case, I'm running Server 2012 R2.I have a very large company shared folder. I right click on it and go to properties to check the size. The size is only 5GB or so and should be over 300GB. How is this possible? I'm finding that some of its subfolders are tied into UAC and some folders are not. UAC-related subfolder:Non-UAC related subfolder:In the pictures above, both folders are department-related folders. They are not system folders. The folders have the same owner. The folders are located on the same folder level. When I try to view the permissions of the UAC-related folder, I get this:I'm a domain admin, so when I go through the prompts, I can see the permissions.But this is a total pain because I now require third...
    This topic first appeared in the Spiceworks Community

  • Indexing Problem with FILE_DATASTORE and .pdf files

    Hello all,
    Do any of you have an example showing how to index .pdf files through FILE_DATASTORE? I am able to successfully index text and .doc files but not a .pdf file. Below is the script that I use to index my files:
    create index myindex on mytable(docs)
    indextype is ctxsys.context
    parameters ('datastore COMMON_DIR filter ctxsys.null_filter');
    I am using Oracle 8.1.6
    Thanks you!!!
    -garrett

    I don't think that you are able to index anything else then plain ascii texts, because you are not using the INSO filter.
    Use preferences like this:
    exec ctx_ddl.drop_preference('NO_PATH');
    exec ctx_ddl.create_preference('NO_PATH','FILE_DATASTORE');
    exec ctx_ddl.drop_preference('MY_LEXER');
    exec ctx_ddl.create_preference('MY_LEXER','BASIC_LEXER');
    exec ctx_ddl.set_attribute('MY_LEXER','MIXED_CASE', 'NO');
    exec ctx_ddl.set_attribute('MY_LEXER','INDEX_THEMES','NO');
    exec ctx_ddl.set_attribute('MY_LEXER','INDEX_TEXT', 'YES');
    exec ctx_ddl.drop_Preference ('MY_FILTER');
    exec ctx_ddl.create_Preference ('MY_FILTER','INSO_FILTER');
    exec ctx_ddl.drop_section_group ('MY_SECTION');
    exec ctx_ddl.create_section_group ('MY_SECTION','NULL_SECTION_GROUP');
    drop index i_filenames;
    create index i_filenames on filenames (filename)
    indextype is ctxsys.context
    parameters ('datastore NO_PATH
    section group MY_SECTION
    lexer MY_LEXER
    filter MY_FILTER
    memory 10M
    IMPORTANT is the INSO_FILTER preference.
    Thomas

  • Problem with Report and distribution file

    Hi.
    I have a report that create the paycheck for my customer's employe.
    My first group on the report is the email adresse of the employe, so i can cut the report end send it by mail to the said employe.
    95% of the time it's working perfectly. But when i encouter a blank adresse or simply no result (no line return by the query)
    then the report execute, and crash giving me this error.
    access control disabled, clients can connect from any host
    REP-0177: Erreur au cours de l'exécution sur serveur éloigné
    Paramètre de référence 'REFADRCOU' non valide dans la liste de diffusion
    Sorry i did not find the equivalent in english. It say that the email field (REFADRCOU) that i am using for the TO is invalid and make the whole report crash.
    I'm not sure how i could deal with this.
    I had a idea of executing the query before report, in the afterpform, and if i have no result, add a blank line with select XXX from dual for exemple so it would have at least 1 row and won't crash. but it's not very elegant.
    Any idea or suggestion on how i could handle this problem.

    Hi.
    Thanks for answering.
    I solved the problem.
    First I stored the file into a string variable.
    And on that variable I do
    some processes. (Analyze the read
    bytes and add more text to the original file)
    Before I did that processes on
    .Text property on the object.

  • Problems with Lion and .pkg files.

    After the upgrade to Lion, i've a problem to install .pkg files. If i try to open it with double click, terminal window starts and cursor waits for commands! With Leopard the installer program started after double click on .pkg files, but with Lion "installer" seems to be disappeared.
    Same happens with some apps, when clicking they don't install, but terminal window starts...
    How to fix this problem?

    Apologies for the misspellings.
    Basically i have tried uploading my MP3 files (one by one) in my device. then i tried uploading films. then when i disconnected my device all my songs on the device is gone. i do not know what happened exactly.
    it would seem the current iTunes version is "unstable". having uploaded 50 songs, doing them one by one only to find out out it got wiped out in the device for some reason.
    any explanation for this?
    Thank you.

  • Firestore FSC problems with m2t and .mov files

    I am having a problem opening files from Firestore FSC. Both m2t and Qt .mov
    files will not open for me in FCE,iMovie or Qt with Quicktime MPEG2 reader
    installed. Anyone having this problem and is there a solution other than
    buying Final Cut Pro?
    Charles Dodd

    I am able to capture m2t and Quicktime.mov files from my FSC to FCE, but in
    real time which defeats one of the reasons I purchased my FSC. Also
    StreamClip will open the the m2t files, but not .mov files. I can't open the
    the m2t/.mov files in FCE from my desktop or from a folder. Sony Vegas Pro
    will open m2t files from a folder or desktop etc. I am very new at this, but
    this if what I have accomplished so far. Thanks
    Charles Dodd

  • I keep having problems with .3ds and .obj files

    Any time I try to import a 3ds file I get errors saying I don't have enough RAM. DAE files say they can't parse. I have 8GB of RAM, so this seems unlikely. I've been looking all over for a solution to this.
    My ultimate goal is to take a MacBook Pro model into Photoshop for import into After Effects.
    For some reason it never works.
    I'm on a 2011 MacBook Pro i7 with 8GB of RAM. running 10.6.8
    Any help would be appreciated.

    I'm using CS 5 12.0.4 x 64.
    The model is from Google Sketchup.
    But I regularly have this issue. I'm an After Effects user, and will often bring in 3D objects to animate them. In this case, I want to bring in a MacBook Pro model.
    There isn't much in the way of instruction I've found for Live 3D. Is there a guide somewhere for how objects should be made? What settings should be used etc?
    After wasting most of a day on it, I finally got an obj setting to open but it doesn't display properly. Look at the original below, and how it looks in Photoshop. Any ideas what I can do to fix this? I'm a little under the gun.
    Thanks!
    Jason

  • Problem with jar including resource files.

    Have working project (classes + resources (video files)).
    After making executable jar file project still working, but without resource files.
    What can i do?
    Edited by: user13653211 on 08.01.2011 7:33

    Thanks a lot, but my browser redirects me from that link
    "http://docs.sun.com/source/819-0913/author/jar.html"
    to "http://www.oracle.com/technetwork/indexes/documentation/index.html" where I can't find material about discussed subject.
    Edited by: KaryuzinRoman on 19.01.2011 10:44

  • Problem with download and open files

    Why can't I open or download any book on my iPad (over drive)after I updated my iPad and the over drive?

    I don't know why, but this is the Reader forum, and the Digital Editions one is here:
    http://forums.adobe.com/community/adobe_digital_editions

Maybe you are looking for

  • Importing From Min-DV Camcorder: Sound on One Clip, not the Other

    Hello, Taped a live presentation on Canon HV 20. Part of the way through, briefly stopped then re-started camera. After importing to iMovie 6, the 16 minute clip 'pre-break' has no sound on playback, although it had sound in 'monitor mode' and on the

  • My ipod touch 5th gen stopped working

    it won't turn on and it had more that half battery so the battery didn't finish but the screen won't turn on or anything and i plugged it into my computer but it still won't work

  • Macbook 10.10.4 Update Killed Outlook Profile & disappeared documents

    We have a user that installed the 10.10.4 update on his macbook and it seemed to go okay until he restarted and his outlook profile and some documents are missing.  Outlook started up with the wizard and he says there was an important document he jus

  • Missing component of Dreamweaver

    I have been using Dreamweaver for a long time without any problems, now, reinstalling Windows XP and Dreamweaver after a breakdown I suddently face an annoying problem. When I try to insert a Flash Button into the page I get the following error messa

  • Query length in apex

    Hi, I have region with (sql report) but this query is very long ,about (50000) character. and I can not add all the code in the source of the report, because there is limit to length of the code. Is there any way to solve this problem. thanks. Mohd.