This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In netbeans it's possible to define a remote java se. (ex. raspberry pi) After that in file: remote-platform-impl.xml are specified these properties and targets: PROPERTY: <property name="remote.java.executable" value="${remote.platform.home.dir}/bin/java"/> TARGETS: - '-copy-to-remote-platform' - 'runwithkey' In both targets there is an sshexec tag for executing the project on remote host: <sshexec host="${remote.platform.host}" port="${remote.platform.port}" username="${remote.platform.user}" password="${remote.platform.password}" trust="true" usepty="true" command="cd '${remote.project.dir}'; '${remote.java.executable}' @{additionaljvmargs} -Dfile.encoding=${runtime.encoding} ${run.jvmargs} ${run.jvmargs.ide} -jar ${remote.dist.jar} ${application.args}"/> The problem comes if you would like to use some libraries which need admin rights. (ex. sudo java -cp pi4j-core.jar) So the idea/feature would be to be able to specify a prefix command: (in the example below it's the SUDO command) <sshexec host="${remote.platform.host}" port="${remote.platform.port}" username="${remote.platform.user}" password="${remote.platform.password}" trust="true" usepty="true" command="cd '${remote.project.dir}'; SUDO '${remote.java.executable}' @{additionaljvmargs} -Dfile.encoding=${runtime.encoding} ${run.jvmargs} ${run.jvmargs.ide} -jar ${remote.dist.jar} ${application.args}"/>
Yes, makes sense. However to late for NB 8.0 which is already feature frozen.
Fixed jet-main 7e9149c22d06. Added "Exec Prefix" into the Platform properties where you can add sudo, see attached screenshot. Also you need to add your account to /etc/sudoers on the Pi to prevent sudo from asking for password, something like this: tzezula ALL=(ALL) NOPASSWD: ALL
Created attachment 147928 [details] Screenshot
Integrated into 'main-silver', will be available in build *201407090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7e9149c22d06 User: Tomas Zezula <tzezula@netbeans.org> Log: #240981:Allowing a command "prefix" before 'remote.java.executable'