Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make a application file  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there
can you guys tel me how to make an application file in java to run in other machine which dosent have Java Software.
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. Java classes need the JVM to execute.

You can use the GCJ compiler (or some other compiler) to create native code -which would be executable on machines without a JVM-, but that won't be cross-platform any more.
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And of course gcj doesn't comply with the standard, so a LOT of code will not work with it (think Swing, AWT, multithreading, Collections API, etc. etc. etc.).
 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's also possible to bundle a JVM/JRE along with your application, which is perhaps good enough for your purposes. Can someone elucidate or give pointers that describe the easiest possible way of accomplishing this?
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe java web start
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!