openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
http://www.porticoproject.org
151 stars 81 forks source link

Portico install is too old #296

Closed icemagno closed 4 years ago

icemagno commented 4 years ago

After download and install the windows 64 binaries I try to:

C:\Portico\examples\java\ieee1516e>windows compile
"compiling example federate"
C:\Portico\examples\java\ieee1516e>windows execute

but ...

ExampleFederate   : Creating RTIambassador
java.lang.IllegalArgumentException: hla.rti1516e.RtiFactory is not an ImageIO SPI class
        at java.desktop/javax.imageio.spi.ServiceRegistry.checkClassAllowed(ServiceRegistry.java:722)
        at java.desktop/javax.imageio.spi.ServiceRegistry.lookupProviders(ServiceRegistry.java:207)
        at hla.rti1516e.RtiFactoryFactory.getRtiFactory(RtiFactoryFactory.java:44)
        at ieee1516e.ExampleFederate.runFederate(ExampleFederate.java:184)
        at ieee1516e.ExampleFederate.main(ExampleFederate.java:560)
C:\Portico\examples\java\ieee1516e>

I think the Portico code is too old for the new java:


C:\Portico\examples\java\ieee1516e>java -version
openjdk version "12.0.2" 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+10)
OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

BTW, Hi Tim!

michaelrfraser commented 4 years ago

Hey @icemagno ,

Presently we're targetting Java v8 for portico. A possible fix is to modify the windows.bat file to use the jre shipped with the Portico distribution instead of the system JRE.

We'll try and get this done in the future, but for the moment you should just be able to just set the JAVA_HOME environment variable to %RTI_HOME%\jre and that will force the batch file to use the version of java distributed with portico.