Arduino basic question java etc

I purchased an Arduino controller. I'm just wondering about some question, if I'm allowed to ask those kind of basic question, since this is a open source community. Open Source doesn't only mean open source, it also means connection with really cool, and awesome guys who helps where they can.

To program my Arduino controller, I have to use C / C++?

Is it possible to code for Arduino controller, in Java?

I do know the two languages are kinda same to Java, but I'm more familiar and happy coding in Java.

Does an emulator/simulator exist?

Thank you very much, for taking the time to answer my basic questions.

To program my Arduino controller, I have to use C / C++?

Yes.

Is it possible to code for Arduino controller, in Java?

No.

Does an emulator/simulator exist?

Several, none worth a damn.

On my Mac I use Xcode to write little command line c apps to test code before I use it on the arduino. It's saves time compiling and uploading all the time.

To program my Arduino controller, I have to use C / C++?

The Arduino "environment" supports a (subset) of C++, so to be doing "Arduino programming" you need to be using that. However, your "controller" is just minimal support circuitry for a small AVR microcontroller chip, so you can (in theory) program it in other languages that have been implemented on that chip. Assembly Language, Forth, and BASIC have all had some discussion here.

Is it possible to code for Arduino controller, in Java?

Java, however, is much too large to fit on a microcontroller the size of the one used on most Arduino boards, so it's not one of the choices.

On the bright side, the "subset of C++" used in Arduino looks pretty similar to the subset of Java that would be useful in such a small environment (assuming that the Java Runtime were of zero length, and the cpu just executed java bytecodes directly, or something.) So Arduino "sketches" shouldn't look TOO foreign to a Java programmer.

If you know java or you want to use java. You can use a java library like Ardulink to connect a PC where runs your java code to an arduino board where runs a sketch that receive messages.
I'm the Ardulink's creator so, of course, I like it. But you can take a look here www.ardulink.org

One of the real handicaps in using Java, however, is the absence of pointers. Using pointers in C is pretty fundamental in using a lot of the code that lives in the Arduino libraries.

mistergreen:
On my Mac I use Xcode to write little command line c apps to test code before I use it on the arduino. It's saves time compiling and uploading all the time.

In my experience Arduino programs are mostly concerned with reading and writing from/to pins so an environment like Xcode is not really appropriate I would have thought.

In any case by expanding the Arduino BareMinimum example sketch to add such things as Serial.begin() then a new skelton Arduino sketch is only a couple of clicks (File/New) (or Ctrl/N) away. Compiling and uploading takes very little time and the program is run in the actual Arduino environment. With several instances of the IDE open you can write and test small portions of code in one instance before copy/pasting it into a larger program.

UKHeliBob:
In my experience Arduino programs are mostly concerned with reading and writing from/to pins so an environment like Xcode is not really appropriate I would have thought.

In my experience, I code a lot with parsing char arrays, move, creating, deleting memory. I assume pins will work fine so I don't touch anything pin related. I write arduino libraries with Xcode.

When I need to test out my arduino I run it. The majority of the debugging had already happened. As we all know, debugging with the arduino & the ide is not fun.

Our requirements are obviously different. Nothing wrong with that, of course, but moving, creating, deleting memory is better tested in the real environment I would have thought. For instance, I am sure that you wouldn't do it, but float anArray[30][30][30]; would be problematical on most Arduinos but may work in Xcode.

debugging with the arduino & the ide is not fun.

Agreed in Spades !

UKHeliBob:
Our requirements are obviously different. Nothing wrong with that, of course, but moving, creating, deleting memory is better tested in the real environment I would have thought. For instance, I am sure that you wouldn't do it, but float anArray[30][30][30]; would be problematical on most Arduinos but may work in Xcode.Agreed in Spades !

Yeah, memory issues is always in mind. Xcode is great because of the code hinting. It'll tell me my mistakes before I even run it. I'm not an expert in C.

The Arduino Uno has about 1000 times too little RAM / ROM to run Java of any kind.

There is a massive gulf between the world of the low power microcontroller and a full-blown
CPU.