Is this possible? I've never heard of this before...
|
Java
[WTF] java independent programs coded in java[/WTF] |
|
http://www.excelsior-usa.com/articles/java-to-exe.html
Seriously the first link I found in a google search. (Aug 27, 2011 12:00 AM)Beemo Wrote: http://www.excelsior-usa.com/articles/java-to-exe.html He means if he made a crypter in Java it would output an executable. Therefore giving it no Java dependency.
For some reason, this thread confuses the hell out of me. Is the OP saying that the .exe contains some Java code and somehow, the Java code can be run without having the JRE? Or is he asking how is it possible that a Java application can output a .exe file?
Also, why wouldn't a Java application be able to output a binary file? The .exe will have different data than a .jar will but as long as you can output that data, you can create an .exe file.
i think OP isnt talking about wrappers.
i think he means a Java application Producing an EXE. which is still a dumb question. i mean the java program can just write the exe file in byte code. - he says "For example java crypters make exe files which can be run without java" so hes asking why when a java crypter ( a crypter coded in Java) can produce a crypted .exe file without any Java dependencies (eg. Java JRE) Thats because the Java Program takes the original .exe (coded maybe in C++ or what have you) and only modifies that file to be undetected. The java program does not put any Java into the .exe file. (Aug 28, 2011 08:42 AM)Virux Wrote: Right. If it's encrypting another executable, it's just reading the byte stream of that file, modifying it as it exports the crypted version.This is correct (Aug 28, 2011 08:42 AM)Virux Wrote: A program coded in Java can be converted to an executable, many are. The JRE compiles the Java code to native, and runs it like an exe being 'javaw.exe'(I believe that's correct). So a Java-to-Exe converter would just capture that process.This is very incorrect First of all the JRE does not compile the Java code to native code. it Run the code inside a Virtual Machine (the JVM) There is no such thing as a Java-to-Exe converter. There are things called Wrappers as i referred to in my previous post. But Wrappers only take the .jar file and "Wrap" it inside an .exe The Java JRE dependencies are still there and its still a Java program. The difference is the .exe can check if you have Java installed on the client PC, if not. Install it. then Execute the Java Executable, this among a few other things is what Wrappers are mainly used for. But the fact remains you cannot convert a java program into .exe program magically and think it wont have any Java Dependencies. BECAUSE the JRE has all the libraries that the java program uses. thats why it is always essential that the JRE is installed when running a Program coded in java. /rant :)
@soul_ninja AOT compilers compile the Java byte-code into native-code so there are Java-to-Exe converters...
http://www.excelsior-usa.com/articles/java-to-exe.html http://www.excelsior-usa.com/articles/ja...e.html#aot //Or click here if you only want to read the AOT stuff. (Aug 28, 2011 08:02 PM)randomKID Wrote: @soul_ninja AOT compilers compile the Java byte-code into native-code so there are Java-to-Exe converters... i seem to have been disproven :) thanks for setting it straight. so i guess my post was not necessarily needed. Sorry Virux 😵
@Solarsonic
In reference to your first question, if, by native-code, you mean Java byte-code, then yes. Otherwise, native code should be executable already. I don't really understand your second question but I feel like I get the gist of it. The JVM essentially reads the Java byte-code and executes the equivalent native-code. If you simply convert the Java byte-code into native-code and store it in an executable, then you've removed the need for the JVM (which I think was your question).
Because Java is a "write once, run everywhere" language. You write it into an "international language" (java byte-code) and then you have a "translator" (jvm) for each country that can interpret that language and translate it into the native language (native-code or machine-code). This way, you don't have to write the same program for the Windows, Unix based, etc...
|
|
|
