Communication b/w Java Monkey Engine and Arduino

PaulS:

No, but the servo that I wrote in the Java program is. I forgot to mention that it's superfluous because the angle is determined completely by the Java program, so changing it in the Arduino doesn't make sense. Also, my physical servo is 180 degrees.

Shouldn't the model (in Java) match the real world?

Right. So that's why I originally said that the line in the Arduino code isn't needed.

PaulS:

I'm not sending relative values, the Java program sends the value of the virtual servo's angle.

In your original post, you said you were.

My bad. I meant to say that the value of the servo is sent after being manipulated by the FSR.

PaulS:

The writestream in Java can only send integers, so I multiply it by 100 and cast it to an int to save the last couple of decimal points, then divide it by 100 on the Arduino side to return it to a float.

Why? The Servo.write() function takes integer input.

But it also takes float input, which is more precise.

This is the code that I'm using now.

   Serial.println(servoval);
   input = ""; //declared in higher scope
   while(Serial.available()){
   input += (char)Serial.read();
   }
    char carray[input.length() + 1]; //determine size of the array
    input.toCharArray(carray, sizeof(carray)); //put input an array
    servoval = atoi(carray)/100; //convert the array into an Integer
   myservo.write(servoval);

It seems to be having the same problem though. I also don't think that redeclaring carray each time is very efficient, but I'm not sure how to do it otherwise.
Once again, thanks. I really appreciate this.