Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can compile java aot into binary executable native to your platform. There's many options to do it.

You can do it with a fatjar so that all the dependencies are there. You have all the dependencies clearly stated and versioned (and they are referenced globally - so you don't need to remember where you downloaded that one library from or how to compile that weird dll).

Of course if you actually care about being able to run the code in 20 years - you're far better off leaving it as a fatjar instead of making it an executable.

I have java programs that I made 20 years ago when I was at university that still run on my modern linux machine.

I also wrote C++ programs back then and none of the executables work out of the box (even building one of them is a struggle because half the libraries I used were abandoned - RIP libparagui, some you can't even download from the internet anymore, and most that you can download - don't have versions working with the most recent libc).

That despite the fact I tried to make a static executable for linux when I compiled it back then. I just failed.

I spent a week like 10 years ago trying to make my master's thesis program run again. I basically had to port it to a different graphic library because of dependency hell.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: