Quantcast
Channel: How to convert a .java or a .jar file into a Linux executable file ( without a .jar extension, which means it's not a .jar file ) - Stack Overflow
Browsing all 6 articles
Browse latest View live

Answer by czheo for How to convert a .java or a .jar file into a Linux...

Another simple trick to convert a jar to a Linux executable is just putting a shebang before the jar file.Say we have a hello.jar file.$ java -jar hello.jarhello world!You can create an executable in...

View Article



Answer by Dyorgio for How to convert a .java or a .jar file into a Linux...

Let's say that you have a runnable jar named helloworld.jarCopy the Bash script below to a file named stub.sh#!/bin/shMYSELF=`which "$0" 2>/dev/null`[ $? -gt 0 -a -f "$0" ] &&...

View Article

Answer by hiew1 for How to convert a .java or a .jar file into a Linux...

I found a solution, which is exactly what I want after hours of searching and trying. It is to use the gcj command in linux. It works like gcc for C and g++ for C++ which compile C or C++ programs into...

View Article

Answer by Bram for How to convert a .java or a .jar file into a Linux...

What you can do is make a tiny little C-program, that calls the one of the exec functions (see man 3 exec) to the "java" binary, passing "-jar", "xxx.jar" as arguments, see also Forking a new process...

View Article

How to convert a .java or a .jar file into a Linux executable file ( without...

I have been searching for many similar posts about this but I still can't find my answer. I want to convert a .java program into a Linux executable file, without the .jar extension. How can I do it? I...

View Article


Answer by Fahad Israr for How to convert a .java or a .jar file into a Linux...

A little late to the Party but I'd like to suggest GraalVM. It's very easy to use and generates binaries quickly. Learn more: https://www.graalvm.org/It is already being used by a lot of tech giants...

View Article
Browsing all 6 articles
Browse latest View live




Latest Images