Skip to content
Find file History
Latest commit 7ecd2b4 May 15, 2016 @saudet saudet Release version 1.2
Failed to load latest commit information.
COPYING * Add presets for GSL 1.16 Jun 17, 2014 * Prevent creating text relocations for shared libraries on Android … Mar 15, 2016
gsl-2.1-android.patch * Upgrade presets for GSL 2.1 (issue bytedeco/javacpp#55) Dec 24, 2015
gsl-2.1-macosx.patch * Upgrade presets for GSL 2.1 (issue bytedeco/javacpp#55) Dec 24, 2015
pom.xml Release version 1.2 May 16, 2016

JavaCPP Presets for GSL


This directory contains the JavaCPP Presets module for:

Please refer to the parent file for more detailed information about the JavaCPP Presets.


Java API documentation is available here:

Sample Usage

Here is a simple example of GSL ported to Java from this C source file:

We can use Maven 3 to download and install automatically all the class files as well as the native binaries. To run this sample code, after creating the pom.xml and src/main/java/ source files below, simply execute on the command line:

 $ mvn compile exec:java

The pom.xml build file


The src/main/java/ source file

import org.bytedeco.javacpp.*;
import static org.bytedeco.javacpp.gsl.*;

public class Example {
    public static void main(String[] args) {
        double x = 5.0;
        double y = gsl_sf_bessel_J0(x);
        System.out.printf("J0(%g) = %.18e\n", x, y);
Something went wrong with that request. Please try again.