I am trying to rewrite some java code to Xtend however I am running into an issue. I would like to connect to a mysql database.
try {
Class.forName("com.mysql.jdbc.Driver");
}catch(Exception e){
}
The above snippet works in Java. However I am trying to learn Xtend and figure out how the Class.forName should be done in Extend. Xtend cannot seem to find the "Class" or method "forName"
The error message I get from Eclipse is "This expression is not allowed in this context as it does not cause any side effect.
Anybody know what I am doing wrong. What is the Xtend syntax for connecting to a database?