private void getAllIP() {
        try {
            FileInputStream fstream;
            String filePath = getClass().getProtectionDomain().getCodeSource().getLocation().toString();

            //file path calculation when deployed in NetBeans
//            int endindex = filePath.indexOf("dist/gfdeploy");
//            filePath = filePath.substring(6, endindex);
//            filePath = filePath + ("Warehouse-ejb/src/java/communication/IPaddress.txt");

            //file path calculation when deployed in cmd
            filePath = filePath.substring(6);
            filePath = filePath + ("communication/IPaddress.txt");

            fstream = new FileInputStream(filePath);
            DataInputStream in = new DataInputStream(fstream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
            String line;
            while ((line = br.readLine()) != null) {
                IPaddress.add(line);
            }
            fstream.close();
            in.close();
            br.close();
        } catch (FileNotFoundException ex) {
            System.out.println("..............................COMMUNICATION - File IPAddress.txt not found");
        } catch (IOException ex) {
            Logger.getLogger(Communication.class.getName()).log(Level.SEVERE, null, ex);
        }
    }