1. Pinning down the location of a jar file coderanch.comHi All, I have a class inside a jar that wants to read the containing jar's manifest. Given that I don't know where on the machine the jar will be placed, I don't know how to instantiate a JarFile object. How do I determine the location of the jar in order to get a JarFile or JarURLConnection object? Thanks, Greg Jewell ... |
2. The correct location of Jar files coderanch.comHello! I'm using jSMSEngine.jar to send SMS messages from my java app. Here is a primitive view of my code. import import org.jsmsengine.*; public class SMS extends JFrame implements ActionListener{ CService SMSServ = null; SMS(Sting title){ super(title); ...................... SMSServ = new CService("COM7", 19200, "Nokia", "6230"); ...................... } ..................... public static void main(String[] aid){ new SMS("SMS Sender"); } I created a shortcut ... |
3. How to get the location of the jar file forums.oracle.com |
4. How to specify in the code the location of a file within the jar forums.oracle.comAn entry in a .jar file isn't a file, it is just an 'entry'; a .dll (nor an .so) file can be stored in a .jar because it's an operating system thing and the operating system just looks for files, i.e. it doesn't know anything about .jar files. Entries in a .jar file can be opened by the getResource( ... ) ... |