Accessing Remote PC Using RMI

Hello friends.
We have developed an Explorer(Windows style) Using RMI which can browse any client computer (shared/non shared).
It works quite well but we have some problem like not all file/folders
are accessible(though they are visible).
All those interested can help me out.
Source with details are available at
geocities.com/dev.sushant/rmi

As Bob rightly says you may have a problem if the machine you are trying to access is on a corporate network as you will need the permission and help of the network administrator to achieve this.
I assume from your post that there is not a VPN connection set up on the remote PC network. Assuming that you have access to the router on the remote network then you will need to set up portforwarding on it at some point so I suggest you go to this page and see if your router is listed as you will need some instructions if you don't use the software suggested by Bob.
When accessing a remote machine, PC or Mac, I have always used a secure connection to do so and the alternative to a VPN is an SSH tunnel. Unfortunately unlike the Mac Windows doesn't come with SSH server software installed so if you want to go down this route you will have to install and configure this first. I haven't tried this on Windows 7 yet but I have been successful on Windows XP and there are plenty of sites with instructions on how to set this up like this one here. Once the SSH server is set up on the PC and port 22 on your remote router has been forwarded then you can set up a SSH tunnel in the same way as described in my post in this thread http://discussions.apple.com/thread.jspa?messageID=10847513&#10847513
Message was edited by: Sean Dale1

Similar Messages

  • How to capture the remot desktop using RMI?

    Hi friends..
    I am doing a mini project to capture the remot desktop using RMI. I am very new with this subject. So 'm waiting for the help of experts...

    You can't. RMI doesn't do that. After you have captured it, some other way, you can transmit it via RMI, or plain Sockets, or several other ways.

  • How to access remote database using applet

    hi all,
    I want to know how to access remote database using applet,
    Please help me anybody.
    Regards
    Jesu

    If the database is on a public server, you probably can't access it directly (security wise). You can make your applet talk to a server-side application, which makes the database calls on behalf of the applet. But even in an intranet environment this setup is often preferable, because you don't need to distribute a JDBC driver to all your clients.

  • Remote Browsing using RMI

    Hi,
    Read a lot of forums about how to create a Remote file browser using RMI and JFileChooser.
    Not done any RMI coding I thought I'd give it a try. I have finally after 2 days managed to do it.
    This is an overview.
    Create a RemoteFile class that extends Remote.. eg.
    import java.rmi.*;
    import java.io.*;
    import java.net.*;
    public interface RemoteFile extends Remote {
        public boolean canRead() throws RemoteException;
        public boolean canWrite() throws RemoteException;
        public int compareTo(File pathname) throws RemoteException;etc.etc
    Then create an implementation class...
    import java.rmi.server.*;
    import java.io.*;
    import java.net.*;
    public class RemoteFileImpl extends UnicastRemoteObject implements RemoteFile {
        private File f;
        public RemoteFileImpl(File sf) throws java.rmi.RemoteException {
            f=sf;
        public boolean canRead() throws java.rmi.RemoteException {
            return f.canRead();
        }etc etc for all other File functions.
    Then we create a RemoteFileSystemView interface, again extending remote...
    public interface RemoteFileSystemView extends Remote {
        public RemoteFile createFileObject(File dir, String filename) throws RemoteException;
        public RemoteFile createFileObject(String path) throws RemoteException;blah blah
    Then An implementation class...
    import javax.swing.filechooser.*;
    import java.io.*;
    public class RemoteFileSystemViewImpl extends java.rmi.server.UnicastRemoteObject implements RemoteFileSystemView {
        int length;
        private FileSystemView fs;
        public RemoteFileSystemViewImpl() throws java.rmi.RemoteException {
            fs=FileSystemView.getFileSystemView();
        public RemoteFile createFileObject(String path) throws java.rmi.RemoteException {
            return new RemoteFileImpl(fs.createFileObject(path));
        public RemoteFile createFileObject(java.io.File dir, String filename) throws java.rmi.RemoteException {
            return new RemoteFileImpl(fs.createFileObject(dir,filename));
        //public RemoteFileImpl createFileSystemRoot(java.io.File f) throws java.rmi.RemoteException {
        //    return new RemoteFileImpl(fs.createFileSystemRoot(f));
        public RemoteFile createNewFolder(java.io.File containingDir) throws java.rmi.RemoteException {
            RemoteFile tempf;
            try{
                tempf= new RemoteFileImpl(fs.createNewFolder(containingDir));
            } catch (IOException e){System.out.println(e); tempf=null;}
            return  tempf;
        public RemoteFile getDefaultDirectory() throws java.rmi.RemoteException {
            return new RemoteFileImpl(fs.getDefaultDirectory());
        public String[] getFiles(java.io.File dir, boolean useFileHiding) throws java.rmi.RemoteException {
            String[] tempf= new String[fs.getFiles(dir,useFileHiding).length];
            int i;
            File[] f = fs.getFiles(dir,useFileHiding);
            for(i=0;i<tempf.length;i++) tempf=f[i].toString();
    return tempf;
    public RemoteFile getHomeDirectory() throws java.rmi.RemoteException {
    return new RemoteFileImpl(fs.getHomeDirectory());
    public RemoteFile getParentDirectory(java.io.File dir) throws java.rmi.RemoteException {
    return new RemoteFileImpl(fs.getParentDirectory(dir));
    public String[] getRoots() throws java.rmi.RemoteException {
    String[] tempf= new String[fs.getRoots().length];
    System.out.println("fs is-"+fs.getRoots().length);
    int i;
    File[] f = fs.getRoots();
    for(i=0;i<tempf.length;i++) {tempf[i]=f[i].toString();}
    System.out.println("Roots="+tempf[0]);
    return tempf;
    public String getSystemDisplayName(java.io.File f) throws java.rmi.RemoteException {
    return fs.getSystemDisplayName(f);
    public javax.swing.Icon getSystemIcon(java.io.File f) throws java.rmi.RemoteException {
    return fs.getSystemIcon(f);
    public String getSystemTypeDescription(java.io.File f) throws java.rmi.RemoteException {
    return fs.getSystemTypeDescription(f);
    public boolean isComputerNode(java.io.File dir) throws java.rmi.RemoteException {
    return fs.isComputerNode(dir);
    public boolean isDrive(java.io.File dir) throws java.rmi.RemoteException {
    return fs.isDrive(dir);
    public boolean isFileSystem(java.io.File f) throws java.rmi.RemoteException {
    return fs.isFileSystem(f);
    public boolean isFileSystemRoot(java.io.File dir) throws java.rmi.RemoteException {
    return fs.isFileSystemRoot(dir);
    public boolean isFloppyDrive(java.io.File dir) throws java.rmi.RemoteException {
    return fs.isFloppyDrive(dir);
    public boolean isHiddenFile(java.io.File f) throws java.rmi.RemoteException {
    return fs.isHiddenFile(f);
    public boolean isParent(java.io.File folder, java.io.File file) throws java.rmi.RemoteException {
    return fs.isParent(folder,file);
    public boolean isRoot(java.io.File f) throws java.rmi.RemoteException {
    return fs.isRoot(f);
    public Boolean isTraversable(java.io.File f) throws java.rmi.RemoteException {
    return fs.isTraversable(f);
    public RemoteFile getChild(File parent, String fileName) throws java.rmi.RemoteException {
    return new RemoteFileImpl(fs.getChild(parent,fileName));
    Notice that whenever I should be passing a File, I pass a RemoteFile instead! Also.. when I am passing a File Array, I instead pass a String array. Reason is.. I havent managed to get File arrays through RMI.. Any Help anyone?!?!?!?!
    I got round it by simply passing a String array and relying on the client to reconstruct a File array locally using the String array. Messy... perhaps.. any suggestions welcome!
    Next.. use rmic to create Stubs and Skels for the 2 implementations and write an RMI server.. eg.
    import java.rmi.Naming;
    public class RemoteServerRMI {
        /** Creates a new instance of RemoteServerRMI */
        public RemoteServerRMI() {
            try {
                RemoteFileSystemView c = new RemoteFileSystemViewImpl();
                Naming.rebind("rmi://localhost:1099/FileService", c);
            } catch (Exception e) {
                System.out.println("Trouble: " + e);
        public static void main(String[] args) {
            new RemoteServerRMI();
    }Yes.. simple and shamelessly lifted from the tutorials.
    and Finally the client....
    import javax.swing.filechooser.*;
    import java.rmi.*;
    import java.net.MalformedURLException;
    import java.io.*;
    import javax.swing.*;
    public class RemoteFileSystemViewClient extends FileSystemView {
        static RemoteFileSystemView c;
        public RemoteFileSystemViewClient() {
            try {
                c = (RemoteFileSystemView) Naming.lookup("rmi://localhost:1099/FileService");
            catch (MalformedURLException murle) {
                System.out.println();
                System.out.println(
                "MalformedURLException");
                System.out.println(murle);
            catch (RemoteException re) {
                System.out.println();
                System.out.println(
                "RemoteException");
                System.out.println(re);
            catch (NotBoundException nbe) {
                System.out.println();
                System.out.println(
                "NotBoundException");
                System.out.println(nbe);
        public File getHomeDirectory() {
            File tempf;
            try {
                tempf= new File(c.getHomeDirectory().gettoString());
            } catch (RemoteException re){System.out.println(re);tempf=null;}
            return tempf;
        public File createFileObject(File dir, String filename) {
            File tempf;
            try {
                tempf= new File(c.createFileObject(dir, filename).gettoString());
            } catch (RemoteException re){System.out.println(re);tempf=null;}
            return tempf;
        public File createFileObject(String path) {
            File tempf;
            try {
                tempf=new File(c.createFileObject(path).gettoString());
            } catch (RemoteException re){System.out.println(re);tempf=null;}
            return tempf;
        public File createNewFolder(File containingDir) throws RemoteException {
            File tempf;
            try {
                tempf=new File(c.createNewFolder(containingDir).getAbsolutePath());
            } catch (RemoteException re){System.out.println(re);tempf=null;}
            return tempf;
        public File getChild(File parent, String fileName) {
            File tempf;
            try {
                tempf=new File(c.getChild(parent,fileName).gettoString());
            } catch (RemoteException re){System.out.println(re);tempf=null;}
            return tempf;
        public File getDefaultDirectory() {
            File tempf;
            try {
                tempf=new File(c.getDefaultDirectory().gettoString());
            } catch (RemoteException re){System.out.println(re);tempf=null;}
            return tempf;
        public File[] getFiles(File dir, boolean useFileHiding) {
            File[] tempf;
            try {
                tempf=new File[c.getFiles(dir,useFileHiding).length];
                String[] rtempf=c.getFiles(dir, useFileHiding);
                int i;
                for(i=0;i<c.getFiles(dir, useFileHiding).length;i++) tempf=new File(rtempf[i]);
    } catch (RemoteException re){System.out.println(re);tempf=null;}
    return tempf;
    public File getParentDirectory(File dir) {
    File tempf;
    try {
    tempf= new File(c.getParentDirectory(dir).gettoString());
    } catch (RemoteException re){System.out.println(re);tempf=null;}
    return tempf;
    public File[] getRoots(){
    File[] tempf;
    try {
    String[] rtempf= c.getRoots();
    System.out.println("in");
    tempf=new File[rtempf.length];
    int i;
    for(i=0;i<c.getRoots().length;i++) tempf[i]=new File(rtempf[i]);
    } catch (RemoteException re){System.out.println(re);tempf=null;}
    return tempf;
    public String getSystemDisplayName(File f) {
    String tempf;
    try{
    tempf=c.getSystemDisplayName(f);
    } catch (RemoteException re){System.out.println(re);tempf=null;}
    return tempf;
    public javax.swing.Icon getSystemIcon(File f) {
    javax.swing.Icon tempf;
    try{
    tempf=c.getSystemIcon(f);
    } catch (RemoteException re){System.out.println(re);tempf=null;}
    return tempf;
    public String getSystemTypeDescription(File f) {
    String tempf;
    try {
    tempf=c.getSystemTypeDescription(f);
    } catch (RemoteException re){System.out.println(re);tempf=null;}
    return tempf;
    public boolean isComputerNode(File dir) {
    boolean tempf;
    try {
    tempf= c.isComputerNode(dir);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public boolean isDrive(File dir) {
    boolean tempf;
    try {
    tempf= c.isDrive(dir);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public boolean isFileSystem(File f) {
    boolean tempf;
    try {
    tempf= c.isFileSystem(f);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public boolean isFileSystemRoot(File dir) {
    boolean tempf;
    try {
    tempf= c.isFileSystemRoot(dir);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public boolean isFloppyDrive(File dir) {
    boolean tempf;
    try {
    tempf= c.isFloppyDrive(dir);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public boolean isHiddenFile(File f) {
    boolean tempf;
    try {
    tempf= c.isHiddenFile(f);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public boolean isParent(File folder, File file) {
    boolean tempf;
    try {
    tempf= c.isParent(folder,file);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public boolean isRoot(File f) {
    boolean tempf;
    try {
    tempf= c.isRoot(f);
    } catch (RemoteException re){System.out.println(re);tempf=false;}
    return tempf;
    public Boolean isTraversable(File f) {
    Boolean tempf;
    try {
    tempf= c.isTraversable(f);
    } catch (RemoteException re){System.out.println(re);tempf=new Boolean(false);}
    return tempf;
    public static void main(String[] args) {
    RemoteFileSystemViewClient rc = new RemoteFileSystemViewClient();
    JFileChooser fch= new JFileChooser(rc);
    fch.showOpenDialog(null);
    Notice.. the getFiles and getRoots, procedures, get String arrays from the RMI and reconstruct local File arrays.
    I managed to browse up and down directories with this, and even.. to my surprise, create folders!
    If you got any improvements please let me know at [email protected]

    Copyright &copy; Esmond Pitt, 2007. All rights reserved.
    * RemoteFileSystem.java
    * Created on 13 May 2007, 14:39
    import java.io.File;
    import java.io.IOException;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import javax.swing.Icon;
    * @author Esmond Pitt
    public interface RemoteFileSystem extends Remote
         File createFileObject(String path) throws RemoteException;
         File[] getFiles(File dir, boolean useFileHiding) throws RemoteException;
         File createFileObject(File dir, String filename) throws RemoteException;
         File getChild(File parent, String fileName) throws RemoteException;
         boolean isFloppyDrive(File dir) throws RemoteException;
         boolean isFileSystemRoot(File dir) throws RemoteException;
         boolean isFileSystem(File f) throws RemoteException;
         boolean isDrive(File dir) throws RemoteException;
         boolean isComputerNode(File dir) throws RemoteException;
         File createNewFolder(File containingDir) throws RemoteException, IOException;
         File getParentDirectory(File dir) throws RemoteException;
         String getSystemDisplayName(File f) throws RemoteException;
         Icon getSystemIcon(File f) throws RemoteException;
         String getSystemTypeDescription(File f) throws RemoteException;
         File getDefaultDirectory() throws RemoteException;
         File getHomeDirectory() throws RemoteException;
         File[] getRoots() throws RemoteException;
         // File     createFileSystemRoot(File f) throws RemoteException;
    import java.io.File;
    import java.io.IOException;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.Icon;
    import javax.swing.filechooser.FileSystemView;
    * @author Esmond Pitt
    * @version $Revision: 3 $
    public class RemoteFileSystemServer extends UnicastRemoteObject implements RemoteFileSystem
         private FileSystemView     fs = FileSystemView.getFileSystemView();
         private Logger     logger = Logger.getLogger(this.getClass().getName());
         /** Creates a new instance of RemoteFileSystemServer */
         public RemoteFileSystemServer(int port) throws RemoteException
              super(port);
              logger.log(Level.INFO, "exported on port {0} and receiving calls fs={1}", new Object[]{port, fs});
         public File createFileObject(String path)
              logger.log(Level.FINE, "createFileObject({0})", path);
              return fs.createFileObject(path);
         public File createFileObject(File dir, String filename)
              logger.log(Level.FINE, "createFileObject({0},{1})", new Object[]{dir, filename});
              return fs.createFileObject(dir, filename);
         public File[] getFiles(File dir, boolean useFileHiding)
              logger.log(Level.FINE, "getFiles({0},{1})", new Object[]{dir, useFileHiding});
              return fs.getFiles(dir, useFileHiding);
         public File getChild(File parent, String fileName)
              logger.log(Level.FINE, "getChild({0},{1})", new Object[]{parent, fileName});
              return fs.getChild(parent, fileName);
         public boolean isFloppyDrive(File dir)
              logger.log(Level.FINE, "isFloppyDrive({0})", dir);
              return fs.isFloppyDrive(dir);
         public boolean isFileSystemRoot(File dir)
              logger.log(Level.FINE, "isFileSystemRoot({0})", dir);
              return fs.isFileSystemRoot(dir);
         public boolean isFileSystem(File f)
              logger.log(Level.FINE, "isFileSystem({0})", f);
              return fs.isFileSystem(f);
         public boolean isDrive(File dir)
              logger.log(Level.FINE, "isDrive({0})", dir);
              return fs.isDrive(dir);
         public boolean isComputerNode(File dir)
              logger.log(Level.FINE, "isComputerNode({0})", dir);
              return fs.isComputerNode(dir);
         public File createNewFolder(File containingDir) throws IOException
              logger.log(Level.FINE, "createNewFolder({0})", containingDir);
              return fs.createNewFolder(containingDir);
         public File getParentDirectory(File dir)
              logger.log(Level.FINE, "getParentDirectory({0})", dir);
              return fs.getParentDirectory(dir);
         public String getSystemDisplayName(File f)
              logger.log(Level.FINE, "getSystemDisplayName({0})", f);
              return fs.getSystemDisplayName(f);
         public Icon getSystemIcon(File f)
              logger.log(Level.FINE, "getSystemIcon({0})", f);
              return fs.getSystemIcon(f);
         public String getSystemTypeDescription(File f)
              logger.log(Level.FINE, "getSystemTypeDescription({0})", f);
              return fs.getSystemTypeDescription(f);
         public File getDefaultDirectory()
              logger.log(Level.FINE, "getDefaultDirectory()");
              return fs.getDefaultDirectory();
         public File getHomeDirectory()
              logger.log(Level.FINE, "getHomeDirectory()");
              return fs.getHomeDirectory();
         public File[] getRoots()
              logger.log(Level.FINE, "getRoots()");
              return fs.getRoots();
          public File createFileSystemRoot(File f)
              return fs.createFileSystemRoot(f);
    import java.io.File;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.rmi.Naming;
    import java.rmi.NotBoundException;
    import java.rmi.RemoteException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.Icon;
    import javax.swing.filechooser.FileSystemView;
    * @author Esmond Pitt
    * @version $Revision: 4 $
    public class RemoteFileSystemView extends FileSystemView
         private Logger     logger = Logger.getLogger(this.getClass().getName());
         private RemoteFileSystem     fs;
         public RemoteFileSystemView(String host)
         throws NotBoundException, RemoteException, MalformedURLException
              String     url = "rmi://"+host+"/"+RemoteFileSystem.class.getName();
              this.fs = (RemoteFileSystem)Naming.lookup(url);
              logger.log(Level.INFO, "Connected to {0} via {1}", new Object[]{url, fs});
         public File createFileObject(String path)
              logger.entering(this.getClass().getName(), "createFileObject", path);
              try
                   return fs.createFileObject(path);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "path="+path, exc);
                   return null;
         public File[] getFiles(File dir, boolean useFileHiding)
              logger.entering(this.getClass().getName(), "getFiles", new Object[]{dir, useFileHiding});
              try
                   return fs.getFiles(dir, useFileHiding);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "dir="+dir+" useFileHiding="+useFileHiding, exc);
                   return null;
         public File createFileObject(File dir, String filename)
              logger.entering(this.getClass().getName(), "createFileObject", new Object[]{dir, filename});
              try
                   return fs.createFileObject(dir, filename);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "dir="+dir+" filename="+filename, exc);
                   return null;
         public File getChild(File parent, String fileName)
              logger.entering(this.getClass().getName(), "getChild", new Object[]{parent, fileName});
              try
                   return fs.getChild(parent, fileName);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "parent="+parent+" fileName="+fileName, exc);
                   return null;
         public boolean isFloppyDrive(File dir)
              logger.entering(this.getClass().getName(), "isFloppyDrive", dir);
              try
                   return fs.isFloppyDrive(dir);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "dir="+dir, exc);
                   return false;
         public boolean isFileSystemRoot(File dir)
              logger.entering(this.getClass().getName(), "isFileSystemRoot", dir);
              try
                   return fs.isFileSystemRoot(dir);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "dir="+dir, exc);
                   return false;
         public boolean isFileSystem(File file)
              logger.entering(this.getClass().getName(), "isFileSystem", file);
              try
                   return fs.isFileSystem(file);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "file="+file, exc);
                   return false;
         public boolean isDrive(File dir)
              logger.entering(this.getClass().getName(), "isDrive", dir);
              try
                   return fs.isDrive(dir);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "dir="+dir, exc);
                   return false;
         public boolean isComputerNode(File dir)
              logger.entering(this.getClass().getName(), "isComputerNode", dir);
              try
                   return fs.isComputerNode(dir);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "dir="+dir, exc);
                   return false;
         public File createNewFolder(File containingDir) throws IOException
              logger.entering(this.getClass().getName(), "createNewFolder", containingDir);
              try
                   return fs.createNewFolder(containingDir);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "containingDir="+containingDir, exc);
                   return null;
         public File getParentDirectory(File dir)
              logger.entering(this.getClass().getName(), "getParentDirectory", dir);
              try
                   return fs.getParentDirectory(dir);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "dir="+dir, exc);
                   return null;
         public String getSystemDisplayName(File file)
              logger.entering(this.getClass().getName(), "getSystemDisplayName", file);
              try
                   return fs.getSystemDisplayName(file);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "file="+file, exc);
                   return null;
         public Icon getSystemIcon(File file)
              logger.entering(this.getClass().getName(), "getSystemIcon", file);
              try
                   return fs.getSystemIcon(file);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "file="+file, exc);
                   return null;
         public String getSystemTypeDescription(File file)
              logger.entering(this.getClass().getName(), "getSystemTypeDescription", file);
              try
                   return fs.getSystemTypeDescription(file);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "file="+file, exc);
                   return null;
         public File getDefaultDirectory()
              logger.entering(this.getClass().getName(), "getDefaultDirectory");
              try
                   return fs.getDefaultDirectory();
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "getDefaultDirectory()", exc);
                   return null;
         public File getHomeDirectory()
              logger.entering(this.getClass().getName(), "getHomeDirectory");
              try
                   return fs.getHomeDirectory();
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "getHomeDirectory()", exc);
                   return null;
         public File[] getRoots()
              logger.entering(this.getClass().getName(), "getRoots");
              try
                   return fs.getRoots();
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "getRoots()", exc);
                   return null;
         protected File createFileSystemRoot(File file)
              logger.entering(this.getClass().getName(), "createFileSystemRoot", file);
              logger.log(Level.SEVERE, "createFileSystemRoot called with ({0})", new Object[]{file});
              try
                   return fs.createFileSystemRoot(file);
              catch (RemoteException exc)
                   logger.log(Level.SEVERE, "", exc);
              return null;
    }

  • Error while accessing remote server using applet in jsp page

    hii..
    We are accessing a data repository MDSPlus. Its used for storing data such as signals in tree like structure. We r coding for client side in JSP .
    For this we are invoking applet which uses jar files of jScope(java tool for displaying waveforms). We r getting the following error when we try to access a remote server in network. But it works fine with local server.
    So kindly help .
    ERROR IS:
    java.security.AccessControlException:access denied(java.net.SocketPermission 202.41.112.140:8000 connect,resolve)
    url mds:://202.41.112.140/SST_DAQ/11/\SST_DAQ::TOP.BOLOMETER:BOLO_1
    Use ploicytool.exe in JDK or JRE installation directory to add socket access permission.
    The IP address mentioned above in error is the computer with which v have to connect. SST_DAQ is the expt name,11 is the shot no. , BOLOMETER and BOLO_1 are the tree node s..
    plzz reply fast........

    Hi Frank,
    Are you using standalone OC4J or 9iAS ? If you are using standalone OC4J then you need to add a proper data source entry in %OC4J_HOME%j2ee\home\config\data-sources.xml file.
    If you are using 9iAS the you can log in to the Enterprise Manager console and add the data source entry by using wizard provided by 9iAS.
    Ensure the case of the JNDI lookup string, since, it is case sensitive.
    Hope this helps.
    Abhijeet

  • How to access Remote File using File Services or Servlet

    Hi Friends,
    I want to access a file from a remote location. How to do that ?
    I tried to display an image in my client application. The image source is from remote location. I tried with URL, is there any other way to read/write remote resources through secured connection with some encryption and decryption techniques.
    Kindly help me out !!!
    Regards,
    V.Prasanna

    whelp, If you map the drive then the url thing should work. Other then that I don't know. I normally map the drive.

  • Error during JNDI lookup Accessing Remote EJB (access to web service restricted using declarative security model)

    Hello everyone,
    I developed a Web Service prototype accessing remote EJB using the EJB
    control with special syntax in the jndi-name attribute: @jws:ejb
    home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
    Everything works fine, but I get an error when I restrict access to my web
    service with a declarative security model by implementing steps provided in
    help doc:
    - Define the web resource you wish to protect
    - Define which security role is required to access the web resource
    - Define which users are granted the required security role
    - Configure WebLogic Server security for my web service(Compatibility
    Security/Users)
    I launch the service by entering the address in a web browser. When prompted
    to accept the digital certificate, click Yes, when prompted for network
    authentication information, enter username and password, navigate to the
    Test Form tab of Test View, invoke the method by clicking the button and I
    get the following exception:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
    name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed
    for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
    </detail>
    </error>
    I have a simple Hello method as well in my WebService (which is also
    restricted) and it works fine, but remote EJB access doesn't. I tested my
    prototype on Weblogic 7.2 and 8.1 platforms - same result.
    Is that a bug or I am missing some additional configuration in order to get
    that working. Has anyone seen similar behavior? Is there a known resolution?
    Or a suggested way to work around the problem?
    Thank you.
    Andre

    Andre,
    It would be best if this issue is handled as an Eval Support case. Please
    BEA Customer Support at http://support.beasys.com along with the required
    files, and request that an Eval support case be created for this issue.
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Andre Shergin" <[email protected]> wrote in message
    news:[email protected]...
    Anurag,
    I removed "t3", still get an error but a different one (Unable to create
    InitialContext:null):
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
    create InitialContext:null]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
    create InitialContext:null] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetVisaHistoryTransactions.getVisaHistoryTxn(GetVisaHistoryTransactions
    .jws:67) </jwErrorDetail>
    </detail>
    </error>
    Note: inter-domain communication is configured properly. The Web Service to
    remote EJB works fine without a declarative security.
    Any other ideas?
    Thank you for your help.
    Andre
    "Anurag" <[email protected]> wrote in message
    news:[email protected]...
    Andre,
    It seems you are using the URL
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB
    whereas you should not be specifying the "t3:" protocol.
    The URL should be like
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB
    Please do let me know if you see any issues with this.
    Note that this will only allow you to access remote EJBs in the same WLS
    domain. For accessing EJBs on another domain, you need to configure
    inter-domain communication by
    following a few simple steps as mentioned at
    http://e-docs.bea.com/wls/docs81/ConsoleHelp/jta.html#1106135. This link has
    been provided in the EJB Control Workshop documentation.
    Regards,
    Anurag
    "Andre Shergin" <[email protected]> wrote in message
    news:[email protected]...
    Raj,
    I tried that before, it didn't help. I got similar error message:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
    failed for
    name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB]</faultstr
    ing>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
    failed for
    name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
    </detail>
    </error>
    Anything else should I try?
    P.S. AccountDelegatorEJB, the remote EJB my Web Service calls is NOTaccess
    restricted.
    I hope there is a solution.
    Thanks,
    Andre
    "Raj Alagumalai" <[email protected]> wrote in message
    news:[email protected]...
    Andre,
    Can you try using the following url with username and password
    jndi://username:password@host:7001/my.resource.jndi.object ?
    once you add webapp level security, the authenticated is the user who
    invokes the EJB.
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/ejb/con
    CreatingANewEJBControl.html?skipReload=true
    has more info on using remote EJB's.
    Hope this helps.
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Alla Resnik" <[email protected]> wrote in message
    news:[email protected]...
    Hello everyone,
    I developed a Web Service prototype accessing remote EJB using the EJB
    control with special syntax in the jndi-name attribute: @jws:ejb
    home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
    Everything works fine, but I get an error when I restrict access to my
    web
    service with a declarative security model by implementing steps
    provided
    in
    help doc:
    - Define the web resource you wish to protect
    - Define which security role is required to access the web resource
    - Define which users are granted the required security role
    - Configure WebLogic Server security for my web service(Compatibility
    Security/Users)
    I launch the service by entering the address in a web browser. Whenprompted
    to accept the digital certificate, click Yes, when prompted for
    network
    authentication information, enter username and password, navigate tothe
    Test Form tab of Test View, invoke the method by clicking the buttonand
    I
    get the following exception:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
    name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during
    JNDI
    lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookupfailed
    for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260)at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64)</jwErrorDetail>
    </detail>
    </error>
    I have a simple Hello method as well in my WebService (which is also
    restricted) and it works fine, but remote EJB access doesn't. I testedmy
    prototype on Weblogic 7.2 and 8.1 platforms - same result.
    Is that a bug or I am missing some additional configuration in order
    to
    get
    that working. Has anyone seen similar behavior? Is there a knownresolution?
    Or a suggested way to work around the problem?
    Thank you.
    Andre

  • Airport Extreme Route - Logging into remote computer using VPN

    is there anything i need to change on my airport extreme router. I used to be able to access remote computer via vpn and now I cant ever since i started using the airport extreme. Im trying to access remote computer using windows xp home.

    bkohlmeier wrote:
    On one of the 2wire config screens last night, it showed my various devices and next to each one said "IP" of 108.54.... so it was showing the public IP of each one, versus say "192.168.1.160".
    Ok, that is weird. Is each IP different and how many devices do you have getting public IP's.. there should only be one available and the only device getting it should be the extreme.
    If you only need a bridged modem. go out and buy a cheap single port modem. (I presume this is DSL service. Sorry I am not in US, so what is obvious to you may need spelling out).
    We often use the cheapest TP-Link modem here.. TD-8817 which are like $25 for bridged modem.. works really well.
    I think also you will find as far as pc is concerned the 2wire is actually the better router. Apple decided to use NAT-PMP on their routers instead of near universal upnp used by all windows networking and just about everything else. That makes opening ports that much harder on the Extreme for games etc.
    With the new version utility you can turn on guest network even with the Extreme in bridge.. and what you miss in terms of dhcp is not that great.
    If you want to get it working, let me suggest bridging the extreme for the moment. I am sure you will find no issues with Remote Desktop direct through the 2wire, as you probably used it in the past that way.

  • Remote Desktop in RMI

    hi
    if any one having the coding to connect remote machine using RMI...
    it is possible to do it in JAVA ?
    because i need application like GoToMyPc...
    pls help

    hi
    if any one having the coding to connect remote
    machine using RMI...RMI is not a remote desktop technology. It is one of several technologies you could use to build such a thing.
    it is possible to do it in JAVA ?I suspect not without some JNI code.
    because i need application like GoToMyPc...so why not buy GoToMyPc?

  • Select,delete in MS ACcess using RMI

    Hi,
    I am using RMI in order to remotely connect to an MS Access database
    But when executing the following
    Statement stmt_access;
    String res1_access = "DELETE FROM CUSTOMERS WHERE cid='"+CID+"' ";
    stmt_access.executeUpdate(res1_access);
    I am getting the error
    data type mismatch in criteria...
    Does anyone know if there is something in my statement?
    CID is a String and cid is a defined as a Text field in Access database.
    I should mention that the same statement works fine in Oracle.
    Is there any difference in the syntax of select and delete statements in MS Access?Because I suppose that the error is in thw where clause(in insert statements i don't have problems)
    I would be greatfull if someone has an idea...

    Seems to be some confusion in the above.
    You need to post the exact statements that are causing the problem.
    For your code the way to produce those is by using System.out.println() on the line before you use it. That does not mean by guessing or by printing it out twenty lines before.
    And the create statement is the one that you used to create the database, again not just a guess on your part correct?
    Keep in mind that if you do not get a SQLException then it means all of the SQL is executing correctly, but something is wrong with the data (or your presumptions about the data) which is the problem.

  • How can I access a database remote without using dblink, synonyms,aliases?

    My store procedure access a remote tables using dblink, synonyms, alias, but by business company requirenments I nedd to use another data base access method. My PL/SQL statement looks like
    select c.cus_id, c.cus_name, p.bankaccno
    into v_cus_id, v_cus_name, v_bankaccno
    from customer c, payment@finantial p
    where c.cus_id = p.cus_id
    Are any method else to connect to several remote databases concurrently?
    If Yes, plase say me how is it, or tell me where do I obtain some examples, or any documentation.
    Edited by: user518321 on Apr 21, 2009 1:58 PM
    Ok, But I must not use any of these data base access method, metioned: dbliks, aliases, synonyms.
    Edited by: user518321 on Apr 21, 2009 2:05 PM
    Ok, It is enough for now, I am surprised for the response time and for their arguments, thanks a lot.
    Edited by: user518321 on Apr 21, 2009 2:50 PM

    If you want to access a table in a remote database using SQL, you will need a database link. It would be exceptionally odd for the business to require that you access a remote database and to prohibit the use of database links. What is the business reason for that combination?
    If you want to look into rather more esoteric solutions, you could load a JDBC driver for the remote database, write a Java stored procedure that queries the remote table using that JDBC driver, and then cobble together some PL/SQL that joins the two result sets. You won't be able to reference the remote table in SQL and the solution won't scale well as data volumes increase and you'll be writing a whole lot of code to manually join tables together, but it does avoid database links. Of course, whatever concerns lead to the ban on database links would probably apply to loading a JDBC driver into the database and writing Java stored procedures to access the remote database, but since you haven't explained the reasoning behind the restrictions, we're just guessing.
    Justin

  • My DVR security sofware that I access remotely uses a "dvr .ocx" file....when I try it in Firefox , either the latest non beta (3.6.1.5) or the new beta version (4.0 rc) it will NOT work as it says the plugin is missing... it works in IE 8,but not IE9...

    My machine is Top of the range (my Company builds them so it had better be :) )
    Amd 1100t , 8gb ram , Windows 7 64 bit etc, etc...
    The is not a hardware problem , but a software problem with FF...Any help would be appreciated as I hate using IE 8 for anything at all :( but I have to keep it on my machines just to run my remote security cameras at my Computer shop ???
    Original question...as question length is limited ...not very bright that limit by the way :(
    "My DVR security sofware that I access remotely uses a "dvr .ocx" file....when I try it in Firefox , either the latest non beta (3.6.1.5) or the new beta version (4.0 rc) it will NOT work as it says the plugin is missing... it works in IE 8 (unfortunately) but not IE9...
    As I own a Computer company I am fairly computer literate but cannot find a plugin that allows this to work in Firefox.... but I would have expected it to work in the new Firefox :(
    All the best, Brett :)

    The longer this thread continues, the more ancillary comments you throw in that aren't directly pertinent to your problem with your DVR software not working with Firefox 4.0. Sorry, I don't intend to continue with this discussion.
    I do agree that ''something'' needs to be done better with regards to plugins for Firefox, but I do disagree with you as to whose responsibility that ''something'' is.

  • How to access streaming vedio from server using RMI

    Hello please provide me the solution
    i have one vedio file in remote system and i want to import it to my local system using RMI after that i have to control it like vedio player.This entire application should be developed in struts.
    please give me a basic idea how to approch and wht r the files i need to import and is there any classes available to control the remote streaming vedio.

    If you are using Struts then you are in a web environment. So there is no RMI for the client (browser), it is just HTTP.
    About streaming video take a look at JMF (Java Media Framework). And if you are over HTTP you can use something like this to embed your video streaming:
    <html>
    <body>
    <object width="320" height="63"
    classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
    ccclassid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
    standby="Cargando los componentes del Reproductor de Windows Media de Microsoft..."
    type="application/x-oleobject">
                <param name="filename" value="http://192.168.1.31:1025/01_Alegria.mp3">
                <param name="url" value="http://200.32.112.67/Estacion_del_Sol">
                <param name="AutoStart" value="true">
                <param name="volume" value="100">
                <param name="uiMode" value="mini">
                <embed type="application/x-mplayer2"
            pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
            width=218
            height=129> </embed>
            </object>
                <param name="url" value="http://200.59.146.10/rockandpop-ba">
    </body>
    </html>Hope it helps

  • Remote access to TC using Windows

    Hi,
    I have a macbook pro, a win 7 laptop and time capsule. I can access the storage portion of TC on both laptops when im home on the same wireless network but can't seem to access remotely using win 7 laptop (i can on mac using aft:\\).
    I've searched numerous forums with no luck. It doesn't quite seem like anyone's been able to achieve this (from whereever i've read)
    I've had the TC for abt two weeks and if it can't accomplish this task, i'm leaning toward returning it as i need remote access on both mac and win.
    Once again, in summary, all i'm looking to do is to remotely access the files (client files etc) in the TC's storage using Win 7 (through either SMB, VPN, or any other way that would get this done)
    I appreciate your help.

    How can my Time Capsule be accessed remotely via PC/Windows? What protocol? How?
    Windows or Linux PCs can access the Time Capsule's (TC) file service via the SMB protocol.
    The following is the basic steps to configure the TC's hard drive to be accessed from the Internet.
    Configuring the TC
    AirPort Utility > Select the TC
    o Note the value of the IP Address. This is the Public or WAN-side IP address of the TC. (Note: You will need to have either a static Public IP address, or use a free dynamic DNS service, like you suggested, in order to access the TC from the Internet.)
    Manual Setup > Internet > Internet Connection
    o Connection Sharing = Share a public IP address
    Manual Setup > Disks > Files Sharing tab
    o Enable file sharing (checked)
    o Secure Shared Disks = With base station password
    o AirPort Disks Guest Access = Not allowed
    o Share disks over Ethernet WAN port (checked)
    Manual Setup > AirPort > Base Station
    o Enter a Base Station Password and verify it in the Verify Password box.
    Manual Setup > Advanced > Port Mapping
    o Click the plus sign "+" to add a new port mapping.
    o In the Public UDP Port(s) and Public TCP Port(s) boxes, type in a 4-digit port number (e.g., 5688) that you choose.
    o In the Private IP Address box, type the internal IP address of your TC that you noted earlier.
    o In the Private UDP Port(s) and Private TCP Port(s) boxes, type 548, and then, click Continue.
    o In the Description box, type a descriptive name like "Time Capsule File Sharing," and then, click Done.
    o When you have made all the changes, click Update.
    Connect the PC to the TC from a remote location
    o Type in your DynDNS domain name, plus a colon and the port number you specified when configuring the TC earlier. For example,"www.myTC.com:5688"
    o You will be prompted for your user name and password. The user name can be anything you like; the password would be the TC's Base Station password you defined earlier.

  • PERFORMANCE while accessing remote database DB2 on AS/400 using WAS

    Subject: PERFORMANCE while accessing remote database
    We have IBMWebSphere Application Server Standard Edition 3.5.3 running on
    AS/400 iSeries Server (V4R5, test)and local DB2 Database.
    I am using AS/400 Developer Kit for Java JDBC Driver(type2, com.ibm.db2.jdbc.app.DB2Driver)
    to talk to local database. The performance was very good.
    When I try to access remote database (every thing same as local) which is on another AS/400
    machine of V4R4 (we use it for production, remote database) using IBM Toolbox for Java JDBC driver
    (com.ibm.as400.access.AS400JDBCDriver, type 4 driver), I can see 30to40%decrease in performance.
    Here we have WAS on previous V4R5 AS/400 machine.
    My questions are
    Is the performance decrease is due to
    1. the driver I am using? if it is Is there any other alternative drivers to access
    remote database to boost performance?
    2. the release difference of local(V4R5) and remote data base(V4R5)
    3. Currently most uses remote database while we do this testing. Is that the cause?
    or Is there any other cause or Drivers etc??? Suggestions and help is most welcome.
    Thank you.

    What about
    4. the data has to travel across the network.

Maybe you are looking for

  • What is diffrernce between key figures and characteristics?

    Hi all, I am a newbie to SAP BI....i am doing Masters in ERP(SAP)....I have confusion about what is basic difference between key figures and characteristics? Why do we have to define attributes in characteristics? If any one can refer me a thread tha

  • How can i get videos imported onto iTunes?

    I can get everything else to work except for the movie/videos on itunes.... when i try to add a file to the library it doesnt even pop a notification up or anything, nothing happens at all. so if anyone could help me i would REALLY appreciate it! Tha

  • Abap hr sites

    Hi, Can u please give me idea about baaphr (Technical) sites for presentation.Or any example sites plz Thanks &regards Ravi

  • Lightroom publish to hard drive - virtual AND master losing all development changes upon export

    LR 4.3, 59th reinstall (i lost count), standard HP pc setup, triple-core. workflow: i develop the master to the point where i want to diverge, then create a virtual copy, finish developing and publish to hard drive. Have done this a million times, bu

  • Set deletion flag in SLFN transaction type

    Hi, I need to configure in SLFN transaction type the user status to define the setting of the request for deletion (set deletion flag). I appreciate the help provided in advance. Best regards, Mayra Cobo.