AIInterface:Java

From Spring
Revision as of 17:08, 8 October 2008 by Hoijui (talk | contribs) (New page: {{AIInterface|Java|hoijui|v0.1 (spring SVN)|Java|pre alpha|GNU GPL v2+}} === Forum threads === *[http://spring.clan-sy.com/phpbb/viewtopic.php?f=15&t=12308 Java AI Interface for Spring] *...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Java
Developer
hoijui
Version
v0.1 (spring SVN)
Language Support
Java
Status
pre alpha
License
GNU GPL v2+
<- Back to AI Interfaces

Forum threads

Description

!NO CODE AVAILABLE YET!

This AI interface is written in C and allows spring to load AIs written in Java. These AIs consist of a .jar file, which contains at least one class that implements the interface (see {spring_source}/AI/Interfaces/Java/AI.java).

The source of this AI interface library can be found here: {spring_source}/AI/Interfaces/Java/

For reference only: JAI (DEPRECATED)

Currently supported AIs

Download

!NO CODE AVAILABLE YET!

It will come with spring (SVN version).

Known Crashes

  • None

How to compile

C part:

  • include directories: {spring_source}/rts/System {spring_source}/AI/Interfaces/Java
  • source files: {spring_source}/AI/Interfaces/C/*.cpp
  • create dynamic loadable shared library (module)
  • should compile with all C++ compilers

Java part: TODO

How to install/use

Additional software you need to have installed to be able to use Java AIs:

from source at {spring_source}/AI/Interfaces/Java/ :

  • copy libJava-0.1.so, libJava-0.1.dylib or libJava-0.1.dll to {spring_data_dir}/AI/Interfaces/impls/
  • copy InterfaceInfo.lua to {spring_data_dir}/AI/Interfaces/data/Java-0.1/

Make sure your Env-Vars are set like this (replace absolute paths):

On Windows:
SET JAVA_HOME=C:/Program Files/Java/jre1.6.0_05
SET PATH=%JAVA_HOME%/bin;%JAVA_HOME%/bin/client;%PATH%

On Linux:
export JAVA_HOME=/usr/jre1.6.0_05
export PATH=$JAVA_HOME/bin:$JAVA_HOME/bin/client:$PATH

<- Back to AI page