Mantis - Cadmium
Erweiterte Problemanzeige
102 general schwerer Fehler immer 2012-07-27 20:00 2013-03-28 07:14
dobesv  
xclerc  
normal  
erledigt 1.4  
erledigt  
keine    
keine  
0000102: Reports OS as 'Unix' in Windows
In windows by default it will report the OS as 'Unix' even though it is running on a Windows environment.

This can cause some issues with path name calculations, among other things.
Problem-Historie
2012-07-27 20:00 dobesv Neues Problem
2012-07-27 20:14 dobesv Problemnotiz hinzugefügt: 0000250
2012-07-27 20:22 dobesv Problemnotiz hinzugefügt: 0000251
2013-03-28 07:14 xclerc Problemnotiz hinzugefügt: 0000275
2013-03-28 07:14 xclerc Status neu => erledigt
2013-03-28 07:14 xclerc Lösung offen => erledigt
2013-03-28 07:14 xclerc Bearbeitung durch => xclerc

Notiz
(0000250)
dobesv   
2012-07-27 20:14   
It appears that this is "as documented"

So, perhaps this should be considered a feature request to either:

1) Allow OS to be set easily at runtime

2) Detect the OS at runtime
(0000251)
dobesv   
2012-07-27 20:22   
The logic behind this is that if the resulting jar file is to be distributed, the runtime operating system may be different from the compile-time operating system.

In my case I am trying to load the cafesterolMain class from Java code. One possible solution would be to allow cafesterolMain to take more parameters in its mainWithReturn, perhaps allowing one to override the NativeParameters object rather than have that one always hard-coded into the generated class file.
(0000275)
xclerc   
2013-03-28 07:14   
The OCaml-Java runtime now reports the actual OS, unless the
value is overridden through parameter.

In addition, the environment variable "OCAMLJAVA_VERSION"
can be used in order to detect whether the classical OCaml
version or its OCaml-Java variant is running.