2

Is it possible to set up a project for Raspberry pi in Netbeans on Linux? If ME SDK 8 is only available for windows, are Linux users forced to use windows? I've tried using Remote Deploy in Netbeans 8 but it complains "No Java ME Platform found" I don't need emulator, I just want to write/compile code and upload to Raspebrry from Linux desktop.

Has anyone seen any tutorials how to deploy application for Raspberry from Linux desktop?

Thanks

asked May 10, 2014 at 8:52
1
  • Your pi is a full computer, and anything you can run on your linux desktop you can probably run on the pi. Why do you want to use Java ME? You do have access to Java SE. Commented May 21, 2014 at 9:43

1 Answer 1

2

If you are using Maven (or Ant) you could add a goal to the deployment phase to copy a file via SCP to your Raspberry Pi. This is described in an example here. Run mvn package to compile your project and copy the output to your Pi in one command. There sould also be a Maven Plugin to use it from inside of Netbeans.

Add something like this to your pom.xml:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
 <id>server-copy</id>
 <goals>
 <goal>run</goal>
 </goals>
 <phase>package</phase>
 <configuration>
 <target>
 <echo message="Push to server/home/"/>
 <scp trust="yes"
 todir="user:password@server:/home/">
 <fileset dir="${basedir}/target">
 <include name="**/*.jar"/>
 </fileset>
 </scp>
 </target>
 </configuration>
</execution>
</executions>
<dependencies>
<dependency>
 <groupId>org.apache.ant</groupId>
 <artifactId>ant-jsch</artifactId>
 <version>1.8.2</version>
</dependency>
</dependencies>
</plugin>
answered May 21, 2014 at 9:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.