"RemObjects Oxygene - Command Line Edition" questions

Are there any tutorials on how to use the command line version to create and compile a Oxygene java project that uses an external java library?

cheers,
Paul Nicholls

I am having a play around with the command line version till I can get an Oxygene IDE license issue sorted…so I tried compiling this example here (saved as Mandelbrot.pas):

unit Mandelbrot;

interface

type
ConsoleApp = class
public
class method Main(args: array of string);
end;

implementation

class method ConsoleApp.Main(args: array of string);
const
cols = 78;
lines = 30;
chars = " .,:;=|iI+hHOE#$-";
maxIter = Length(chars);
begin
var minRe := -2.0;
var maxRe := 1.0;
var minIm := -1.0;
var maxIm := 1.0;
var im := minIm;
while im <= maxIm do
begin
var re := minRe;
while re <= maxRe do
begin
var zr := re;
var zi := im;
var n: Integer := -1;
while n < maxIter-1 do
begin
Inc(n);
var a := zr * zr;
var b := zi * zi;
if a + b > 4.0 then
Break;
zi := 2 * zr * zi + im;
zr := a - b + re;
end;
system.out.print(chars.charAt(n));
re := re + ((maxRe - minRe) / cols);
end;
system.out.println;
im := im + ((maxIm - minIm) / lines)
end;
//Press ENTER to continue
//system.out.println(“Press ENTER to exit”);
system.in.read();
end;

end.
using the command line like so:
Oxygene.exe “Mandelbrot.pas” -rebuild
Pause

I got these errors:
C:\Users\paul.nicholls\Dropbox\Oxygene for java\projects\lwjgl\Mandelbrot.pas (4
3:7) [E46] Unknown identifier “system.out”
C:\Users\paul.nicholls\Dropbox\Oxygene for java\projects\lwjgl\Mandelbrot.pas (4
3:24) [E44] No member “charAt” on type “System.String”
C:\Users\paul.nicholls\Dropbox\Oxygene for java\projects\lwjgl\Mandelbrot.pas (4
6:5) [E46] Unknown identifier “system.out”
C:\Users\paul.nicholls\Dropbox\Oxygene for java\projects\lwjgl\Mandelbrot.pas (5
1:3) [E46] Unknown identifier “system.in”

Exiting with 1.

Any ideas?
cheers,
Paul

Hello Paul,

You want to use “ref” switch for referencing rt.jar file. For example I tried to recompile it with next line:

Cooper.exe “C:\CommandLine\Mandelbrot.pas” /ref:“C:\Program Files\Java\jre7\lib\rt.jar” /out:“C:\CommandLine\bin”

You can read more about line switches and requirements following next link:
http://wiki.oxygenelanguage.com/en/Oxygene.exe

Hope that helps.

Thanks viktoriad…I will have more of a fiddle :slight_smile: