If the Java Virtual Machines don't always execute certain Java Byte Codes, how does a compiler to JVB for another language know that the generated code is run ?
There's an official specification for what and how a program that claims to be a JVM implementation should operate given Java bytecode. So someone writing a language that compiles to Java bytecode would typically either target the specification (and test on as many implementations as they felt necessary), or target a specific implementation like HotSpot and ignore the rest.
Which bytecodes do you mean? If you're talking about the jsr/ret thing they still have functionality but the compiler just doesn't generate those.