“Cooper” Beta details

April 22, 2011 in Android, Cooper, MonoDevelop, Oxygene, RemObjects

Cooper is our new Object Pascal for Java compiler that integrates into Visual Studio and will integrate into MonoDevelop, soon. You may have seen the introduction preview from a while back. With the availability of the beta just announced, I added a new video of the preview in action running in Visual Studio. It provides a short overview of installing Cooper and running it in Visual Studio.

The prerequisites for running Cooper include:

  • Visual Studio or the Visual Studio Shell (you can download it from the Cooper beta page)
  • .NET SDK (comes with Visual Studio)
  • Java SDK / JDK

It will soon be integrated into MonoDevelop. The command-line compiler will run under the Mono Framework, too.

Visual Studio supports code completion with Cooper and the Java Runtime Environment. You can build right from Visual Studio, too, creating a Java jar file. One of the features that isn’t implemented yet is debugging or running the application from Visual Studio. There is a work around though. Set up an external tool pointing to the Java application launcher:

Run Java via External Tools

For the command, navigate to Java.exe which is in the bin directory under the JRE. For the arguments use -jar and the macros that point it to the jar file:

-jar $(BinDir)$(TargetName)$(TargetExt)

Then use the Output Window and set the initial directory to the location of the jar file with the $(BinDir) macro.

Also worth noting are the JAVA and DOTNET defines for use with the $IFDEF compiler directives.

More details on Cooper and our efforts on the Java platform will be coming soon. If you are interested in joining the beta, please send an email, or comment below.


2 responses to “Cooper” Beta details

  1. How about a more “rational” integration into Eclipse instead of VS/MonoDevelop ?

    I’m not aware of any other JVM language that use VS as an IDE As a “counter” example, even C# and Silverlight is supported in Soyatec’s Eclipse 4 Silvelight http://www.eclipse4sl.org.

    It might sound subjective, but to attract Java/Delphi developers interest into Cooper/Pascal better strip-out the MS tools dependency.

    • Good points, most of them are addressed in the podcast on Cooper, but I will do my best to summarize now based on my memory.

      The reason it is integrated into Visual Studio now is because we already have that framework in place. In the future, if there is demand, we may integrate it into Eclipse or some other IDE. Anything is possible. It would require we develop the hooks for that, but if there is demand then that could certainly happen.

      The .NET Dependency is because the compiler itself is written in Oxygene (Object Pascal for .NET). Once the compiler is finished then it could be used to recompile itself as a Java jar file. When that happens then it will no longer have any .NET dependencies. This would also make it easier to integrate into Eclipse or run on your microwave if there is demand for that.

      Appreciate your feedback. Let me know if you want to be on the beta and your feedback can continue to help influence the direction of Cooper.