• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can you create normal programs/exe's in Java?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey I've been googling for this but didnt get a straight answer. I thought I read it somewhere but I'm not sure.

So, I am just wondering if Java can be used to create "normal", installable applications with .exe files and stuff.... You see, I am taking a Java class at college but all we do is make applets for web pages which doesn't even seem like a worth while thing to learn since I literally NEVER come across them on the internet... probably because people need to have the JRE installed before they can use the applet, and if they dont, they wont bother wasting their time.

Anyway, I used to want to learn C# to build some applications I had ideas for... but I read that Java is more safe and powerful, plus I am already learning it.. so would I still be able to do the same things in Java?

I'm also kind of confused where to start.. I installed NetBeans but have had some trouble actually using it... so I am sticking with Notepad++ which is what I use for my applets for my class, and then compile them with javac.exe

Thanks for your help. Also please maybe suggest a good book or links for me to check out... I am more interested in program/applications than just web applets.
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, you can write programs in java. You won't (well, you normally don't) end up with an .exe, but .class files. once you have those, you can drop them on any machine that has a JVM, and run them.

Check out our bunkhouse page for links to books. a popular one for beginners is "Head First Java", by Bates and Sierra.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave Fletcher wrote:So, I am just wondering if Java can be used to create "normal", installable applications with .exe files and stuff.... You see, I am taking a Java class at college but all we do is make applets for web pages which doesn't even seem like a worth while thing to learn since I literally NEVER come across them on the internet... probably because people need to have the JRE installed before they can use the applet, and if they dont, they wont bother wasting their time.


You're right about applets, they are kind of a niche market in Java. If your class is focusing on applets then it's probably an out-of-date program; check the copyright date in your text to see how old it is. A lot of commercial Java programming is aimed at web applications -- those are the web sites that let you rent cars and book airline tickets and so on -- rather than at consumer applications.

Anyway, I used to want to learn C# to build some applications I had ideas for... but I read that Java is more safe and powerful, plus I am already learning it.. so would I still be able to do the same things in Java?



Yes, C# and Java are pretty much equivalent in power. And don't forget, if you want to distribute a C# application then your clients would have to have the .Net runtime installed before they could use it. Of course the installer would take care of this, but likewise Java installers take care of getting a JRE installed.
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java can definitely be used to write all kinds of applications, not just applets. (I dispute that you never come across applets on the Internet, but they are definitely less popular than we used to think they would be.) As Fred pointed out, Java programs compile into .class files, which contain Java byte code. These classes can then be run on any computer that has a compatible Java Virtual Machine (JVM). You can also group .class files into a .jar archive and treat that as your program.

It's worth noting that Dot Net is not any different in this respect. Although Dot Net applications compile into .exe files, that's just a name. In fact they contain Dot Net byte code, and so are fundamentally different from Windows native executables. You need to have the Dot Net framework installed on your Windows computer to make them work, just like you need a JVM to make Java applications work. There is also an open-source implementation of Dot Net called Mono, which means Dot Net executables are portable to other operating systems (at least in theory).
 
reply
    Bookmark Topic Watch Topic
  • New Topic