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

In .NET we have a very similar tool for creating such packed binaries, dotnet-warp. I used it in one of my projects and quite liked it, since it's also quite easy to cross compile (cross-pack?) for the 3 major operating systems.

I like the general idea, your independent of the system wide framework version and it still has this "one-click" install procedure (dropping the binary in your path). However, I guess this is also the negativ Part. Users don't expect that a single binary extracts itself to somewhere --> uninstalling the binary leaves traces on the system.

Definitely looking forward to try it out for elixir, wondering how fast the erlang/elixir startup really is.



Single-file, platform-specific executables, framework independence and dependency trimming are all available in .NET Core 3.0:

https://www.hanselman.com/blog/MakingATinyNETCore30EntirelyS...

https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotne...


Complete n00b question -- you can do that?

The last time I touched anything .NET was about a decade ago. My somewhat old-school superiors were unimpressed with the ability to come up with a plain .exe at the end of the process. My lack of familiarity with how Visual Studio had evolved certainly played into it; the IDE made me feel like a chimp dropped into an airliner cockpit. I had the worst time trying to figure out how to turn off the "of course you have an enterprise server dedicated to delivering upgrades!" setting. None of it seemed to, uh, scale down for our piddly purposes.


.NET Core is a ground-up rewrite of the frameworks and tools. It's completely decoupled from Visual Studio. This would get you started on a toy project (one source file, one project file) now:

    dotnet new console --output sample1
    dotnet publish --self-contained -r linux-x64 sample1
https://docs.microsoft.com/en-us/dotnet/core/get-started


Is there anything like this in Java?

I am aware of launch4j, but curious if there is a single step approach for all 3 platforms.


Yes, since Java 9: it is called "jlink" and it's shipped with the OpenJDK. It assumes you have modularized jars.

An alternative is the GraalVM, which can compile the code as a C++ binary or a shared application, using LLVM as backend. If you work with Webservices (especially JavaEE), you might also want to have a look at Quarkus, which also uses GraalVM to create single binary executables


jlink/jpackage just isn't the same as the other things. It doesn't produce a single executable like .Net core or Bakeware which embed the vm into the binary. In .Net's case it self extracts on first run.

With jlink/jpackage you either ship an installer or a zip file.


From the page: ~0.5s startup times or better on our computers


The lack of single binary output will be fixed in dotnet 5.




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

Search: