Results 1 to 7 of 7

Thread: How to use Oxygene for Java Command Line?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    How to use Oxygene for Java Command Line?

    Hi all,
    I am having trouble using the Oxygene for Java Command Line to compile a very simple Java project:
    Code:
    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.
    I got the code from here:
    http://blog.blong.com/2011/06/projec...lbrot-set.html

    I did this:

    I saved the code to a "Mandelbrot.pas" file.
    I created a compile.bat script (compile.bat):
    Code:
    Oxygene.exe "Mandelbrot.pas" -rebuild
    Pause
    I then opened the Oxygene for Java command line dos prompt and navigated to the folder containing the project .pas and .bat files.



    Any ideas?
    cheers,
    Paul
    Last edited by paul_nicholls; 12-04-2012 at 03:26 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •