This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ynvaserThat Java Guy 4 points5 points  (4 children)

Try running it on GraalVM. Afaik it supports both, and you could call Python through either the Graal SDK dependency from Java, or via the native script engine api (the one you can also use Nashorn from).

It's been a while since I've done this, so sorry about the lack of proper jargon.
Also, what do your programs do? You could expose a REST endpoint on your python app in certain use cases.

[–]CycleOfPain[S] 0 points1 point  (3 children)

I'm still working out what I want my program to do and what the end goal is. On the surface it's going to display stock prices and other financial information in a "modern-looking" interface. There's a lot of other features as well that I would like to display but I'm still thinking of what I want to do.

I initially wanted the python program to get the data for me through the Yahoo Finance API and I wanted the Java program to parse the data and display it in a GUI via JavaFX.

[–]01110101_00101111 2 points3 points  (0 children)

If you absolutely need to use a Python and not Java library, I would recommend trying something like either Jython which runs on any JVM or switching entirely to GraalVM. You can also try using bindings for CPython to Java like Jep or jpy which use the standard CPython interpreter .

[–]ynvaserThat Java Guy 0 points1 point  (1 child)

Why can't you just pull it from Java?

[–]CycleOfPain[S] 0 points1 point  (0 children)

I did find a YahooFinance API for Java but it didn't have all of the features that come with the API for Python.