Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

.properties file not found

807603Nov 26 2007 — edited Dec 11 2007
Here is the problem :

There is a jar, called ijpos.jar. It contains a property file, called jpos.properties.
Now, I make a main class, below is its code:
 public static void main(String a[]){
        MySigCapMain m1 = new MySigCapMain();
        m1.newInit();
    }
    public void newInit()
    {
        System.setSecurityManager(null);
        try {
            writeToConsole("Opening SIGCAP");
            sigCap.open("i6780_SigCap");
            sigCap.addDataListener(this);
            sigCap.addErrorListener(this);
            writeToConsole("Claiming SIGCAP");
            sigCap.claim(100);
            sigCap.setDeviceEnabled(true);
            sigData = new Vector();
            iLen = 0;
            sigCap.beginCapture("Sigform");
            sigCap.setDataEventEnabled(true);
            writeToConsole("Init completed");
        }
        catch(Exception exception)
        {
            writeToConsole("Exception\t" + exception);
            exception.printStackTrace();
        }
        
    }
I have included the ijpos.jar in the project properties.

This code runs perfectly as desired.

Now, I make an applet and write the code of the main method above, in the init method of the applet.
I made a jar out of it, and include it in the archive attribute of the applet tag. I also include the ijpos jar in the archive. All the jars are signed jars, and also the security manager for the System is set to null.

The problem here is that it is not able to find the jpos.properties file.

Please help.

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2008
Added on Nov 26 2007
15 comments
755 views