Sharing Files With Remote Build Hosts

See Also 

When you use a remote development host, the local and remote hosts both need to access the project files. This access can be accomplished through file sharing or securely copying the files. Before the IDE can use file sharing between the local and remote systems, the shared file system or folder must be set up and accessible to both systems. Remote files are accessed through SFTP or another file sharing mechanism available in the operating system the host is running, for example, Network File System (NFS), Samba, or WebDAV.

If file sharing is not possible, use Automatic Copying to copy the files to the server using Secure Shell (SSH) protocol. The files will be copied to a .netbeans/remote subdirectory located in your home user directory on the remote host.

To set up the remote host to use existing network file sharing:

  1. In the Services window, expand the C/C++ Build Hosts node.
  2. Right-click the server you want to change and choose Properties.
  3. In the Host Properties dialog box, select System-level File Sharing from the Access Project Files Via list
  4. Click OK.

When you use the System-level File Sharing option for making project files available for local and remote build hosts, you might need to provide path mapping information to help the IDE use the shared file system.

To set the path mapping for a remote host that uses file sharing:

  1. Select Tools > Options, and click the C/C++ category.
  2. Select the Build Tools tab.
  3. Click Edit next to the Build Host list.
  4. In the Build Hosts Manager dialog box, select the remote host that you have set up to use File Sharing.
  5. Click Path Mapper...
  6. Double-click the text entry line under Local Path, and type the full path to the shared directory as seen from the local machine. For example, if you are storing your project in a /export/home/user/NetBeansProjects directory on myserver, you might access that directory as /Volumes/NET/myserver/export/home/user/NetBeansProjects on a Mac client. You can click the button next to the path field to use a file browser to navigate to the directory if you prefer.
  7. Double-click the text entry line under Remote Path and type the full path to the shared directory as seen from the remote host. If you use /export/home/user/NetBeansProjects from the remote server, enter that path as the Remote Path.
  8. Click OK in the Edit Path's Map dialog, and click OK in the Build Host Manager dialog.
See also
  Overview of C/C++ Remote Development
Setting Up C/C++/Fortran Projects for Remote Development
Working on Remote Hosts Using the Toolbar
Configuring Build Tools
C/C++ Project Properties Dialog Box: Build

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.