Apparently you can convert jar files with java bytecode into .Net assemblies. I did not know that.
Here is the link: IKVM.Net
java
Connect to SQL Server from Java
try { Class.forName("net.sourceforge.jtds.jdbc.Driver"); Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433/test", "username", "password"); System.out.println("connected"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }
Spring Roo: public static void main(String[] arg)
Project created with Spring Roo can be run from the command line:
public static void main(String[] arg){ ApplicationContext appContext = new ClassPathXmlApplicationContext("classpath*:META-INF/spring/applicationContext*.xml"); // your code to follow }