Is this really possible?

Try to write code that will work as JavaScript under Node.js AND as Java code AND as C# code also. The same file should output the string "test" when run via:
1) node Task3.java
2) javac Task3.java && java Task3
3) dotnet run Task3.java

I am really stuck at this question and cant find the answer how to do please help me... I want to sleep at nights