Run time Exception after Clean and Build. Programming Software Development by prnjn …. when i run the jar file form dist folder using cmdPrompt the following errors shows . Exception in thread "main"… Re: PySerial Programming Software Development by Tech B Looks like I misread your post. Do you get the same error if you try opening the port my way? If you do, try closing the port in the exception. I googled a bit, try opening the terminal/cmdprompt with root/admin privs. Let me know how it goes. Re: Run time Exception after Clean and Build. Programming Software Development by NormR1 > Exception in thread "main" java.lang.NullPointerEXception > at javax.swing.ImageIcon.<init><unknown Source> > at hrms_project.Login_frame.<init><Login_frame.java:116> How are you using the ImageIcon class on line 116? It looks like the program may not be finding the file. Are you using the getResource … Re: Run time Exception after Clean and Build. Programming Software Development by prnjn in declaration i have written `Image img =(new ImageIcon(getClass().getResource("/images/sirte_ico.jpg"))).getImage();` Then in jFrame properties >IconImage > Custom > and there in field i mentioned **img** i had done this to set sirte_ico.jpg as icon for the frame .. Is there anyother way to do so that i do not … Re: Run time Exception after Clean and Build. Programming Software Development by prnjn the folder images is in src folder of the project .. then whats wrong Re: Run time Exception after Clean and Build. Programming Software Development by NormR1 It will be better if you put the image files in the jar file and use the getResource methods to read them. Reading a disk file from a jar file will require that the files all be in the correct locations. If they are in the jar file then you don't have to worry about that. They will always be where you put them in the jar. Re: Run time Exception after Clean and Build. Programming Software Development by prnjn how to keep image files in the jar file ? and then how to use getResource methods to read them after that ? Re: Run time Exception after Clean and Build. Programming Software Development by NormR1 Use the jar command to add files to a jar file. There are lots of code samples that use getResource() on the forum. Do a Search for some of them.