Is there a GeoGebra java library to use in our own programs?

ariznaf shared this question 7 years ago

GeoGebra interface is great.

But sometimes you need to go beyong the simple interfaces you can develop using the program, and develop your own program.

It would be great to use the geometric and algebra motor of geogebra in our own programs.

You could test a model in GeoGebra, and then implement it in your own program, using the same motor, being sure that the results will be the same.

Is there a java geogebra library you could use in your own programs?

If not, are there plans to provide one as a separate product?

I know I could just go to the source, but it won't be easy to isolate the libraries of the base geometric functions from that of the interface or other parts.

Thank you

Comments (10)


Well ... GeoGebra is OpenSource, so you can use it.

May be look at this page:


Thank you that will be of great help.

I have taken a look and there is lot of information about how GeoGebra is programmed.

But it is a daunting task, to navigate over all the information and source code of the program.

There is lot of information and code that is oriented to creating the GUI of GeoGebra for several platforms.

It would be great to be able to download just the geometric/algebra engine to use it in our own java programs, with examples of how to use it.

Just like other libs like javaGeom, for example.

I think that a package of that kind would be of great interests for developers.

Perhaps the package could be sold for a fee to developers (with examples and documentation of how to use it).

Any way the links provided will be of great help, I will read it slowly. Thanks.


Thanks acron, but I am not talking of applets or distributing applets.

I am talking of using the GeoGebra engine in my own java programs, in order to represent internally geometric objects, detect intersections between line and things like that.

The program won't créate a GeoGebra applet, it will use its own format to save relevant information.

I will investigate how to do it and which of the classes in the source code are neede.



Perhaps this


Thank you for your help.

I have read about GeoGebraPanel.

It may help to begin with, but it is not exactly what I was lookin for.

I would like to Access internal data of geogegra elements, and make intersections between them, change their coordinates, etc.

I would like to be able to write things like:

GeoPunto p1= new GeoPunto(0.5,1.23);

GeoPunto p2= new GeoPunto(10.3,15.3);

GeoSegment s1= new GeoSegment(p1,p2);


Ge0Punto i1= s1.Intersect(s2);

out.writeline( i1.x());


Having the source code, it is of course posible to do that.

But it is not easy to separate (for a beginner) the interface code from the GeoElements and Geometric code.

I asume I will need all clases in kernel namespace and GeoElements

Thank you again


If you use Python you could run the program within GeoGebra 5 (beta) and have access to the usual standard Java libraries by importing. I used this when I made som programs to produce mathematical image art as described in: http://www.geogebrainstitut...


I don't use python currently.

And my idea is to change the user interface of GeoGebra to integrate it in a custom program.

It would be great not having to deal with geometry (areas, intersections of lines, etc) in my own programs and use a library instead of reinventing the wheel.

But examining and developing small python programs for using inside GeoGebra, will be a good starting and a good way to learn how the GeoElements classes are build, how to use them and which classes are needed.

Any way, I think that the team could distribute some independent libraries as java packages (kernel with geoelements, and another for graphics representations inside your own window) package them with some use examples in java programs and make some revenue from other developers (as me) which would like to have a good and robust geometry and algebra library for java, instead of building their own.

This is of course just a suggestion.


OH, sorry, I have hit send buttom witout notice.

Of course thank you very much for your help and advice.

Yor examples will be of great help.

I am quite new to GeoGebra, and it won't be easy to integrate it in my own programs.

But I'll keep trying to see if I can get it working in a small program in java.

I have to polish the GeoGebra model first, once I have it working as I want, I will try to develope it java and make some interface improvements.


Ariznaf, did you manage? Do you have a working demo? I'm trying to bind GeoGebra to a C# program and someone who knows what parts can be safely thrown out the window would be realy helpful. I could run the JavaScript version of GeoGebra under the hood, but I'm afraid this would be terribly slow. Thanks for help! :)

© 2021 International GeoGebra Institute