I'm a new user of Raspberry Pi.
Actually, I wanted to buy a Raspberry device when I've finished programming it's software, now I'd like to know that Is it possible? if so, would you provide a sufficient way to program my software on PC (Windows)?
I want to use Java as the programming language.

  • What operating system do you intend to use on the pi?
    – goldilocks
    Commented Jul 15, 2015 at 20:17
  • @goldilocks a linux-base one, like it's own OS, Raspbian. Commented Jul 15, 2015 at 20:59

2 Answers 2


It is possible, but you must take into account, that java is not completely platform independent.

There are lots of examples like linux user limits (ulimit -a shows them) for the amount of max open files, threads / processes, hardcoded filenames with \ (instead of / which works under windows and linux), different behaviour with TCP error handling (i.e. when pulling the RJ45 cable), ... which might cause your program to behave not like under windows.

But most Programs should run out of the box on a Raspberry pi host. In any case you should be able to debug remote your software on the pi from your windows host.

To transfer your binaries to your pi, you can use any sftp/scp client (like the free winSCP or filezilla client).

  • What is the best way to do such a thing in your idea? Commented Jul 17, 2015 at 6:57

Yes you can write your Java Program on a PC and transfer the compiled .jar to the Raspberry Pi and run it there.

I use maven to manage my Project like that. Add this to your pom.xml for automated transfer. You could also do this "by hand" via an usb-stick or winSCP for example. But this automates the copy on every build:


        <!-- this is used to package an executable .jar -->
                <finalName>executable_name</finalName> <!-- set the exported name Here -->
                        <mainClass>package.MainClass</mainClass> <!-- set Main class here -->
                    <id>make-assembly</id> <!-- this is used for inheritance merges -->
                    <phase>package</phase> <!-- bind to the packaging phase -->

        <!-- this is used to transfer the compiled .jar to the raspberry pi -->
                            <echo message="Push to server/home/pi/foldername" />
                            <!-- destination folder to copy into  user:password@ipaddress:/folder/pah -->
                            <scp trust="yes" todir="pi:[email protected]:/home/pi/foldername">
                                <fileset dir="${basedir}/target">
                                    <!-- name declared above in "finalName" -->
                                    <include name="executable_name.jar" />

Your Answer

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

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