Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited


Everything posted by mavr

  1. mavr

    WINAPI types and xFunction ???

    The general rule is to find out which C type represents given WINAPI type. It can be found either in MSDN or in standard headers (windef.h etc.). In particular, BOOL and all handles (HANDLE, HWND etc.) may be though of as usual 'int', so it is mapped to Java int. LPCTSTR is either CSTRING or UNICODESTRING, depending of whether 'UNICODE' symbol was defined when your module have been compiled. Regarding LPSAVECALLBACK: if the callback is supposed to be really invoked - you have to define it in Java (i.e. derive com.excelsior.xFunction.Callback class, see samples 7,8,9). Otherwise, it is safe to declare the type as "int*" and provide Pointer.NULL as argument.
  2. mavr

    Problem with unsigned char

    xFunction performs Java 16bit 'char' <-> C 8bit 'char' conversion automatically, so don't worry about it.
  3. mavr

    Problem with unsigned char

    Use 'char' instead of 'byte'. I.e.: class GX_EACHAMP extends Structure { char range; // Range information char sample; // Sampling frequency information char use; // Channel ON/OFF information short misc1; // Other information 1 short misc2; // Other information 2 short misc3; // Other information 3 double xpc; // Coefficient information (write only) public String defineLayout() { return "char range, char sample, char use, short misc1, short misc2, short misc3, double xpc"; } public GX_EACHAMP() {} }
  4. mavr

    sleep() resolution on Linux?

    It seems you have to write and use native functions (through JNI) those increase system timer's resolution (by invoking corresponding OS functions). For Windows, system timer resolution can be adjusted by TimeBeginPeriod/TimeEndPeriod functions. However, it seems you application is rather real-time. And Java is indeed a bad choice for real-time applications, for example, because of garbage collector pauses.
  5. mavr

    LPCSTR problem

    I suspect that you shall use CSTRING instead of UNICODESTRING. Also, return type in signature shall be 'int', not 'long'. And, finally, please make sure that Z4DLL_EXPORT_EX macro defines __stdcall functions (if you're using Windows version)
  6. mavr

    Enduser system requirement

    There are several options when you deploy your applications using JetPackII: you can choose either to include the 'private' JRE into the package or to use one already installed on the end-user PC. The latter option is less convenient, as the exact matching of JRE microversion is required. Moreover, for some applications (no AWT/Swing and some other restrictions) JET Pro can create executables that do not need JRE at all (so called JRE-less mode). Please refer to JET Home Page for more detailed information.
  7. mavr

    Application Server

    Yes, you can use JET to compile your Swing-based EJB client. We have tested some Swing-based fat clients that connect to remote EJB on J2EE server. So, your application should work as well. When you set up the project for Excelsior JET, on the "Options" page set the following: - class absence results in: "dynamic compilation" - caching JITed classes: "enabled to default directory" As for the webstart, the answer is as follows: With Excelsior JET you convert your application into conventional native executable. Then, using the JetPackII utility (included into JET distribution) you create conventional self-extracting installation package that contains your application and all necessary auxiliary files, it can show the splash screen and license at the moment of installation, create the Start Menu shortcuts etc, so there is no need for webstart then.
  8. As far as I can understand, LPCTSTR is just a C string, so it shall be mapped to CSTRING but not to CSTRING*. See sample9 for example of strings as fields in structures.
  9. Please contact our Support Dept.
  10. Yes, if you have 'JIT' option enabled.
  11. mavr

    Operating Systems Supported

    Some years ago it worked. But from that time we have not tested it thoroughly. So, the work is not guaranteed.
  12. mavr

    Operating Systems Supported

    Windows NT, 2000, XP, or 98. I know that there are customers using JET with Windows 2003 Server, but we have not tested it ourselves.
  13. mavr

    ClassCastException and IOException / Java NIO

    This forum is not intended for formal technical support. Please contact our Support Dept., I'm sure the guys will help you. BTW, where do you read about the problems with 'static'? It is interesting for me, because there are no (and never were) such problems with JET.
  14. This is improbable, as the demand is rather low. However, you can order our services to create it if you wish
  15. Try perofrom trial run once more. Do all usual scenarios in that run (this is needed to force all 'dynamic' classes to load). If won't help, try manually add 'xsec' component.
  16. mavr

    Java 1.5 RC

    There is no decision yet about support of 1.5 in JET 3.6. It depends on when 1.5 final actually will be out. Surely, later versions of JET will support 1.5.
  17. mavr

    Java 1.5 RC

    Currently we have no plans to support 1.5 RC in JET 3.6
  18. Please contact our Support Dept. Another thing you can try is testing your app with latest JET 3.6 Eval, maybe the problem is already fixed.
  19. Make sure that you performed Trial Run in JetPackII
  20. mavr

    bitfiedls representation in definelayout()?

    xFunction does not support bitfields. They could be emulated with whole fields. For example, you can define your typedef as a structure with one unsigned filed and use bit manipulation to extract/set bit fields.
  21. mavr

    Passing data structure

    Yes, you can use char array, but the size of the array shall include the gap due to C alignment. For example, in C structure {char a; int b; short c}, if you want to change 'int b' to array of chars, then you must use char[7] instead of char[4]. If the field is defined as "char*" in C structure, it is a String in Java, but it must be zero-terminated (otherwise there is no way for xFunction code to automatically determine its size). If it is 'char[..]', then it shall be represented as array of chars of the same size in Java. In structures one shall use 'short' Java type, as the size is required to be the same. To keep the whole ushort range one may write the trivial converter of the resulting Java short to int. In parameters of functions you may use 'int', as the size of parameters are always rounded up to 4.
  22. mavr

    Fail to Understand Jet.

    Near the truth . More precisely, apps compiled by Standard Edition will always require JRE existence for work (JRE contains not only Java code, but also implementations of native methods used by that code). Professional Edition allows to make apps independent of JRE (for some kind of apps, e.g. application shall not use AWT/Swing).
  23. We're working on the problem. Please wait a little more.
  24. mavr

    Fail to Understand Jet.

    Have you read JET Feature Matrix carefully? No, your understanding is incorrect. All editions compile java into native code. Standard and Personal main limitations are 1) absence of JIT compiler - if your app tries to dynamically load the calss that was not precompiled, it would fail. 2) some powerful optimizations are turned off Personal edition also can be used only for speeding up applications on your pc only. You can't use compiled applications on other machines. No limitations, only the banner. But, after 60 days all compiled apps will expire as well as jet.