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

  • 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. – Bex May 21 '14 at 9:43
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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.