mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 15:27:16 -06:00
NativeLibrary: in development environment, load native library from 'src' folder
This commit is contained in:
@@ -116,7 +116,11 @@ public class NativeLibrary
|
|||||||
try {
|
try {
|
||||||
// for development environment
|
// for development environment
|
||||||
if( "file".equals( libraryUrl.getProtocol() ) ) {
|
if( "file".equals( libraryUrl.getProtocol() ) ) {
|
||||||
File libraryFile = new File( libraryUrl.getPath() );
|
String binPath = libraryUrl.getPath();
|
||||||
|
String srcPath = binPath.replace( "flatlaf-core/bin/main/", "flatlaf-core/src/main/resources/" );
|
||||||
|
File libraryFile = new File( srcPath ); // use from 'src' folder if available
|
||||||
|
if( !libraryFile.isFile() )
|
||||||
|
libraryFile = new File( binPath ); // use from 'bin' or 'output' folder if available
|
||||||
if( libraryFile.isFile() ) {
|
if( libraryFile.isFile() ) {
|
||||||
// load library without copying
|
// load library without copying
|
||||||
System.load( libraryFile.getCanonicalPath() );
|
System.load( libraryFile.getCanonicalPath() );
|
||||||
|
|||||||
Reference in New Issue
Block a user