🔒 Locked
[java] *.java to *.exe
Advertisement
Original Post
Hello. I"m working now on little project and I have a little problem. I must convert few "*.java" files into windows "*.exe" files. (I mean that after this conversion of java file I get .exe file that will run on any windows machine without JVM ). THANKS [Edited by - cpp_boy on February 12, 2005 3:34:32 PM]
*.java files are just the java source code, similar to *.c or *.cpp files in function. To turn them into a java application you're going to need a java compiler. Personally, I like the BlueJ IDE, but I know people who would rather use NetBeans, so look around for an IDE that suits you. Java is a cross platform language that runs off of a "virtual machine" on the platforms that support Java. Generally, you would embed Java into an HTML document and have a web browser start the Java application when the HTML page was opened. You could look into Java Web Start if you wanted to package a Java App that could launch itself.
Hope this helps.
Hope this helps.
Quote:
Original post by Foxostro
*.java files are just the java source code, similar to *.c or *.cpp files in function. To turn them into a java application you're going to need a java compiler. Personally, I like the BlueJ IDE, but I know people who would rather use NetBeans, so look around for an IDE that suits you. Java is a cross platform language that runs off of a "virtual machine" on the platforms that support Java. Generally, you would embed Java into an HTML document and have a web browser start the Java application when the HTML page was opened. You could look into Java Web Start if you wanted to package a Java App that could launch itself.
Hope this helps.
I want my java file to run on windows machine without any JVM. Just regular ".exe" file. I dont want to use J# compiler cos its crap.
So maybe there is some other method to compile java file into windows executable file .
There is Excelsior JET:
http://www.excelsior-usa.com/jet.html
,but it costs money.
Then there is the free gcj: http://gcc.gnu.org/java/
Both will probably have their issues. In particular if you use awt.
You could also include the jre with your application if you don't mind adding 15MB to it.
Or even better, stick with c++.
http://www.excelsior-usa.com/jet.html
,but it costs money.
Then there is the free gcj: http://gcc.gnu.org/java/
Both will probably have their issues. In particular if you use awt.
You could also include the jre with your application if you don't mind adding 15MB to it.
Or even better, stick with c++.
Using statical compilation kinda limits life of your application. Standard .jar files would jump in speed on multicores, and with new instrucitons sets, statically compiled ones would just be buggy and crawl. The only advantage would be if your user would expect exe because he didn't experience anything different, and you are unable to educate him a little.
Then wrapper, or link on desktop would do wonders.
Then wrapper, or link on desktop would do wonders.
Quote:
Original post by cpp_boy
Thanks a lot everybody.
I will try "Excelsior JET". If it's OK, maybe I"ll even purchase one.
excelsior JET still uses the wrapper exe method for anything involving a AWT or Swing. If these applications are just command line stuff, then you will be fine, it will compile to a straight exectuable. Otherwise, the user will still have to install a JVM.
Quote:all of those aren't as important as getting people to actually run your program.
Original post by H_o_p_s
There is a way in JSmooth to include the JVM/JRE within the application. The only problem with this is that it is 15mb bigger, and of course isn't cross platform, and doesn't get updated with new JVM updates...
From Sun's JRE 5.0 license:
Quote:
B. License to Distribute Software. Subject to the terms and
conditions of this Agreement and restrictions and
exceptions set forth in the Software README file,
including, but not limited to the Java Technology
Restrictions of these Supplemental Terms, Sun grants you a
non-exclusive, non-transferable, limited license without
fees to reproduce and distribute the Software, provided
that (i) you distribute the Software complete and
unmodified and only bundled as part of, and for the sole
purpose of running, your Programs, (ii) the Programs add
significant and primary functionality to the Software,
(iii) you do not distribute additional software intended to
replace any component(s) of the Software, (iv) you do not
remove or alter any proprietary legends or notices
contained in the Software, (v) you only distribute the
Software subject to a license agreement that protects Sun's
interests consistent with the terms contained in this
Agreement, and (vi) you agree to defend and indemnify Sun
and its licensors from and against any damages, costs,
liabilities, settlement amounts and/or expenses (including
attorneys' fees) incurred in connection with any claim,
lawsuit or action by any third party that arises or results
from the use or distribution of any and all Programs and/or
Software.
Quote:no it's not. it's a pain in the ass.
Original post by cpp_boy
THANkS. This was very helpful. And I must admit, that JAVA is real fun ;)
Quote:
Original post by capn_midnight Quote:no it's not. it's a pain in the ass.
Original post by cpp_boy
THANkS. This was very helpful. And I must admit, that JAVA is real fun ;)
someone didn't take a coruse in Java and get "Java is Great" drilled into their head by the instructor.
Java is great, for what its good for.
Quote:
Original post by Talroth Quote:
Original post by capn_midnight Quote:no it's not. it's a pain in the ass.
Original post by cpp_boy
THANkS. This was very helpful. And I must admit, that JAVA is real fun ;)
someone didn't take a coruse in Java and get "Java is Great" drilled into their head by the instructor.
Java is great, for what its good for.
Java's great if you're willing to do it Java's way. Sometime's it's a pain in the ass. It's elegant for complex projects.. but I keep expecting it to collapse in on itself like a dying star.
Quote:
Original post by capn_midnight Quote:no it's not. it's a pain in the ass.
Original post by cpp_boy
THANkS. This was very helpful. And I must admit, that JAVA is real fun ;)
It seems for this very reason I'm writting a new video codec in Java.
Naw you are trolling. I'm sometimes worried what school instructors will do with Java name. Stupid teacher, or wrongly designed lesson, and students would get: bad background, distaste for Java, or any form of programming, or they would get "is API for that then I'd do it" abilities. Luckily they are teaching C# as well. (So flood of students like this: The teacher asked us to write a program that would count all even numbers from 0 to n. How can I do it? Could you write a source code for me? Would hit other new languages as well.)
No, I program in Java all the time. In fact, it's almost exclusively. I'm considered by my professors to be a very good programmer and computer scientist. It's still a pain in the ass.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement