Re: Java code generation from sql




"Remi" <remi.roques@xxxxxxxxx> wrote in message news:1149751500.241078.171210@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am working on a simulator in Java. All the parameters of the
simulator are stored in a SQL databse (a priori). The idea would be to
generate java code (.java files) from this databse in order to compile
the simulator afterwards and have an application running without the
database (faster I think).
Do you have any idea about a tool doing that or how the create a java
code generation from a database (sql or not) ?

Have you considered using a bunch of println(); statements to emit a ..java file? E.g.

fileOut.println("public class Test() { System.out.println(\"Hello World!\"); }");

It's the most direct and simplest solution. If it's too simplistic for you, you might want to investigate JET templates from Eclipse.

- Oliver

.



Relevant Pages

  • Re: robot gui approach
    ... I wrote a robot simulator in Java. ... particularly the simulator task queue. ... This makes it a nice OO design, but harder to control from an animation ...
    (comp.lang.java.programmer)
  • Re: creating a simple digital logic circuit simulator
    ... Im in the process of writing a simple digital logic circuit simulator ... : design: making gates as classes, and if so, should I make ALL gates as ... to be C++ or Java since the OO discipline is a relatively recent ...
    (sci.electronics.cad)
  • Wie kann ich dem Garbage Collector auf die =?iso-8859-1?q?Spr=FCnge?= helfen?
    ... Im Rahmen meiner Bachelorarbeit benutze ich einen in Java programmierten ... also mir - nur noch die verschiedenen Peers implementiert werden. ... Um mal eine Zahl in den Raum zu stellen: Während einer Simulation von ca. ... Starten des Simulators mit java -Simulator. ...
    (de.comp.lang.java)
  • Re: Java code generation from sql
    ... I am working on a simulator in Java. ... simulator are stored in a SQL databse. ... database. ... a simulation "harness" that that uses interfaces for the parts of the ...
    (comp.lang.java.databases)
  • Java code generation from sql
    ... I am working on a simulator in Java. ... simulator are stored in a SQL databse. ... database. ...
    (comp.lang.java.databases)