home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / WDESAMPL.BIN / jre.h < prev    next >
C/C++ Source or Header  |  1997-11-24  |  3KB  |  72 lines

  1. /*
  2.  * @(#)jre.h    1.7 97/05/19 David Connelly
  3.  *
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  *
  6.  * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
  7.  * modify and redistribute this software in source and binary code form,
  8.  * provided that i) this copyright notice and license appear on all copies of
  9.  * the software; and ii) Licensee does not utilize the software in a manner
  10.  * which is disparaging to Sun.
  11.  *
  12.  * This software is provided "AS IS," without a warranty of any kind. ALL
  13.  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
  14.  * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
  15.  * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
  16.  * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
  17.  * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
  18.  * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
  19.  * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
  20.  * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
  21.  * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
  22.  * POSSIBILITY OF SUCH DAMAGES.
  23.  *
  24.  * This software is not designed or intended for use in on-line control of
  25.  * aircraft, air traffic, aircraft navigation or aircraft communications; or in
  26.  * the design, construction, operation or maintenance of any nuclear
  27.  * facility. Licensee represents and warrants that it will not use or
  28.  * redistribute the Software for such purposes.
  29.  */
  30.  
  31. /*
  32.  * Portable JRE support functions.
  33.  */
  34.  
  35. #include <stdio.h>
  36. #include <stdlib.h>
  37. #include <jni.h>
  38.  
  39. #include "jre_md.h"
  40.  
  41. /*
  42.  * Java runtime settings.
  43.  */
  44. typedef struct JRESettings {
  45.     char *javaHome;        /* Java home directory */
  46.     char *runtimeLib;        /* Runtime shared library or DLL */
  47.     char *classPath;        /* Default class path */
  48.     char *compiler;        /* Just-in-time (JIT) compiler */
  49.     char *majorVersion;        /* Major version of runtime */
  50.     char *minorVersion;        /* Minor version of runtime */
  51.     char *microVersion;        /* Micro version of runtime */
  52. } JRESettings;
  53.  
  54. /*
  55.  * JRE functions.
  56.  */
  57. void *JRE_LoadLibrary(const char *path);
  58. void  JRE_UnloadLibrary(void *handle);
  59. jint JRE_GetDefaultJavaVMInitArgs(void *handle, void *vmargsp);
  60. jint JRE_CreateJavaVM(void *handle, JavaVM **vmp, JNIEnv **envp,
  61.               void *vmargsp);
  62. jint JRE_GetCurrentSettings(JRESettings *set);
  63. jint JRE_GetSettings(JRESettings *set, const char *ver);
  64. jint JRE_GetDefaultSettings(JRESettings *set);
  65. jint JRE_ParseVersion(const char *version,
  66.               char **majorp, char **minorp, char **microp);
  67. char *JRE_MakeVersion(const char *major, const char *minor, const char *micro);
  68. void *JRE_Malloc(size_t size);
  69. void JRE_FatalError(JNIEnv *env, const char *msg);
  70. char *JRE_GetDefaultRuntimeLib(const char *dir);
  71. char *JRE_GetDefaultClassPath(const char *dir);
  72.