ERROR
When loading or using a MapObjects-Java based application, the following error may occur:
Code:
javaw.exe - no Disk
There is no disk in the drive. Please insert a disk into drive A:.
This issue has been logged as a bug with Java and is frequently encountered when dealing with the SecurityManager and Java applets in some environments, such as browser and Java Web Start. See the link in the Related Information section the Sun bug report.
The use of some core Java classes in MapObjects-Java may cause an applet's SecurityManager to attempt to access available drives, including A if available. For example, creating a javax.swing.JFileChooser object will, by default, try to access all drives. MapObjects uses the JFileChooser object when saving AXL files.
Code:
class MySecurityManager
extends java.lang.SecurityManager {
private static final String DRIVE_A = "A:\";
public void checkRead(String filename) {
if (!DRIVE_A.equals(filename)){
super.checkRead(filename);
}
}
}
Code:
public class DiskApplet extends JApplet {
MySecurityManager msm = new MySecurityManager();
public void init(){
System.setSecurityManager(msm);
...
Get help from ArcGIS experts
Download the Esri Support App