I developed a Java application which gives access to shared folders from the Network.
Scenario
The application I am accessing includes a search field. I am accessing the file using the following code:
try {
File file = new File("//192.x.x.x/asfa/ASFA DVD 2000 UPTO 2015 - Q1/cdrun.exe");
Desktop dt = Desktop.getDesktop();
dt.open(file);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Unable to access Remote Database, Please try after some time!!!");
e.printStackTrace();
}
I have also tried (only one of these lines at a time):
File file = new File("\\\\SERVER\\asfa\\ASFA DVD 2000 UPTO 2015 - Q1\\cdrun.exe");
File file = new File("\\\\192.x.x.x\\asfa\\ASFA DVD 2000 UPTO 2015 - Q1\\cdrun.exe");
File file = new File("//SERVER/asfa/ASFA DVD 2000 UPTO 2015 - Q1/cdrun.exe");
For all these above mentioned scenarios, the application cdrun.exe
opens up(which is fine) from the SERVER
, but gives an error message which is :
So, from a few similar posts in SO[link1, link2] and googling around, I found that %%Include{ }%%Error
has something to do with your path specified. But I never came to a solution and the error continues to show up.
Whereas when I access the application cdrun.exe
from the SERVER
itself, it runs fine.
Any suggestions ?