How to make an executable program?

Capone

Senior member
Jan 28, 2004
371
0
0
I'm just now starting to get into programming. Last semester I had c++, and this semester I'm taking java and visual basic. In java I believe we'll be getting into object oriented programming in the next few weeks, but I'm just wondering now. How would I write a program that anyone could run? i.e a .exe file. can this be done in java? I remember last week when I reformatted that I had to dl the JVM just to run some pages in IE. I'm assuming that anyone with the JVM installed should be able to run a program coded in java correct? So far the only programming I have done has to be ran from the source code. (jbuilder etc.)

Also, what programming language are most basic small programs wrote in? Things like d2hackit, maphack, pindlebot and grabit for Diablo 2. (These were the popular ones when I played D2)
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Most recent thread about java EXEs in Software Forum: search is teh nifteh

Small programs: VB or VC++ mostly I'd guess. Most commerical apps are VC++, most corporate inhouse use apps are VB. .Net languages (especially C#) are being used for many new corporate inhouse projects.
 

EyeMWing

Banned
Jun 13, 2003
15,670
1
0
Java REQUIRES the JRE to be installed. There is no ".exe" file. This enables "true" cross-platform abilities. It also makes it a very ubersuck language.

 

MAME

Banned
Sep 19, 2003
9,281
1
0
Originally posted by: EyeMWing
Java REQUIRES the JRE to be installed. There is no ".exe" file. This enables "true" cross-platform abilities. It also makes it a very ubersuck language.

if it sucks, why is it popular?
 

Capone

Senior member
Jan 28, 2004
371
0
0
is java really considered a sucky language? I never really looked into it before this semester but the teacher swears up and down that java > .net. but I have no experience to compare her claims too. but the way she talks is that java is THE language to learn.
 

EyeMWing

Banned
Jun 13, 2003
15,670
1
0
It's popular because it's syntax is very similar to every other OOP language ever devised, and you can make it work on virtually any computer built since 1995, not to mention the inbuilt ability to seemlessly work with HTML (applets, beyawtch). This is the appeal. The drawbacks are: Absurd slowness, you have to work within the limitations given to you by the JRE, and you actually have to have the JRE. Does anyone remember Netscape 7? That was Java. That was teh WORST piece of software I've ever seen in my LIFE. It was simply far too slow and unstable. It's a great language for internal stuff, but it has never and will NEVER cut it for serious work and commercial releases.

It's also sickeningly simple to reverse engineer/decompile.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Java is pretty popular for linux / sunos server-side programming, but (thanks in part to microsoft meddling) it's never gained much traction for client application programming.

Actually for cross-platform client app programming Macromedia Flash is much more successful. Almost all of the web games people play for work breaks are Flash not java, and the latest Flash runtime is installed on a tremendously higher percentage of PCs than the (up-to=date) java VM. If they have anything, PCs typically have some microsoft JVM that's not compliant and years out of date.

Not that Flash is a very good general programming language compared to C++, java or even VB, it's just more practical for many uses since people already have the right runtime installed, or can download it seamlessly instead of jumping through Sun's awkward hoops.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: EyeMWing
It's popular because it's syntax is very similar to every other OOP language ever devised, and you can make it work on virtually any computer built since 1995, not to mention the inbuilt ability to seemlessly work with HTML (applets, beyawtch).

This is not built into the language obviously, but rather the runtime itself. A small point, but still worthy of note. There is nothing inherent in Java as a language that makes it seamless to work with HTML.

This is the appeal. The drawbacks are: Absurd slowness, you have to work within the limitations given to you by the JRE, and you actually have to have the JRE.

JNI? Granted, it's somewhat of an interoperability clutch, but it allows you to extend beyond the runtime.

Does anyone remember Netscape 7? That was Java. That was teh WORST piece of software I've ever seen in my LIFE. It was simply far too slow and unstable.

And this is the fault of Java? Don't allow yourself to commit such a hasty generalization based on one failing product.

It's a great language for internal stuff, but it has never and will NEVER cut it for serious work and commercial releases.

Do you consider running an enterprise serious work?

It's also sickeningly simple to reverse engineer/decompile.

Obfuscators; they ameliorate the problem to a sufficient level for most scenarios. If intellectual property is of primary concern, then you probably aren't using Java. This is another case of attacking an attribute that is quite obviously not associated with Java. Do I attack C++ because it doesn't have "applets"? Simply choose what is most appropriate.

[edit]Hosed my quotes[/edit]
 

RaynorWolfcastle

Diamond Member
Feb 8, 2001
8,968
16
81
FWIW, you can create a self-contained Java app (as long as the JRE supports everything you call for): it won't be an .exe though, it'll be a .jar file.
 

DJFuji

Diamond Member
Oct 18, 1999
3,643
1
76
I'm a programmer who's worked almost exclusively with microsoft development platforms (Visual Studio 6, ASP 2.0, ASP3.0, ASP.NET), though i've done a bit of java work for my computer science classes. My limited experience with java and with speaking with java programmers are that it's sort of like the linux vs windows debate, except with developet platforms. Some people swear on java, others swear on .NET. Personally, i still prefer .net, though that's probably because i've worked with it a LOT longer.

I've seen some corporate in-house programming shops use .net, and some use java. Though i'll admit that i've seen waaay more usage of .net or classic ASP. I'm sure that's partly due to the HUGE development community and microsoft's backing. For example, i've been to probably three or four free MSDN conferences/training seminars. Microsoft usually hosts one in my area at least once a year, and covers coding techniques, security implementation, and other important topics. They usually provide lunch or refreshments, a "goodie bag" and MSDN tshirt, and give away lots of free stuff. At the last one i went to in San Marcos, CA, they gave away SQL Server, a bunch of microsoft books, and even a PDA. They probably give away a few thousand dollars of gear at every event. By contrast, ive never even HEARD of Sun doing this with java. Granted that doesnt make java a better language, but it sure affects who uses the language. I have colleagues who can practically code entire apps with .NET and ASP using the MOUSE-- it's all copy and paste because there's such a huge development community and array of code samples out there.

Java and C# syntax are VERY similiar, so that's not really an issue. However, implementation seems a lot easier with C#/ASP.NET. Of course, we paid thousands of dollars for the IDE, so it had damn well better be easier. JBuilder 9 personal is a free download.

Java has the advantage of being platform-independent, but in a closed-environment like most corporations, that doesn't make a whole lot of difference. I like .NET/C# because i can code web apps without having to deal with java runtimes, applets, and all that other junk. As long as the server is properly configured, my clients dont know the difference. And i can use any .NET language i want and let the CLR (common language runtime) sort it all out. If someone codes an app with VB.NET, i can throw my C# code right in and not have to worry about converting things over. Try mixing VB and java together and see what happens.

Oh and swing is a POS.