Skip to content

Releases: bytedeco/javacpp

JavaCPP 1.5.11

17 Nov 03:15
1.5.11
35adb21
Compare
Choose a tag to compare

November 16, 2024 version 1.5.11

  • Fix Generator flakiness caused by calls to Class.getDeclaredMethods() (pull #784)
  • Add minimal mappings for std::chrono from C++11 (pull #766)
  • Let Parser annotate Java constructors with @Deprecated when appropriate (pull #757)
  • Add to InfoMap.defaults more names that are reserved in Java, but not in C++ (pull #757)
  • Bundle libomp from Visual Studio to fix presets using OpenMP on Windows (pull #755)
  • Fix inconsistencies when using @Platform(inherit=..., library=...) together (pull #747)
  • Let Parser support templates with unnamed type parameters (pull #742)
  • Prevent Parser from producing duplicate declarations for basic containers (pull #741)

JavaCPP 1.5.10

29 Jan 02:13
1.5.10
2559658
Compare
Choose a tag to compare

January 29, 2024 version 1.5.10

  • Move native Loader methods to Helper class to avoid deadlocks (issue #737)
  • Fix Parser failing to pick up Info for constructors with template arguments (pull #739)
  • Fix MoveAdapter and UniquePtrAdapter causing double free on function calls (pull #738)
  • Fix Parser handling of template specialization and their friend declarations (pull #733)
  • Improve Parser capabilities for operator and function templates (pull #732)
  • Fix Parser failing on nested initializer lists and on attributes found inside enum declarations
  • Fix Parser for basic containers like std::optional<std::pair<int,int> > (issue #718)
  • Add support for std::basic_string basic container (issue bytedeco/javacpp-presets#1311)
  • Enhance Parser by adding downcast constructors for polymorphic classes (pull #700)
  • Let Generator pick up @Name annotations on allocate() as well (pull #700)
  • Fix Parser failing to place annotations on default constructors (pull #699)
  • Let Parser output reset() methods for basic containers like std::optional (pull #696)
  • Let Parser define front() and back() for one-dimensional basic containers (pull #695)
  • Let Parser map iterators of basic containers systematically (pull #694)
  • Fix Parser for function parameters contained in template arguments (pull #693)
  • Fix Parser on function pointer declarations starting with typedef struct (pull bytedeco/javacpp-presets#1361)

JavaCPP 1.5.9

05 Jun 13:42
1.5.9
d6b495f
Compare
Choose a tag to compare

June 6, 2023 version 1.5.9

  • Fix Loader.extractResource() for nested JAR files from Spring Boot (pull #685)
  • Have Parser desugar ... varargs to array [] for return types as well (pull #682)
  • Fix Parser failing on some friend functions for operator overloading (pull #681)
  • Fix Parser incorrectly casting const pointers to template arguments of pointer types (pull #677)
  • Fix Parser with Info.enumerate failing to translate enum values based on other enum values
  • Fix Parser prematurely expanding macros defined in class, struct or union (issue #674)
  • Add Info.upcast to support class hierarchies with virtual inheritance (pull #671)
  • Pick up @Adapter, @SharedPtr, etc annotations on allocate() as well (pull #668)
  • Provide @Virtual(subclasses=false) to prevent Generator from subclassing subclasses (pull #660)
  • Fix Loader.getPlatform() detection for linux-armhf with Temurin JDK (issue bytedeco/javacv#2001)
  • Fix Parser ignoring Info.skip for enumerators that do not get translated (issue bytedeco/javacpp-presets#1315)
  • Fix Parser error on C++17 style namespace declarations containing :: separators (issue #595)
  • Fix Parser observing Info.virtualize for non-virtual functions (pull #658)
  • Use regex in Parser to match more robustly templates and namespaces (pull #657)
  • Fix Builder default output path for class names with the same length (pull #654)
  • Add Info.friendly to have Parser map some friend functions to Java methods (pull #649)
  • Add Loader.loadProperties(boolean forceReload) to reset platform properties (issue deepjavalibrary/djl#2318)
  • Prevent TokenIndexer from recursively expanding macros
  • Fix Generator passing empty String objects on callback for arguments using adapters
  • Fix Parser failure on enum enumerators generated using the concat ## operator

JavaCPP 1.5.8

02 Nov 14:39
1.5.8
3b3bb3f
Compare
Choose a tag to compare

November 2, 2022 version 1.5.8

  • Add static long Pointer.getDirectBufferAddress(Buffer) method for convenience (pull #629)
  • Fix UniquePtrAdapter incorrectly deallocating pointers on callbacks (issue #613)
  • Fix Generator incorrectly casting @ByVal or @ByRef annotated FunctionPointer arguments (issue bytedeco/javacpp-presets#1244)
  • Fix Generator compiler errors for FunctionPointer with @UniquePtr arguments (issue #613)
  • Fix Generator compiler errors on Mac for Clang without Objective-C support (pull #610)
  • Prevent Parser from outputting cast methods for base classes that are Info.skip (pull #607)
  • Ensure Generator and Parser process header files from cinclude before include (issue #580)
  • Remove sun.misc.Unsafe config incompatible/unneeded with GraalVM Native Image 22.x (issue bytedeco/sample-projects#63)
  • Define default SHARED_PTR_NAMESPACE, UNIQUE_PTR_NAMESPACE, OPTIONAL_NAMESPACE to std on supported compilers (issue #577)
  • Let Generator treat long arguments and return values @ByVal or @ByRef with @Cast("...*") (issue #576)
  • Add BytePointer.getUnsigned() and putUnsigned() methods for convenience (pull #574)
  • Let Parser consider alignas as an explicit attribute to be ignored by default (issue bytedeco/javacpp-presets#1168)
  • Add "org.bytedeco.javacpp.findLibraries" system property to disable search for libraries (pull #565)
  • Fix Generator causing memory leaks for String parameters on callback (issue bytedeco/javacpp-presets#1141)
  • Add Loader.new/access/deleteGlobalRef() methods to store JNI Object references in Pointer (issue bytedeco/javacpp-presets#1141)
  • Make Loader.findLibrary() also search in "sun.boot.library.path" for jlink (pull #565)
  • Add __int8, __int16, __int32, and __int64 to InfoMap as "basic/types" to support combinations allowed by Visual Studio
  • Add "org.bytedeco.javacpp.cacheLibraries" system property to disable cache for libraries (pull bytedeco/gradle-javacpp#21)
  • Add public getters for the address fields of Pointer.NativeDeallocator (discussion bytedeco/javacpp-presets#1160)
  • Add support for std::function basic container instances with corresponding FunctionPointer (issue bytedeco/javacpp-presets#1051)
  • Fix Builder parsing of command line options for platform properties (issue #564)
  • Use thread local in Generator to detach automatically native threads on exit for Windows as well (pull #562)
  • Add compiler options for C++14 and C++17 to platform properties files for Visual Studio
  • Fix Parser incorrectly shortening type names for nested class template instances
  • Make Parser output boolean has_value() methods for basic containers like std::optional
  • Add OptionalAdapter and corresponding @Optional annotation for containers like std::optional
  • Switch to AttachCurrentThreadAsDaemon() when attaching native threads on callback (pull #561)
  • Add to InfoMap default pointer and value types for integer types in std:: namespace
  • Fix Android platform properties for NDK r23b

JavaCPP 1.5.7

10 Feb 03:50
1.5.7
e941401
Compare
Choose a tag to compare

February 11, 2022 version 1.5.7

  • Add Loader.clearCacheDir() along with new ClearMojo and -clear command line option
  • Speed up Loader on Windows when there are no symbolic links or library versions (pull #512)
  • Enhance Pointer.physicalBytes() by excluding shared pages from memory-mapped files, etc (issue #468)
  • Fix Parser not correctly encoding files of top-level classes produced with @Properties(target=..., global=...)
  • Add Pointer.interruptDeallocatorThread() method to make JavaCPP classes eligible for GC (discussion bytedeco/javacpp-presets#1115)
  • Let Parser output the content of Info.javaText in the case of FunctionPointer as well
  • Fix TokenIndexer failure on macros using the concat ## operator with empty arguments (issue #525)
  • Let Parser support arrays of anonymous struct or union containing another one (discussion #528)
  • Prevent Parser from outputting duplicate Pointer constructors for basic containers
  • Fix Generator compiler errors on callback functions returning objects without default constructors
  • Ensure Builder copies resources only from the first directories found in the paths
  • Add Loader.getCanonicalPath() to work around bugs in File.getCanonicalPath() on Windows (pull #519)
  • Add FunctionPointer and @Virtual methods missing from config files required by GraalVM Native Image
  • Let Tokenizer convert characters using ASCII escape sequences '\x...' to normal hexadecimal values 0x...
  • Fix Parser incorrectly mapping default function arguments containing multiple template arguments
  • Fix Parser failures on variadic templates calling sizeof...() and on variables initialized from template values
  • Prevent Parser from failing on nonexistent header files contained in @Platform(exclude=...)
  • Add classOrPackageNames parameter to CacheMojo (pull #510)

JavaCPP 1.5.6

02 Aug 22:44
1.5.6
28b468b
Compare
Choose a tag to compare

August 2, 2021 version 1.5.6

  • Add missing export to module-info.java file for presets package (pull #508)
  • Add @NoException(true) value to support overriding virtual noexcept functions
  • Bundle more DLLs from UCRT to fix the systems presets on Windows
  • Fix Pointer.sizeof() method for subclasses of subclasses for primitive types (issue bytedeco/javacpp-presets#1064)
  • Throw more accurate UnsatisfiedLinkError when Loader.load() fails to find JNI libraries
  • Let Parser check Info.skipDefaults also for types to ignore default constructors (issue #493)
  • Fix Parser failure on enum declarations without enumerators
  • Let Generator use the third element of @Cast(value) on return values passed to adapters (issue tensorflow/java#345)
  • Prevent Generator from swallowing exceptions caught on Buffer.array() (pull #504)
  • Add enum classes as well as resources missing from config files required by GraalVM Native Image
  • Let Parser annotate && parameters with new @ByRef(true) value used by Generator to call std::move()
  • Fix Parser overlooking anonymous class, struct or union with comments after } (issue #501)
  • Add Info.beanify to have Parser generate JavaBeans-style getters and setters (pull #495)
  • Allow Parser to use Info.javaNames for function names containing parameters as well (issue #492)
  • Fix Parser producing incorrect calls to function templates with non-type parameters (issue #491)
  • Add missing presets/package-info.java required for OSGi and add profile for M2Eclipse (pull #490)
  • Remove unnecessary mutex lock for pthreads on callbacks in Generator (pull #489)
  • Fix @AsUtf16 handling for setter methods paired with getters in Generator (pull #488)
  • Allow defining NO_JNI_DETACH_THREAD to avoid overhead from pthreads on callbacks (issue #486)
  • Pick up @Allocator, @CriticalRegion, @NoException in Generator from @Properties(inherit=classes) as well (issue #484)
  • Add support for Deleter of pointer types to UniquePtrAdapter
  • Add @Platform(pattern=...) annotation value to allow matching with regular expressions as well
  • Allow Parser to consider function pointers declared with using but without indirections
  • Let Parser map to annotations whole expressions starting with the __attribute__ keyword
  • Fix Parser sometimes failing to create template instances with default arguments (issue #478)
  • Enhance Parser to handle typedef correctly in the case of enum as well (issue #477)
  • Upon Pointer.getPointer(Class<P>) scale position, limit, and capacity with sizeof() (pull #476)
  • Fix Parser incorrectly translating non-documentation comments as part of documentation comments (issue #475)
  • Set Pointer.maxPhysicalBytes to 4 * Runtime.maxMemory() by default as workaround for Android, memory-mapped files, ZGC, etc (issue #468)
  • Ensure synchronized code in Pointer gets skipped with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#313)
  • Add protected Pointer.offsetAddress() and use it for getPointer() instead of position()
  • Fix potential infinite loop in Parser when processing class, struct, or union declarations
  • Have Parser wrap the erase() methods of basic containers with iterators to allow removing from maps
  • Let Parser output the content of Info.javaText in the case of basic containers as well
  • Fix Parser failure on arguments containing multiple array accesses ending with ]]
  • Fix Parser incorrectly considering some array definitions with expressions as multidimensional
  • Log loading errors of optional jnijavacpp as debug messages instead of warnings (issue tensorflow/java#189)
  • Fix memory leak in Pointer.releaseReference() with "org.bytedeco.javacpp.nopointergc" (issue awslabs/djl#690)
  • Fix Parser not stripping annotations from Info.pointerTypes when creating Java peer classes
  • Fix Parser not inheriting constructors with existing Info or with nested templates
  • Add support for std::tuple, std::optional, and std::variant basic containers and fix various Parser failures
  • Add parameter for Loader.load() to return path of a specific executable (pull #466)
  • Use std::uninitialized_copy in VectorAdapter to make sure copy constructors get called (pull #465)

JavaCPP 1.5.5

08 Mar 09:53
1.5.5
66738d6
Compare
Choose a tag to compare

March 8, 2021 version 1.5.5

  • Ensure System.gc() never gets called with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#208)
  • Add Info.immutable to disable generating setters for public data members (pull #461)
  • Map String to char* with Charset.forName(STRING_BYTES_CHARSET) when that macro is defined (pull #460)
  • Fix Loader.ClassProperties not always getting overridden correctly when defined multiple times
  • Allow Loader.load() to also rename executables on extraction to output filenames specified with the # character
  • Add @AsUtf16 annotation to map java.lang.String to unsigned short* (array of UTF-16 code units) (pull #442)
  • Add BasicStringAdapter and corresponding @StdBasicString, @StdU16String, and @StdU32String annotations (pull #448)
  • Fix Parser failures on try blocks as function body, nested class templates, and aliases to namespaces starting with ::
  • Prevent Loader from failing to find, load, or link libraries multiple times
  • Fix Pointer.getPointer() methods sometimes calling the wrong constructor (issue bytedeco/javacv#1556)
  • Prevent Android from trying to load PointerBufferPoolMXBean by using it via reflection (pull #447)
  • Fix Android build properties for NDK r22 and move legacy to android-*-gcc.properties (pull #444)
  • Add support for Mac on ARM processors
  • Fix Loader not searching for libraries in more than one package
  • Prevent Builder from linking with -framework JavaVM when a path to the JVM library is found
  • Replace requires with requires static in JPMS .platform module (pull #436)
  • Let Parser output Info.javaText even for template declarations with no instances
  • Prevent Tokenizer from using long literals for unsigned integers of 16 bits or less
  • Ensure Parser considers >= and <= as single tokens to prevent failures
  • Make Parser use Info.cppTypes to override the type of enum values
  • Fix Parser not using the correct Info.pointerTypes for const& declarations
  • Use pthreads in Generator to detach automatically native threads on exit for Linux and Mac as well
  • Let Loader.load() always succeed on optional libraries only available with extensions
  • Fix Builder.addProperty() incorrectly appending values together

JavaCPP 1.5.4

09 Sep 08:07
1.5.4
67e80e1
Compare
Choose a tag to compare

September 9, 2020 version 1.5.4

  • Fix Parser not producing PointerPointer parameters for FunctionPointer subclasses
  • Let Builder copy even those platform.executable files without prefix or suffix
  • Add missing declaration for GetCurrentThreadId() in Generator when NO_WINDOWS_H is defined
  • Process #undef directives to allow redefining macros with Parser (issue bytedeco/javacpp-presets#935)
  • Pick up in Parser methods specified with override, in addition to virtual (issue #419)
  • Let Parser create a separate Java peer class when Info.pointerTypes is different for types prefixed with const
  • Fix Generator for @Virtual methods protected in subclasses by casting to superclass (issue #419)
  • Add missing values to Info.Info(Info) and fix incorrect Info.skipDefaults(boolean) (issue #420)
  • Add PointerBufferPoolMXBean to track allocations and deallocations of Pointer (pull #413)
  • Change the @Platform(executable=... property to an array and allow bundling multiple files per class
  • Prevent Builder unnecessarily linking with -framework JavaVM to fix GraalVM Native Image on Mac (issue #417)
  • Add Pointer.getPointer() methods as shortcuts for new P(p).position(p.position + i) (issue #155)
  • Fix Generator for cases when a FunctionPointer returns another FunctionPointer
  • Fix Parser failure with auto keyword of C++11 used as placeholder type specifier or for trailing return type (issue #407)
  • Add Builder.configDirectory option to let Generator output files that GraalVM needs for AOT compilation (issue eclipse/deeplearning4j#7362)
  • Fix Parser error on template<> containing non-type parameters without names (issue bytedeco/javacpp-presets#889)
  • Bundle also the vcruntime140_1.dll and msvcp140_1.dll redist files from Visual Studio
  • Fix Builder for different "java.home" path returned by latest JDKs from Oracle (pull #400)
  • Refactor Builder a little to work around issues with Gradle
  • Log as warnings SecurityException thrown on Loader.getCacheDir() instead of swallowing them
  • Fix memory leak that occurs with "org.bytedeco.javacpp.nopointergc" (issue bytedeco/javacpp-presets#878)
  • Take into account platform.library.path when extracting executables and their libraries on Loader.load() (issue bytedeco/javacv#1410)
  • Move init code for Loader.getPlatform() to Detector to avoid warning messages (issue #393)
  • Add HyperslabIndex class with offsets, strides, counts, and blocks parameters (pull #392)
  • Add Index class to allow overriding how the index is calculated in Indexer (issue #391)

JavaCPP 1.5.3

14 Apr 09:43
1.5.3
be430d2
Compare
Choose a tag to compare

April 14, 2020 version 1.5.3

  • Deprecate but also fix Indexer.rows(), cols(), width(), height(), and channels() (pull #390)
  • Fix Parser producing invalid wrappers for basic containers like std::set<std::pair<...> >
  • Add compiler options for C++98, C++03, C++14, and C++17 to platform properties files (pull #389)
  • Remove default compiler options from linux-armhf.properties that work mostly only for Raspberry Pi
  • Add Generator support for enum classes with boolean values (issue #388)
  • Fix Parser outputting invalid Java code for enum of boolean, byte, and short types (issue #388)
  • Pick up in Generator the @Namespace annotation from paired method too for global getters and setters (issue #387)
  • Add presets for jnijavacpp and javacpp-platform artifact to fix issues at load time (issue bytedeco/javacv#1305)
  • Prevent potential NullPointerException in Loader.checkVersion() (pull #385)
  • Allow using Charset to avoid UnsupportedEncodingException from BytePointer (pull #384)
  • Add static Pointer.isNull(Pointer p) helper method, for convenience
  • Add MoveAdapter and corresponding @StdMove annotation to support objects that require std::move from C++11
  • Always use File.pathSeparator when passing multiple paths via the BUILD_PATH environment variable
  • Fix Parser not picking up Info for declarations with decltype() specifier
  • Fix Pointer losing its owner when mistakenly ignoring deallocators for const values returned from adapters
  • Remove unnecessary declared Exception from Indexer.close() signature (pull #382)
  • Make sure Parser recognizes base classes of struct as public by default
  • Fix Parser error on initializer lists containing C++11 style { ... } for template instances
  • Change the default mapping of jboolean to BooleanPointer instead of BoolPointer
  • Fix Parser error on function declarations with ... varargs as single parameter
  • Make Parser skip over &&-qualified functions automatically since they cannot be supported
  • Fix Parser annotating pointer cast operator methods with incorrect @Cast (issue #379)
  • Allow Parser to inherit constructors from template classes with using
  • Make Parser honor Info.skip for anonymous struct or union as well
  • Optimize Pointer.sizeof() method of subclasses for primitive types
  • Let users override Info.enumerate on a per-enum basis and allow attributes after enum class
  • Fix Parser not considering identifiers as type names when placed directly after friend or in template<>
  • Check for defined NO_WINDOWS_H macro in Generator to skip #include <windows.h>
  • Provide UIntIndexer and ULongIndexer, treating array and buffer data as unsigned 32- or 64-bit integers, for convenience (issue #376)
  • Fix Parser not evaluating using namespace with respect to the current block (issue #370)
  • Fix exception in Loader when running jlink image with JDK 13+ (pull #375)
  • Fix errors with @Virtual @Name("operator ...") in Generator by using Java names for C++ (issue #362)
  • Apply in Parser missing const to parameters of @Virtual functions using adapters
  • Use in Generator C++11 override keyword for @Virtual functions (pull #373)
  • Speed up Loader.load() by caching results returned from Loader.findLibrary() (issue #287)
  • Pick up Info correctly in Parser also for anonymous function pointers with const parameters
  • Make Parser apply Info.translate in the case of enumerators as well
  • Fix compiler failures in Builder with platform properties containing relative paths
  • Let Parser rename types using Info.javaNames in addition to valueTypes and pointerTypes (pull #367)
  • Include in the defaults of InfoMap mappings missing for the std::array and jchar types
  • Fix various Parser failures with attributes on constructors, empty macros, enum classes, friend classes, inherited constructors, and keywords in parameter names
  • Add to Parser support for C++11 attributes found within [[ and ]] brackets
  • Consider Pointer values maxBytes or maxPhysicalBytes suffixed with % as relative to Runtime.maxMemory() (pull #365)
  • Prevent Parser from considering constexpr operator declarations as const types
  • Fix on Loader.load() the default library name of classes without @Properties(target=..., global=...)
  • Prevent Parser from outputting asPointer() cast methods with multiple inheritance (issue #360)
  • Add CacheMojo to help extract binaries and resources used by command line tools outside of the JVM
  • Fix Android build properties for NDK r20b (pull #357)

JavaCPP 1.5.2

05 Nov 08:42
1.5.2
3ddea3e
Compare
Choose a tag to compare

November 5, 2019 version 1.5.2

  • Provide ByteIndexer with value getters and setters for unsigned byte or short, half, bfloat16, and boolean types as well
  • Introduce PointerScope.extend() to prevent deallocation on the next call to close()
  • Make Generator avoid ambiguous conversion errors from UniquePtrAdapter to std::unique_ptr (pull #353)
  • Fix Parser using fully qualified names for @Name annotations of nested classes (issue #352)
  • Add Parser support for macro expansion of __VA_ARGS__
  • Fix Builder not processing all classes when given .** as input (issue bytedeco/javacv#1311)
  • Introduce reference counting in Pointer and retrofit PointerScope to use it
  • Fix Parser incorrectly inheriting default constructors multiple times with using
  • Allow in Parser fully qualified names as Info.valueTypes for enumerators as well
  • Perform template substitution in Parser also for default argument values (pull #343)
  • Introduce PointerScope.forClasses to limit the Pointer classes that can be attached to a given instance
  • Add support for custom Allocator to VectorAdapter and custom Deleter to UniquePtrAdapter
  • Enable support for OSGi bundles (pull #332)

September 5, 2019 version 1.5.1-1

  • Use the native thread ID as name on AttachCurrentThread() (pull #339)
  • Make sure we canRead(), canWrite(), and canExecute() what Loader.getCacheDir() returns
  • Prevent Generator from copying data unnecessarily when returning Java arrays from adapters (issue #317)
  • Fix Parser issues when casting const pointers or enumerating anonymous enum declarations
  • Add Info.objectify to map global functions without using the static modifier, similarly to Scala companion objects
  • Allow once more abstract subclasses of FunctionPointer (issue #318)