Monday, September 08, 2008

I am a netbeans fan, so what...

Time ago I read some blogs about ftp support for php projects in netbeans. I was thinking... Why ftp only? Where's support for SFTP and other protocols? It should be great to have an abstract API for remote file systems and lot of implementations for other protocols. So I started to look into netbeans sources. I found remotefs project in contrib repository. I was thinking: "it's great to see this. Netbeans for PHP must use this". So I started implementation of SFTP protocol. When I was in half of my work I looked into sources of netbeans php modules.
And what I discover? It uses own implementation of FTP protocol. Hmmm, so what now???

Because my primary targer was php module, I didn't know why should I continue write this plug-in. So I decided to rewrite remotefs API and it's implementation to more abstract level because it looks like it's tightly coupled with FTP protocol implementation.

Now I am releasing first alpha quality release. Maybe this is good starting point for integration of this plug-in into existing netbeans features...

You can download it here.
If you are interested in sources are available via mercurial repository.

PS: These modules uses same namespace (package) as mentioned project remotefs in main/contrib. So don't install this modules when you already have it installed.



lamboap said...

nice. thanks for this!

Unknown said...

I saw your post, great.

Only one small but...

Did you know about:

This one supports all kinds of filesystemes and url.

hlavki said...

Hello Hilbert,

Thanks for info. I didn't know about commons-vfs. I'll definitely look at it... Anyway netbeans defines own API for abstract file system.

Anonymous said...

i tried to install THE plugin: i had several errors listed below; I just have a new "netbeans IDE Early access for PHP". Is something missing, or is it cause of my ubuntu 64 bits (8.04)?

Missing required modules for Plugin Remote FTP File System:
Swing Layout Extensions integration [module org.jdesktop.layout/1 > 1.6] Dialogs API [module org.openide.dialogs > 7.8] Explorer & Property Sheet API [module org.openide.explorer > 6.15] File System API [module org.openide.filesystems >] Module System API [module org.openide.modules > 7.7] Nodes API [module org.openide.nodes >] Settings Options API [module org.openide.options > 6.9] Utilities API [module org.openide.util >]
Missing required modules for Plugin Remote File System API:
File System API [module org.openide.filesystems >] Datasystems API [module org.openide.loaders > 7.2] Nodes API [module org.openide.nodes >] Utilities API [module org.openide.util >]
Missing required modules for Plugin Remote File System UI:
Swing Layout Extensions integration [module org.jdesktop.layout/1 > 1.6] UI Utilities API [module org.openide.awt >] Explorer & Property Sheet API [module org.openide.explorer > 6.15] File System API [module org.openide.filesystems >] Datasystems API [module org.openide.loaders > 7.2] Nodes API [module org.openide.nodes >] Utilities API [module org.openide.util >] Window System API [module > 6.24]
Missing required modules for Plugin Remote SFTP File System:
Swing Layout Extensions integration [module org.jdesktop.layout/1 > 1.6] Progress API [module org.netbeans.api.progress/1 >] Java Secure Channel integration [module org.netbeans.libs.jsch/1 > 1.7] UI Utilities API [module org.openide.awt >] Dialogs API [module org.openide.dialogs > 7.8] File System API [module org.openide.filesystems >] Datasystems API [module org.openide.loaders > 7.2] Nodes API [module org.openide.nodes >] Utilities API [module org.openide.util >]

hlavki said...

Hello Pascal,

try to download latest development build of Netbeans for php...

Anonymous said...

I have same problem as pascal under Vista 32 bit :(. I have newest NB for PHP from

hlavki said...

pascal & micz:

I downloaded latest netbeans php from

and install latest nbms from

and it works... try this setup and let me know if you have still this problem...

Anonymous said...

It's very useful this plugin but when I can not pug into Netbeans 6.1 because of missing required modules. I am using Windows XP

Any helps

blue.mio said...

cau pocuj nejako mi nefunguje ten tvoj plugin...mam Ubuntu 8.04, a skusal som plugin na NetBeansoch v. 6.5 Beta, 6.5M1,IDE Build 200810090201, IDE Build 200810080201. Naistalovat plugin sa mi podarilo len na poslednych 2. A pada mi to uz pri pokuse pripojit sa na FTP....
hlaska je takato:

org.netbeans.modules.remotefs.ftp.client.FTPException: 500 Illegal PORT command.
at org.netbeans.modules.remotefs.ftp.client.FTPClient.processSimpleCommand(
at org.netbeans.modules.remotefs.ftp.client.FTPClient.processSimpleCommand(
at org.netbeans.modules.remotefs.ftp.client.FTPClient.openDataActive(
at org.netbeans.modules.remotefs.ftp.client.FTPClient.openData(
at org.netbeans.modules.remotefs.ftp.client.FTPClient.list(
at org.netbeans.modules.remotefs.api.RemoteFile.getChildrenBlock(
at org.netbeans.modules.remotefs.api.RemoteFile.getChildren(
at org.netbeans.modules.remotefs.api.RemoteFile.getStringChildren(
at org.netbeans.modules.remotefs.api.RemoteFileSystem.children(
at org.openide.filesystems.DefaultAttributes.children(
at org.openide.filesystems.AbstractFileObject.list(
at org.openide.filesystems.AbstractFolder.getNewChildren(
at org.openide.filesystems.AbstractFolder.refreshFolder(
at org.openide.filesystems.AbstractFolder.refresh(
at org.openide.filesystems.AbstractFileObject.refresh(
at org.openide.filesystems.AbstractFileObject.refresh(
at org.openide.filesystems.AbstractFolder.refresh(
at org.openide.filesystems.FileObject.refresh(
at org.openide.filesystems.RefreshRequest.doLoop(
at org.openide.util.RequestProcessor$
[catch] at org.openide.util.RequestProcessor$

Anonymous said...

Hi !

This kind of idea seems to be in the air ...

Did you know about :

hexman said...

Hi there and thanks for the plugin.

However the plugin seems to be broken and unusable.

I am using Ubuntu Hardy 32 bit with Netbeans 6.5 RC1

* When I add a sftp connection, everything seems fine; however when I add a second sftp connection all sorts of problems start occurring.

1. All sftp connections are modified according to the last connection that I modify; I end up with something like
Secure FTP (menu)
sftp://login1@host1 (item)

both the connection parameters and the name get duplicated and overwritten no matter what.

2. If I close Netbeans and open it again, and I try a sftp connection, I am prompted again (everytime I close and open NB this happens) with a password prompt box DOES NOT HAVE a text field anymore. It's just the password prompt with OK and Cancel buttons at the bottom.

If I press the OK button at this time (without a text field to type anything into), I get the following error at the NB log:

at org.netbeans.modules.remotefs.sftp.client.SFTPLogInfo.promptPassword(
at com.jcraft.jsch.UserAuthPassword.start(
at com.jcraft.jsch.Session.connect(
at com.jcraft.jsch.Session.connect(
at org.netbeans.modules.remotefs.sftp.client.SFTPClient.connect(
at org.netbeans.modules.remotefs.api.RemoteFileSystem.setConnected(
at org.netbeans.modules.remotefs.api.RemoteFileSystem$
at org.openide.util.RequestProcessor$
[catch] at org.openide.util.RequestProcessor$

Not only that, but I have confirmed that the password has already been saved in the xml file (in ~/.netbeans/6.5rc1/config/RemoteFileSystems/), and I am still prompted for a password with a prompt box in which I cannot type anything into.

3. The ssh key in the "add connection" menu does not work and I am still prompted for a password. The ssh key info is not saved at all in the xml file under ~/.netbeans/6.5rc1/config/RemoteFileSystems/

4. I can change the parameters for each connection directly into the xml files. After closing and opening NB, it seems that the connections are there as I typed into the xml files. However when I try to "Go Online" I am prompted the same empty password prompt in which I cannot anything into.

Please help.

hexman said...

See my previous post.

Another thing that I just noticed is a line in the NB log when I start NB:

WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.remotefs.ftp uses org.openide.options which is deprecated: Use org.openide.util.NbPreferences instead.

That probably has something to do with all the problems but I wouldn't know.

Also, every single time that I close and open NB and I try to "Go Online" in one of the sftp connections, I am prompted first to the accept the RSA key fingerprint, regardless of accepting the key. This happens every single time I reload NB.

hexman said...

I *really* need sftp support on Netbeans, so I decided to try one more time to use your module on one connection and only one connection. I am also using the module right after it is installed and without restarting NB. See my previous posts.


Is there a reason that the sftp module spiders my entire remote directory?

So if I forget to add the path and leave "/" which is the default path, what is this thing gonna do? Spider the entire remote server? And what for?

The remote server is more than 10TB in size!

Dude; spidering = not good.

Besides, my remote working folder is 2GB in size... Why would I want to download the whole thing locally; or even wait for a remote 2GB transfer? Netbeans of course, becomes completely unusable while your app is spidering around.

So even if I only use one connection, and I use your module right after it is installed and without restarting NB, THE WHOLE THING IS USELESS.

Sorry dude, I know that you have good intentions, but that thing of a wanna-be module sucks ass big time.

hlavki said...

Hello haxman,

first of all it alpha quality...

second thing, there is no spidering... True is, that this plugin store directory structure in cache, but only visited subtree. And download files only when you click to edit file.

So you have to wait for better release.

hexman said...

Thanks for the reply.

Just a note than in big directory structures NB becomes unusable. By looking at the files that remotefs was caching I noticed that it was transversing through directories.

There may be something I am missing but I do not understand why go through all that trouble. You may want to take a look at a GNU ftp/sftp module/plugin that jEdit has.

One can open any file in any remote location without having to wait for a mammoth of a directory to be cached.

Ideally the whole thing should be as transparent as with working with local files. But that's not saying anything new.

The idea however is that the files are treated remotely and stay remotely.
Whatever needs to be brought in to the users' computer memory space is strictly temporary and disappears once the file is close, no? Just an idea.

Thanks anyways.

hlavki said...

hi hexman,

yes maybe you are right. As I mentioned time ago, this plugin is reborn of existing API from netbeans contrib repository which wasn't written by myself. Idea of caching was there before I started to work on it.

Problem is that i haven't lot of free time to fix all problems. I'll try to do something with that...

Maybe you can help... It's open-source... ;)

hexman said...

I wish I could help, but I am more of a PHP programmer than a Java programmer.

I may take a look at the code anyways.

If I come up with anything I'll let you know.


Anonymous said...


I downloaded the NetBeans 6.5 PHP, and installed your plugin without problems.

But when i added a connection to my site, it simply doesn't list the files or directories, even i updating, reloading, it doesn't works...

can u help me?

Anonymous said...

I installed this plugin a couple of weeks ago, and have enjoyed it very much until a couple of days ago, when it suddenly started acting weird.
I could copy an create new files, and it all seemed fine in NetBeans, but the change wasn't actually performed. Also if I created new files remotely, I couldn't get it to find the new files.
I deleted the ftp-connection, to start from a fresh, but now I'm not able to get a connection again.
It's a pity, because it really worked ok. :-/

Artem said...

FTP connection dialogue should have an option to choose the port!

Anonymous said...

hi hexman

i am a newbie in netbeans, so i have a very dumb trouble

i cant install this plugin((
i choose "Tools -> Plugins -> Downloaded -> Add Plugins" and try to choose the downloaded plugin (, but it's said that the plugin must be with *.nbm extension((

What i do wrong?(

Mike said...

Just unpack zip file and install all nbsmfiles from plugin view

Anonymous said...

Is this project actively mantained?

Anonymous said...

amazing stuff thanx :)


Unknown said...

Doesn't work on Win7 / netbeans for php.

billy.braga said...

olalonde, I run windows 7 pro, and have netbeans php running (with the remote filesystem plugin), so I don`t know whats the problem your running into.

Isn`t there an option to stop file caching ?

Anonymous said...

Super-Duper site! I am loving it!! Will come back again - taking you feeds also, Thanks.


Jordi Enguídanos said...

An error:

Martin said...

In NetBenas6.9/WinXP i tried to add an SFTP connection, but exception occured:
java.lang.IllegalArgumentException: Called DataObject.find on null
at org.openide.loaders.DataObject.find(
at org.openide.loaders.DataFolder.findFolder(
at org.netbeans.modules.remotefs.api.config.ConnectionPersistenceManager.create(
at org.netbeans.modules.remotefs.api.LogInfoList.add(
at org.netbeans.modules.remotefs.sftp.ui.NewSFTPSiteWizardAction.performAction(
at org.netbeans.modules.remotefs.sftp.SFTPFileSystemInfo.createConnection(
at org.netbeans.modules.remotefs.ui.nodes.RemoteFSNode$AddSiteAction.actionPerformed(

Can you help?

Zlati Pehlivanov said...

I'm with Vista 64x netbens 6.9 and i have same error as Martin

மதன் குமார் said...

I got this error, when connecting remote file : any one clarify my doubt..
java.lang.IllegalArgumentException: Called DataObject.find on null
at org.openide.loaders.DataObject.find(
at org.openide.loaders.DataFolder.findFolder(
at org.netbeans.modules.remotefs.api.config.ConnectionPersistenceManager.create(
at org.netbeans.modules.remotefs.api.LogInfoList.add(
at org.netbeans.modules.remotefs.ftp.ui.NewFTPSiteWizardAction.performAction(
at org.netbeans.modules.remotefs.ftp.FTPFileSystemInfo.createConnection(
at org.netbeans.modules.remotefs.ui.nodes.RemoteFSNode$AddSiteAction.actionPerformed(
at javax.swing.AbstractButton.fireActionPerformed(
at javax.swing.AbstractButton$Handler.actionPerformed(
at javax.swing.DefaultButtonModel.fireActionPerformed(
at javax.swing.DefaultButtonModel.setPressed(
at javax.swing.AbstractButton.doClick(
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(

blogvianney said...


i install plugin in netbeans 8 and it works fine. I would like to see hidden files on the remote server in ftp area. Please can you tell me if it is possible?

Best regards