Changes between Version 96 and Version 97 of j2p


Ignore:
Timestamp:
07/01/24 10:11:49 (10 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v96 v97  
    227227If you use the PyProgram translator, all non-java files are copied verbatim to the python program, to the same directory. Just make sure that if you have a separate resources directory, that you add that aswell to the list of root directories.
    228228
     229THe resource can be accessed like usual in java:
     230{{{
     231        final @NonNull InputStream stream = getClass()
     232                                .getResourceAsStream("yourresource.txt");
     233        ...stream.read()...
     234}}}
     235
     236
    229237== Overriding the translation
    230238Comments can contain python code to override the automatic code, if the block starts with {{{#PY}}}. This code replaces the entire object (if/case/while block; statement) that follows the comment.