Jar file not working  - sometimes?

I have a jar file with the following Manifest file:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.6.0_02-b06 (Sun Microsystems Inc.)
Main-Class: windows.ItemCreatorUI
Class-Path: lib/AbsoluteLayout.jar
X-COMMENT: Main-Class will be added automatically by build
The class under the Main-Class header has a main method in it, and the jar file is executable on the six computers I have tested and had others test. However, two of my users have reported a "Can not find main method, the program will now exit" error and subsequent crash. They are using a copy of the file downloaded directly from my personal ftp, so I'm fairly certain that it's something on their end. Further, they have sent me the file that they downloaded and I was able to run it without fail.
Does anybody have any experience with this sort of problem, and know a fix? Both users have the most current version of Java (in fact, one of them updated to the latest version while I was working with him).
Thanks in advance

There is one more thing to test
I suppose it is a windows machine
open My computer>> from the title bar select
Tools>>Folder options
select "file types" tab
select JAR file
Click advanced
In the Actions column there will be an option open
slect open and Click edit
in the column Application used to perform Action
you have the below text
"C:\j2sdk1.4.2_04\bin\javaw.exe" -jar "%1" %*
*chang the javainstalation directory according to youe machine                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • In Flex application functionality is working sometimes and not working sometimes..

    Hi,
    Please help me on this..
    In my flex application some functionality is working some times and not working sometimes..
    In my project i have 5 sections with 5 separate screens..Each screen is of one diffeent module.
    After logining into the application:
      I will go to one screen..First time every functionality is working in that screen..
    Ex:: I have a screen with datagrid.From that user will select one job name from datagrid click on next button..
    Based the job name the user selected i have to display some information in next screen and customer names.customer names is a combo box..
    below is the code:::
                   public function populateAllOEMCustomers(event:ResultEvent):void
              1)     var object_CustomerList:CustomerList = event.result as CustomerList; //Assigining result object values to Object reference variable.
              2)    var allOEMCustomersCollection:ArrayCollection = new ArrayCollection(); //Declaration ArrayColliction referance variable.
             3)       var i:int=0;
             4)      var customerComboLabel:Label = new Label();
              5)      for (i = 0;i < object_CustomerList.arryCollCustName.length; i++)
                        var strCustName:String = object_CustomerList.arryCollCustName.getItemAt(i).toString();
                        var strCustId:String = object_CustomerList.arryCollCustId.getItemAt(i).toString();
                        customerComboLabel = new Label(); //Dynamic declaration of label.
                        customerComboLabel.name = strCustName; //Assinging the customer name to the Label name field.
                        customerComboLabel.text = strCustId; //Assingning the customer id to the Label text field.
                        allOEMCustomersCollection.addItem(customerComboLabel); //Adding Lable into the ArrayCollection referace variable.                                       
                    //customerComboID.selectedItem = "--";   
                    OEMCustomersComboID.dataProvider = allOEMCustomersCollection;
                    OEMCustomersComboID.selectedItem = -1;
    This functionality is working fine when i visit to this screen first time..If you go back to another screen and come back to this same screen and click on next button this time customer names combo box has no customer details..I am getting Nullpointer Exception and it is showing the line number 5( i have given the number for code given above..)
    If i change the first line of the code to below code:: every time the above functionality is working fine.Not getting any error msg..
      var object_CustomerList:Object= event.result ;
    If i  type cast it to specific class(CustomerList) ,functionality is not working ..getting null pointer exception..If i type cast it to Object everything is working fine..In my code wherever i have typecasted it to specific class functionality is not working(gettingNullpointerExcepion).
    Please help me on this..I am not getting what could be the reason..
    I am using::Flex 3,Flash player 10.1
    Thanks in advance..
    Regards,
    Satya

    Hi Satya,
    This sometimes as in your case might not work as the way you have specified the RemoteClass attribute in your AS class. As somtimes there may be a case as before it is mapped to a server side you are returned the data and so that you may not get the data as your Custom class but as normal Object type.
    So in order to avoid this you can map the server side class to AS classes in the PreInitialize handler itself as shown below:
    Specify the preinitializeHandler in your main application and write the below function.This way also you can map AS classes with the server side. So that you will not have any problem referring your application as AS class types.
    You can use the same line for registering all the classes. By using this you can remove all the  [RemoteClass] attributes on all AS classes and include it at single place.
    preinitialize="onPreinitialize()"
    private function onPreinitialize():void
      registerClassAlias("com.expeditor.ScriptAdmin.Objects.CustomerList", CustomerList);
    Here in the above line of code the string in quotes refer to the namespace of the Server side class and the latter is your AS class. Also dont forget to import the namespace of the corresponding AS class in the file.
    Try this and let me know..
    Thanks,
    Bhasker

  • Imported Jar file not loaded at run time ORA-105100

    Oracle 9iDS forms Version 9.0.2.9.0
    Oracle 9iAS Release 2
    I have imported java classes from a jar file into my form. I have it working in client server. Added the entries to the classpath in the default.env and system environment variable for development of the form and for execution.
    Moved the jar file, form and testing html to the application server. Modified the classpath in the default.env file. Tested the form. Got the ORA-105100 error. MetaLink note 261650.1 states that error frm-40735 When-Button-Pressed triger raised exception ORA-105100 if calling a java function from a jar file. Cause: Jar file not loaded at run time. Solution: add in your default.env CLASSPATH parameter your jar file including the whole directory of the jar file location. That has been done and the OC4J has been restarted. Still get error.
    Oracle support has not been able to give me much help as of yet. Does anyone have any further ideas, or documentation that I can read to help get this working?
    Thanks in advance for any assistance that is offered.

    Hey people any clues?

  • KYPE Account its not work sometimes

     me have really problem with my SKYPE Account  its not work sometimes. what about it?
    [Topic title updated by moderator to be more descriptive. Original topic title was: "Re: Не отображаются контакты."]

    It's a one year limited warranty, not a guarantee. You have 14 calendar days  from the time your items are delivered to initiate a return as noted here.
    Not all new Mac's have issues with Wi-Fi including mine running v10.9.4.
    Unless you state exactly which troubleshooting steps you have taken that didn't work, we have no way of knowing.
    Network preferences may be corrupted.
    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    /Library/Preferences/SystemConfiguration
    Click Go then move all the files in the SystemConfiguration folder to the Trash.
    See if that makes a difference.
    Your Mac will generate a new SystemConfiguration folder for you.
    If that doesn’t help, try here >  Wi-Fi: How to troubleshoot Wi-Fi connectivity

  • "access restrictions" did not work sometimes when using 3-tier DeskI.

    My customer found that "access restrictions" did not work sometimes when using 3-tier DeskI.
    But this issue can be solved by logging on from another machine, or restarting the DeskI.
    For I can reproduce this issue, so I just want to know that:
    1.What is it probably related to?
    2.If this issue happens again, what can I suggest my customer for tracking it?
      For example, get some log files from servers etc.
    Thanks!

    Hi Sarah,
    Also you can try the following solution.
    1. Import the universe.
    2. Go to manage access restrictions
    3. Remove the restriction .
    4. Again create the rescrition and unchecked the " limit size of result set to"
    5. Now assign it to the unlimited results group ( this is the name of
    the group we have given to those users who should be able to retrieve
    more than X rows)
    6. Now we save the universe. (Dont export the universe).
    I hope this will help you.
    Regards,
    Sarbhjeet Kaur

  • Error:verifier jar file not found

    Hi,
    I found problem "verifier jar file not found" while building a package in Aspects Developer Evaluation version.
    Pls guide me regarding my problem if any body could.

    Include the offcardverifier.jar file in your classpath, you will find this file under $java_card_kit-2_2_2\lib
    Regards,
    Amr.

  • HT201412 Message tones is not working sometimes

    1.My iPhone 5 message tones is not working sometimes suddenly, have to restart device or eventhought sometimes is not working too after restart my device. I have to reset my iPhone n restore again .
    2.Restore with iOS is not as good as last time coz I can't get back all my iOS photo stream photos n all the photo in my albums too. This is ***** n takes few days also not complete download all of my photos.
    3.some of my iPhone apps will suddenly not respond or will log out to home screen suddenly . Have to open the apps few times only its working as normal .

    Hi,
    I have nothing found regarding your issue. But maybe a look at SAP note 638058 will give you a hint.
    Regards,
    Klaus

  • Why will my java.jar file not open

    Why will my java.jar file not open

    This is the iPod touch forum. Do you have a question concerning an iPod touch? The iPod touch does not run Java.
    If you have a new Mac you have to download the Java program to run Java on a Mac. It no longer comes with the iOS.

  • My home button is not working sometimes and at the store they dont want to take it for repair because the problem did not show up at that time

    My home button is not working sometimes and at the store they dont want to take it for repair because the problem did not show up at that time

    When normally powering the phone, there would not be a loading bar, you would just see the Apple logo. You can try a reset of the phone, hold the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot.
    You can take the phone to Apple, by making an appointment at the Genius Bar to have the hardware checked. Apple handles warranty and post-warranty issues, not Verizon. Have Apple look at the hardware to see if there are any problems.

  • Migration from windows to Linux - JAR files not generating under JAVA_TOP

    Hi DBA's
    Jar files not generating under JAVA_TOP after migration from windows to linux.
    I followed workaround but same in result.
    Workaround
    Run this command. It will give the missing file
    adjava -mx512m -nojit oracle.apps.ad.jri.adjcopy -masterArchive $JAVA_TOP -sync -reportfile javatopfiles.lst
    Then run this command
    adjava -mx512m -nojit oracle.apps.ad.jri.adjcopy -masterArchive JAVA_TOP -sync -mode APPLY
    I have checked in google.
    Best Regards,
    Suresh Gelda

    Suresh,
    I can find the following error in the log file:
    JarSigner error output:
    Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/tools/JarSigner
    Caused by: java.lang.ClassNotFoundException: sun.security.tools.JarSigner
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: sun.security.tools.JarSigner.  Program will exit.Please review the following notes for suggested solutions:
    Note: 393306.1 - Generate Jar File causes NoClassDefFoundError sun/security/tools/JarSigner
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=393306.1
    Note: 269054.1 - Running adadmin to Force Regenerate of the Java Files Fails
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=269054.1

  • Ok my  ipod  keyboard is not working sometime it type and i didn't press anything i calibrated it and nothing happen but now it does not type these letters(d,x,r) help please because my cousin will be so mad

    ok my  ipod  keyboard is not working sometime it type and i didn't press anything i calibrated it and nothing happen but now it does not type these letters(d,x,r) help please because my cousin will be so mad because he is letting me use it unntil he givs it to his other cousin. Like before he gave it to me he went to the mall to get  the screen fix but i dont think it had affected it because i had it for two months now please help please i dont want him mad at me.

    Make sure the screen is clean
    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                             
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • Satellite A300 - keyboard does not work sometimes

    Hi,
    the boot my Toshiba Satellite A300 Notebook the keyboard does not work sometimes?
    After a reboot everything is ok!
    Does anyone know why the keyboard does not work sometimes?
    greetings

    Hello
    Do you notice the same behavior with external keyboard? So you can check if the problem is related to internal keyboard/mainboard or something else.
    But its not easy to say something about these sometimes issues But if the keyboard would be really defective I dont see a big problem. Exchange is not so complicated and keyboards are not expensive. ;)

  • JInternalFrame not opening in JAR file, but works when not in JAR

    I have a folder that contains multiple .class files. I make all the class files into one jar file with this command:
    jar cmf mainClass.txt myapplication.jar *.class
    The mainClass.txt contains the following:
    Main-Class: myapplication
    class-path: myapplication.jar
    The myapplication.class opens up a JDesktopPane inside a JFrame. It also contains a start menu, which again has elements that opens up misc JInternalFrames inside the JDesktopPane. The problem is this:
    When I run the application from a .bat file, everything works fine. However, after making the JAR Executable file, everything works except 1 JInternalFrame. Now, the code for this JInternalFrame is far too much to post, so I'll have to ask as follows;
    Are there any reason why a JInternalFrame would not work from inside a JAR Executable, but work when not in the JAR file? Especially when other JInternalFrames are working? What can make 1 JInternalFrame different from the others in this regard?

    Perhaps the problem lies somewhere else.
    Obviously if other JInternalFrames are working then there is a difference in the one missing internal frame that causes it not to show up.
    My guess is that perhaps you are missing one or two classes in your JAR that are used by that JInternalFrame and that an exception is being thrown causing it not to show.
    Double check the contents of your JAR and make sure that all the classes are present and that they are the right versions.

  • Get Images from jar. getResource() not working

    I've read some of the posts in the forum and I've tried the solutions but still cant get the images in my program.
    I'll write all the things I've tried (All of them works fine when I run them from bluej):
    1- The code used in the jar files in demo folder of jdk:
    /** Inside the main class: */
    private static ResourceBundle resources;  
        static {
            try {
                resources = ResourceBundle.getBundle("resources.Recursos", Locale.getDefault());
            } catch (MissingResourceException mre) {
                JOptionPane.showMessageDialog(new JFrame(), "ResourceBundle not found","Error",JOptionPane.ERROR_MESSAGE);
                System.exit(1);
    public String getResourceString(String nm)
            String str;
            try {       
                str = resources.getString(nm);   
                  } catch (MissingResourceException mre) {       
                str = null;
            return str;
        public URL getResource(String key)
            String name = getResourceString(key);
            if (name != null)
                URL url = getClass().getResource(name); //  Here is the exception
                return url;  
            return null;
        public ImageIcon loadImage(String image_name)
            URL image_url = null;    
            try
                image_url = getResource(image_name);             
                if (image_url != null)
                    return new ImageIcon(image_url);
                else
                return null;                  
            }catch(Exception e)
                JOptionPane.showMessageDialog(new JFrame(), e.getMessage() + "In load Image","Error",JOptionPane.ERROR_MESSAGE);
                return null;
    /** Inside the constructor */
    abrirButton = new JButton(loadImage("open"));
    }//End of the class}
    The ResourceBundle is a file named: Recursos.properties and it's in a folder inside the folder of my *.class and *.java And have this information:
    Title=Recursos
    ElementTreeFrameTitle=Elements
    ViewportBackingStore=false
    open=resources/open24.gif
    save=resources/saveAs24.gif
    cut=resources/cut24.gif
    copy=resources/copy24.gif
    paste=resources/paste24.gif
    analisis=resources/bean24.gif
    This one, runs with the jar, but the images are not in the buttons and I get the Dialog message telling me that there was an error in loadImage. Check that method. I used this dialogs to track the error and the exception it's generated by:
    URL url = getClass().getResource(name);
    in public URL getResource(String key) method.
    2- I also tried to follow the instructions of this article that describes how to get resources from jars:
    http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar-p2.html
    This is the first page of the article:
    http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar.html
    And I did something like this:
    /** Inside constructor */
    abrirButton = new JButton(new ImageIcon(getImageFromJAR("Imagenes/open24.gif")));
    /** Inside of my main class */
    public Image getImageFromJAR(String fileName)
               try{
               if( fileName == null ) return null;          
               Image image = null;
               Toolkit toolkit = Toolkit.getDefaultToolkit();          
                image = toolkit.getImage( getClass().getResource(fileName) );           
                return image;
                }catch(Exception exc){
                    JOptionPane.showMessageDialog(new JFrame(), "Exception loading the image","Error",JOptionPane.ERROR_MESSAGE);
                    return null;
    ...The images in this one are in the folder Imagenes inside the folder of my *.class and *.java
    This one work fine in bluej too, but the jar... It doesn't even start.
    3- And the last one.
    abrirButton = new JButton(new ImageIcon(getClass().getResource("Imagenes/open24.gif"));Works fine in bluej, not running in jar.
    Am I doing something wrong? Please somebody help me.
    thanks in advance

    Are you putting the image files inside the jar? If you are, then use "jar tf jarfile.jar" to display the contents of the jar and make sure the files are there and inside the right directory. If you are not, then you can not use getClass().getResource() from a jar file because it will look inside the jar file.
    If you are getting an error message, please post it.

  • Can't get a jar file to work

    Hi All,
    I have a moronic question. I have a simple jar file called xmlpowertoolkit.jar and I can't get any of the classes in it imported into my simple console app.
    I unpacked the jar file to look at the namespace hierarchy since I have no documentation with this jar file. It came out like this:
    xmlpowertoolkit\com\sabre\xmlpowertoolkit\
    ... then a bunch of classes in this directory. Specifically, there is a class called XMLPowerToolKit_Services that I need to use. Here is a typical constructor call for this class:
    XMLPowerToolKit_Services myvar = new XMLPowerToolKit_Services ();
    Can someone tell me what I'm doing wrong with this jar file? How do I import this namespace so that I can use the class?
    Do I not say:
    import com.sabre.*;
    Thanks for your help.
    Steven Tate

    Try
    import xmlpowertoolkit.com.sabre.xmlpowertoolkit.*;
    OR
    import com.sabre.xmlpowertoolkit.*;
    I think com.sabre.* will just get you the classes at that "level" ... it doesn't grab the classes in subfolders.
    i hope that works.

Maybe you are looking for

  • Select statement in transformation routine

    Hi, I'm working on a trans.routine wich should select the enddate of the last absence from the active table of a DSO. The routine I have now: SELECT SINGLE gm_vld_to FROM /bic/azds_afwz00 INTO RESULT WHERE employee EQ SOURCE_FIELDS-pernr AND /bic/zch

  • Yahoo mail keeps going offline

    I updated my yahoo password the other day. Ever since then my yahoo mail (through imac mail app)  has been going offline. I can not send messages using my imac.  I should note that I do not have any issues signing into yahoo.com and sending/ receivin

  • Pro Application Update causing troubles

    After installing Pro Application Update 1.0 today I can't use Compressor. When I use the usual setting for AppleTV.m4v and Submit the file the Batch Monitor shows just Waiting without processing. I didn't have this issue yesterday without the Pro App

  • Planning strategy 50

    Dear all, I am using strategy 50 for my FG. I have created PIR for FG for 300 qty & created saleorder of 320 qty for FG. while doing availability check for sale order it is confirming only 300 qty bcoz PIR exists for only 300 qty. after this i saved

  • Why do I need to supply credit card info for a free app?

    I've owned a 4s for 1 1/2 years and downloaded many free apps.  Now, in the last week, I'm asked for my credit card information to download a free app?  What gives?