Oxygene.exe switches for Java

The last version of the documentation in http://wiki.oxygenelanguage.com/en/Oxygene.exe is not in sync with the version of the compiler (5.2.37.1071). I’m looking to compile single *.pas files but I don’t know how to configure it.
I usually get the errors of type: [E26] Unknown namespace “java.util” in uses list

If I try to specify a platform: the warning is saying:
Switch ‘-platform’ is only allowed for compiling .oxygene project files.

How should I simply compile some *.pas (for Java) files without a project ?

Hmm … C’mon this should be really easy to answer :wink: … Any voluntaries ?

You have to give "-mode:java"
HTH

Doesn’t seam to work … can you provide a full command line to compile a simple .pas file to Java with Oxygene command line compiler ? Or can you point me to a Hello Word for Oxygene for Java using the command line compiler ?

NOTE: The switch you mentioned (-mode) is not specified at all either in doc/wiki nor in the Oxygene.exe -? output … is something missing here ? There are any other hidden switches ?

Here’s what I use/get:

D:\Projects\Ref\oxygene\tests\oxytests>oxygene -mode:java async.pas
RemObjects Oxygene for .NET - Version 5.2.37.1071
Copyright RemObjects Software 2003-2012. All rights reserved.

Object reference not set to an instance of an object.

… or if I try to specify a framework, and ref

D:\Projects\Ref\oxygene\tests\oxytests>oxygene -verbose -mode:java -ref:C:\JVM\jdk_7\jre\lib\rt.jar -frameworkfolder:C:\JVM\jdk_7 test.pas
RemObjects Oxygene for .NET - Version 5.2.37.1071
Copyright RemObjects Software 2003-2012. All rights reserved.

Framework is 2.0.50727.5456 (C:\Windows\Microsoft.NET\Framework\v2.0.50727).
Overriding Framework folder to C:\Windows\Microsoft.NET\Framework\v2.0.50727.

Output directory is D:\Projects\Ref\oxygene\tests\oxytests.
Output assembly name is test.

Yes RO hasn’t documented it :frowning:
Have a look at
http://www.andreas-flucke.homepage.t-online.de/AFDLite/download.html
and grab the commandline by yourself :slight_smile:
(Create an appropriate project and export it to batchfile)
BTW: frameworkfolder and codeflowanalysis doen’t seem to work any more :frowning:

Hello,

jaguard said: Object reference not set to an instance of an object.
Thank you for the report. I have logged an issue for further review (#58220).

I have also registered an issue to update wiki documentation on commandline compiler.

Best regards.

10x @viktoriad … wouldn’t be nice until the wiki will be updated to provide some hints/links/examples on how to use the commandline compiler for Java ?

10x @anflucke … your little ADFLite look nice and is very useful in this context. Good job ! … BTW what’s the difference between ADFLite2 and ADFLite4 ?

@anflucke In regard of the Oxygene IDEs (vs. commandline compilers), I just find out that even RemObjects is considering Eclipse as a nice to have Oxygene IDE :wink: as I also have suggested … So, according to http://wiki.oxygenelanguage.com/en/IDEEclipse support is coming in 2012 ! … So after Nougat is RemObjects preparing other cookies in their oven ?

Update: Look like the wiki was changed (see the change here) and Eclipse mention was dropped :frowning: … showing now that: Support for IDEs other than Visual Studio is under investigation and review for a future version.

BTW what's the difference between ADFLite2 and ADFLite4 ?

Runs on .Net2/3/3.5 or 4.0/4.5 respectively

@anflucke In regard of the Oxygene IDEs (vs. commandline compilers), I just find out that even RemObjects is considering Eclipse as a nice to have Oxygene IDE ;)
There once was a Monodevelop Integration too, but not for free :-O

Good to know … Just wondering, is it developed in a dog-fooding style , by using Oxygene for .NET ?

I consider Eclipse the best IDE to target by programming language authors (see the links here) since aside of being true x-plat it has a pluggable OSGi based architecture (I’m developing allot over it) that supports myriad of editors/languages, debuggers, tools … etc. It even supports C# and XAML (see Eclipse4SL) … so why not using something that is mature, x-plat, easily extensible and very well documented ?

Just wondering, is it developed in a dog-fooding style , by using Oxygene for .NET ?
Yes, since several years now, but starting with Delphi.Net

It seems you have to go back to build .1025 (May Release) to get a working commandline compiler for Android development

Yup … it look like that the last version of the commandline compiler (5.2.37.1071) is not working as expected so whatever I specify as arguments, I’ll get this message: Object reference not set to an instance of an object … Anyway, as mentioned by @viktoriad, this issue is reported under #58220

In case somebody is interested (after all these years): i’ve relaunched my litte tool under

1 Like