Best Java .exe Creator?

I was just wondering if there is a "best" .exe creator for Java applications, or what your favourite .exe creator is.
[124 byte] By [Alex1989a] at [2007-11-26 16:27:44]
# 1
> I was just wondering if there is a "best" .exe> creator for Java applications,Sure. You just need to define what "best" is.> or what your favourite .exe creator is.I don't use one.
CeciNEstPasUnProgrammeura at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 2

My recommendation is not to use one at all. There are cases when one might want to use one, but chances are this isn't one of those cases. This question seems to be asked a lot by people who come to Java from other languages (especially when using Windows...) and seem to think that EVERY program has to end up as an .exe file.

paulcwa at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 3
java is platform independent, .exe is not
G_Abubakra at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 4
Just wondering - what would be a good, platform independant way of packaging a java application so that somebody with a non-technical background could use it with ease?
Drossa at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 5

> Just wondering - what would be a good, platform

> independant way of packaging a java application so

> that somebody with a non-technical background could

> use it with ease?

An "executable" JAR file. With the main-class attribute set and JAR files being associated with javaw.exe in Windows (which the Java installer does nowadays IIRC), a double-click is all that's necessary to run a JAR.

Or Webstart, which also uses JARs though.

CeciNEstPasUnProgrammeura at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 6

> java is platform independent, .exe is not

Just because you distribute a Java application as a native executable for a certain platform doesn't change the platform independence of the Java application. It's still perfectly platform independent.

Or do you actually believe that generating a native executable will somehow contaminate the Java application with germs so it's no longer platform independent?

CeciNEstPasUnProgrammeura at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 7

> > java is platform independent, .exe is not

>

> Just because you distribute a Java application as a

> native executable for a certain platform doesn't

> change the platform independence of the Java

> application. It's still perfectly platform

> independent.

What? I don't get it?

kajbja at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 8

> > java is platform independent, .exe is not

>

> Just because you distribute a Java application as a

> native executable for a certain platform doesn't

> change the platform independence of the Java

> application. It's still perfectly platform

> independent.

So you can pick that .exe up and run it on a Unix machine? Or a Mac?

Are you really this stupid? Or do you love starting pointless arguments so much that you're willing to risk the little credibility you have?

> Or do you actually believe that generating a native

> executable will somehow contaminate the Java

> application with germs so it's no longer platform

> independent?

Good god, UJ, go back to writing C++ and abusing people in that camp. What a tired, useless act you've become. You have nothing good to contribute here.

%

duffymoa at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 9

> Just because you distribute a Java application as a

> native executable for a certain platform doesn't

> change the platform independence of the Java

> application. It's still perfectly platform

> independent.

But the deployed package isn't distributable. You'd have to recompile.

CeciNEstPasUnProgrammeura at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 10

> Good god, UJ, go back to writing C++ and abusing

> people in that camp. What a tired, useless act

> you've become. You have nothing good to contribute

> here.

>

> %

Don't say that. Someone has to yell "the emperor has no clothes" the next time you try to show off as The Great OO Designer.

CeciNEstPasUnProgrammeura at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 11

> Don't say that. Someone has to yell "the emperor has

> no clothes" the next time you try to show off as The

> Great OO Designer.

Plenty of people are ready for that post. You'll need to apply for that position.

You, on the other hand, have offered nothing of value here for years except for your pompous diatribes about object-oriented purity. As if you'd recognize it if it bit you in the ***.

%

duffymoa at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 12

> Don't say that. Someone has to yell "the emperor has

> no clothes" the next time you try to show off as The

> Great OO Designer.

Besides, what have you offered as an alternative? I'd be happy to learn from any code that you'd post. Just remember that this is a Java forum, not C or C++. Posting Lisp examples isn't very helpful.

%

duffymoa at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 13
> Just wondering - what would be a good, platform> independant way of packaging a java application so> that somebody with a non-technical background could> use it with ease?Java Web Start or a Java aware installer (Install Anywhere for example).
mlka at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 14

> > Don't say that. Someone has to yell "the emperor has

> > no clothes" the next time you try to show off as The

> > Great OO Designer.

>

> Besides, what have you offered as an alternative?

> I'd be happy to learn from any code that you'd post.

> Just remember that this is a Java forum, not C or

> C++. Posting Lisp examples isn't very helpful.

I think you are lashing out in all directions. When did I post code here in other languages than Java? I might have done it but I can't recall a single time.

I post all kinds of what I find good solutions. In this thread for example I tried to discuss how you can minimize the evils of class inheritance,

http://forum.java.sun.com/thread.jspa?threadID=5128674&messageID=9460373#9460373

mlka at 2007-7-8 22:51:58 > top of Java-index,Java Essentials,Java Programming...
# 15

since JAVA is platform independent, hence no need to search for an exe file, it runs on JAR extension. only one exe file needed while running on Windows environment is java.exe. if u really need to create an exe file, it is priorly to create an installer for a windows based system not containing JRE. the motto is to bundle the JRE with your application, as it is done with netscape.

for this purpose there are various IDE available on the net ie. ECLIPS.

srivastava@univa at 2007-7-21 16:45:47 > top of Java-index,Java Essentials,Java Programming...
# 16

> I think you are lashing out in all directions. When

> did I post code here in other languages than Java? I

> might have done it but I can't recall a single time.

See reply #15, dumb @ss:

http://forum.java.sun.com/thread.jspa?threadID=5130495&start=10&tstart=0

> I post all kinds of what I find good solutions. In

> this thread for example I tried to discuss how you

> can minimize the evils of class inheritance,

>

> http://forum.java.sun.com/thread.jspa?threadID=5128674

> &messageID=9460373#9460373

Good solutions? All I see there are the typical pompous junk that you love to pass off as real knowledge.

%

duffymoa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 17

Re: the platform independence of .exe files:

There are different levels of platform independence here. One is the C/C++ level, in which code can be recompiled for different target platformss, with (hopefully, although seldom in practice) no changes to the source.

Then you have the level that Java bytecode provides, in which the object code itself can be deployed on mulitple target platforms.

This latter level of platform independence is important, because it can greatly simplify deployment. It's not trivial or non-existent. I'll say that again with more emphasis: deployment issues are not trivial.

But sadly, when people discuss compiling Java to .exe files (i.e., a single target platform to the exclusion of other target platforms), certain annoying, willfully dim people like to make two flawed arguments against it.

The first flawed argument is to ignore this latter level of platform independence. Such as:

> Just because you distribute a Java application as a native executable for a certain

> platform doesn't change the platform independence of the Java application.

> It's still perfectly platform independent.

This is a flawed argument as described above. Yes, the Java source code is still platform independent in the limited first sense, but the second level of platform indepenence has been thrown away. It's not "perfectly" platform independent. It's partially platform independent, compared to the level of platform independence that Java normally provides.

The second flawed argument is to insinuate that anyone who opposes preserving the greater platform independence is panicking, or a rigid purist:

> Or do you actually believe that generating a native executable will somehow

> contaminate the Java application with germs so it's no longer platform independent?

But of course, nobody is suggesting that the original source has (necessarily) been compromised. And nobody has used a word like "contaminate". They are simply pointing out that a major advantage of Java is being thrown away.

This is basically an ad hominem attack.

This false argument mixes the two together.

> The principle of the Java platform independence is not affected by the ability to produce

> native executables for certain platforms. I said this because some people still seem

> to believe native executables are contrary to this principle.

Of course, a native executable does effect the platform independence, because that native executable is itself not platform independent -- so the platform independence of the deployed object code is lost, and the independence of the project as a whole is lessened. (The independence of the source code isn't, necessarily, but nobody is saying that it is.)

And:

> What is so terribly wrong with offering your Java app as a set of OS-specific downloads

> so that any person who has no clue what Java is all about could install your application

> on that one particular operating system that he or she uses and not care about

> Java-enabling it? You know, so that it just works for him or her, right away?

Note that he starts with the second false argument, trying to make any opponents sound like extremists. Nobody is saying that it's "horribly wrong" -- it's just throwing away one of the major advantages of Java. Which isn't wrong, but by throwing such an advantage away it reduces the advantage of choosing Java for the implementation of your project.

Then he goes on to the first argument, ignoring the fact that the latter kind of platform independence is even an option. He also kind of mis-represents the independence: "not care about Java-enabling it? You know, so that it just works for him or her, right away?", as if simply running a Java program were extremely painful, and almost an act of programming in itself.

As I said earlier: I'm sure there are cases where native executables of Java source code are a good thing, but most of the time when people ask about it (on these forums at least) it seems to be because of newbies who think they have to generate an .exe for any program. And as I said one of the many previous times this has come up, I suspect those cases are relatively limited, since once you've gone that far then going even further and switching to C++ and making even more tuned, less portable applications becomes more attractive.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 18

> > I think you are lashing out in all directions. When

> > did I post code here in other languages than Java? I

> > might have done it but I can't recall a single time.

>

> See reply #15, dumb @ss:

>

> http://forum.java.sun.com/thread.jspa?threadID=5130495&start=10&tstart=0

I have explained why I called that code snippet the C-version (in my reply #19 in that thread). And even if I hadn't you should be able to recognize that it's Java.

So I'm a dumb @ss because you cannot recognize three lines of code as Java. What a loser you are.

> > I post all kinds of what I find good solutions. In

> > this thread for example I tried to discuss how you

> > can minimize the evils of class inheritance,

> >

> >

> > http://forum.java.sun.com/thread.jspa?threadID=5128674&messageID=9460373#9460373

>

> Good solutions? All I see there are the typical

> pompous junk that you love to pass off as real

> knowledge.

Is package privacy pompous junk? What can I say. You just confirm what I already knew. You're trying desperately to show off as the great designer by chanting OO "rules" you've picked up without really understanding them. You're accusing me of not posting alternatives to your "rules". I do all the time but you're not fit to understand it. Again, what a loser you are.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 19

> The first flawed argument is to ignore this latter

> level of platform independence. Such as:

>

> > Just because you distribute a Java application as a

> > native executable for a certain

> > platform doesn't change the platform independence

> > of the Java application.

> > It's still perfectly platform independent.

>

> This is a flawed argument as described above. Yes,

> the Java source code is still platform

> independent in the limited first sense, but the

> second level of platform indepenence has been thrown

> away. It's not "perfectly" platform independent.

> It's partially platform independent, compared

> to the level of platform independence that Java

> normally provides.

A pure Java application will always be platform independent and that's because it's written in Java. That's because one Java runtime format (bytecode) has been made ubiquitous (JVM's available on many platforms).

The above is the definition of Java platform independence. It can never be taken away from a pure Java application. So it doesn't matter how many different runtime formats are produced, the application will remain platform independent.

It is possible, even easy, to render a Java application not platform independent.. It's just to write parts of it in languages other than Java (using JNI). This will make a Java application not platform independent. Generating a native executable from a pure Java application won't.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 20

I suppose one could always produce a bytecode target as well as native targets, and in that case one is no worse off (from a breadth of target platforms perspective) than if one produced only a bytecode target. But:

1) you are worse off in that you've made deployment more complicated, which is the point of having a single portable object code target, and

2) that's assuming the person creating the native executable also created by the bytecode executable. They might not, especially if they're making a native executable because they (falsely) think that they have to -- that an .exe is the final stage in writing a program.

That's why I think it's necessary to bring this point up whenever someone asks this question. Yes, you can do this, but it's not necessary in most cases, and the cases where it is necessary or even useful are pretty rare.

JNI might not be the best example for your side of this argument. By definition you're starting out with native object code. So it's kind of like saying that medicine is unnecessary because corpses are already dead. It's true, but only in the case of corpses -- medicine is still a useful practice for the living. I'll agree though that if you're using JNI in an existing product, then producing native executables may be a more attractive option (although, just switching to C/C++ would also be a more attractive option).

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 21

> The second flawed argument is to insinuate that

> anyone who opposes preserving the greater platform

> independence is panicking, or a rigid purist:

>

> > Or do you actually believe that generating a native

> > executable will somehow

> > contaminate the Java application with germs so it's

> > no longer platform independent?

>

> But of course, nobody is suggesting that the original

> source has (necessarily) been compromised. And

> nobody has used a word like "contaminate". They are

> simply pointing out that a major advantage of Java is

> being thrown away.

No advantage has been thrown away by producing a native executable. On the contrary several advantages are possible (see the Excelsior home page).

There are technical, administrative, financial and legal differences between distributing a bytecode and a native executable. This is a decision that can be made without any concern about the platform independence of the application. It's not affected.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 22

> Of course, a native executable does effect the

> platform independence, because that native executable

> is itself not platform independent -- so the platform

> independence of the deployed object code is lost, and

> the independence of the project as a whole is

> lessened.

Yes a native executable is restricted to a certain platform but that's kind of the whole idea. You do it for a reason.

The project (whatever that may mean) is not effected at all. The bytecode executable can be deployed as readily as before, even on platforms already targeted by a native executable of the same application.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 23

Sure there's an advantage being thrown away. The advantage is that you don't have to think about that junk. You make one executable and it just works across platforms. That advantage may be a big reason you chose Java to begin with. And it's probably the typical use of at least 95% of the Java deployments out there.

When you start making multiple executables, you put yourself in roughly the same position (process-wise) than if you didn't have a portable (bytecode) executable to begin with.

And if you make only a native executable, then you certainly have affected the platform independence of the deployed object code.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 24

> once you've gone

> that far then going even further and switching to C++

> and making even more tuned, less portable

> applications becomes more attractive.

Not at all. Java is attractive because of the platform independence and to generate native executables for certain platforms doesn't diminish it. In my view it, on the contrary, adds to the attractiveness of Java. You get the best of two worlds. Platform independence combined with native executables.

PS. Excelsior has been mentioned but there's also a free open source compiler available,

http://gcc.gnu.org/java/

It can compile source to bytecode, source to native and bytecode to native.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 25

> Yes a native executable is restricted to a certain

> platform but that's kind of the whole idea. You do it

> for a reason.

Assuming you actually do it for a good reason, yes. But doing it because you don't realize that portable bytecode is an option (in fact, the typical option) isn't a good reason.

There can be reasons to do this, but I haven't seen them come up in practice in 10 years of coding Java professionally.

> The project (whatever that may mean) is not effected

> at all. The bytecode executable can be deployed as

> readily as before, even on platforms already targeted

> by a native executable of the same application.

Sure it's effected. Before, you had a single executable you deployed everywhere. With a single native executable, you have a single executable you can deploy in only one platform. With multiple executables, you now have to manage multiple executables, many (or all) of which only go on one platform each. This affects the project in a huge way, logistically.

By the way here's a definition of "project":

-- an individual or collaborative enterprise that is carefully planned and designed to achieve a particular aim : a research project | a nationwide project to encourage business development.

-- a school assignment undertaken by a student or group of students, typically as a long-term task that requires independent research : a history project.

-- a proposed or planned undertaking : the novel undermines its own stated project of telling a story.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 26

> > once you've gone

> > that far then going even further and switching to C++

> > and making even more tuned, less portable

> > applications becomes more attractive.

>

> Not at all. Java is attractive because of the

> platform independence and to generate native

> executables for certain platforms doesn't diminish

> it. In my view it, on the contrary, adds to the

> attractiveness of Java. You get the best of two

> worlds. Platform independence combined with native

> executables.

Well then, that's you and I suspect only you, the guy from Excelsior, and maybe a couple hundred other people.

LIke I said, in 10 years of coding Java I have never needed this, and nobody else where I worked (large institutions by the way) apparently did either.

To me (and most people apparently) the platform independence is a major advantage, and part of that advantage is not having to create multiple executables for different platforms. In fact, that seems to be how we define the platform independence of the target executable: "you don't have to create a different executable for each target platform".Your position that it's platform independent and you also have multiple executables is, at best, theoretically true, but false or at least meaningless in practice.

And, as a result, you're doing a disservice to the newbies when you insist that creating native executables is all very normal and you attack anyone who ever points out that it's usually unnecessary.

By the way, how often do you actually write real, compiled Java code (not just example snippets on these forums), and when you do, how often do you produce the native executables?

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 27

Well paulcw I think I stop there. I've presented my view and the rest will just be nagging.

But to summarize my view:

A pure Java application is platform independent. To produce a native executable for a certain platform has technical, administrative, financial and legal consequences, BUT the application still is as platform independent as before. No restriction what so ever has been put on it. The decision to distribute a native executable is unrelated to the platform independence quality of Java.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 28

> Well paulcw I think I stop there. I've presented my

> view and the rest will just be nagging.

That's kind of the point. Can you stop the nagging, especially when you're nagging about a point that's almost completely theoretical, especially when it's not a theoretical discussion?

So when a person makes the (completely correct) point that a .exe is not itself platform independent:

> java is platform independent, .exe is not

Don't confuse the issue by suggesting that an .exe actually is platform independent:

> Just because you distribute a Java application as a native executable for a certain

> platform doesn't change the platform independence of the Java application.

> It's still perfectly platform independent.

At least, not without also acknowledging that the platform independence really is lost if the .exe is the only executable produced.

And especially stop the ad hominem attacks:

> Or do you actually believe that generating a native executable will somehow

> contaminate the Java application with germs so it's no longer platform independent?

And, again, how often do you write real, compiled, executed Java code, and how often do you also make and distribute native executables?

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 29

> So when a person makes the (completely correct) point

> that a .exe is not itself platform independent:

>

> java is platform independent, .exe is not

>

> Don't confuse the issue by suggesting that an .exe

> actually is platform independent:

Well okay let's nag -:)

That statement in itself is completely cosher. I've never contested it.

But it's a discussion entry and it was made in the context of this thread. I interpreted it to mean that generating a .EXE is somehow in opposition to the Java platform independence.

Maybe I was wrong in assuming that but so what, no harm done really.

> > Just because you distribute a Java application as a

> > native executable for a certain

> > platform doesn't change the platform independence

> > of the Java application.

> > It's still perfectly platform independent.

>

> At least, not without also acknowledging that the

> platform independence really is lost if the .exe is

> the only executable produced.

This is the last time I say this now. In my view the application is still platform independent untder that circumstance. Even if the only runnable distribution ever produced is a native executable won't change anything. The application will remain platform independent because it's written in Java..

> And especially stop the ad hominem attacks:

I often spice up my replies but that's just to get a discussion going. It's my style and I mean no harm.

> And, again, how often do you write real, compiled,

> executed Java code, and how often do you also make

> and distribute native executables?

You're looking for proof in numbers?

Well, lets put it this way. If Java is to succeed as a language for commersial applications on the desktop then native executables are a must. When it comes to open source, in-house applications, hobby projects etcetera, then it's probably less important.

paulcwa at 2007-7-21 16:45:48 > top of Java-index,Java Essentials,Java Programming...
# 30
well i missed it, well did you people reached a conclusion.For what i meant is that, creating a jar, you can run it any where, no need to compile it again to run it in another operating system.
G_Abubakra at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 31

> well i missed it, well did you people reached a

> conclusion.

>

> For what i meant is that, creating a jar, you can run

> it any where, no need to compile it again to run it

> in another operating system.

That isn't what we are discussing :)

kajbja at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 32
> Well, lets put it this way. If Java is to succeed as> a language for commersial applications on the desktop> then native executables are a must. Not at all.Why do you think Sun is developing Java WebStart ?
karma-9a at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 33

Oh d a m n a geek fight has broken out.

could some just please help me: where do i type these commands to make a JAR? the IDE that i'm using atm does build JARs but it doesn't set a Main-Class so i always get an error whenever i double-click on the built JAR.

Message was edited by:

Alex1989

Alex1989a at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 34

> Oh d a m n a geek fight has broken out.

>

> could some just please help me: where do i type these

> commands to make a JAR? the IDE that i'm using atm

> does build JARs but it doesn't set a Main-Class so i

> always get an error whenever i double-click on the

> built JAR.

I would ignore the IDE until you can do it without the IDE. Install the JDK (if not already done with the IDE), set your path to include the JDK. (see the tutorials), then use the [url=http://java.sun.com/docs/books/tutorial/deployment/jar/]JAR tutorial[/url].

[url=http://java.sun.com/docs/books/tutorial/ ]Sun's basic Java tutorial[/url]

[url=http://java.sun.com/learning/new2java/index.html ]Sun's New To Java Center[/url]. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.

[url=http://javaalmanac.com ]http://javaalmanac.com [/url]. A couple dozen code examples that supplement [url=http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance ]The Java Developers Almanac[/url].

[url=http://www.jguru.com ]jGuru[/url]. A general Java resource site. Includes FAQs, forums, courses, more.

[url=http://www.javaranch.com ]JavaRanch[/url]. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.

Bruce Eckel's [url=http://mindview.net/Books/DownloadSites ]Thinking in Java[/url] (Available online.)

Joshua Bloch's [url=http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh ]Effective Java[/url]

Bert Bates and Kathy Sierra's [url=http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance ]Head First Java[/url].

James Gosling's [url=http://www.bookpool.com/sm/0321349806 ]The Java Programming Language[/url]. Gosling is

the creator of Java. It doesn't get much more authoritative than this.

Message was edited by:

mlk

mlka at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 35

> Well, lets put it this way. If Java is to succeed as

> a language for commersial applications on the desktop

> then native executables are a must. When it comes to

> open source, in-house applications, hobby projects

> etcetera, then it's probably less important.

I'd take issue with this. Java is already a success for commercial applications on the desktop - in the very "in-house" applications that you wave away. There's a lot of money in bespoke systems.

Shrink-wrapped software is very visible - and needs the kind of seamless integration that "native" languages tend to offer, but I wouldn't be remotely surprised to find that it was the smaller of the two markets.

D.

dcmintera at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 36

>I would ignore the IDE until you can do it without the IDE. Install the >JDK (if not already done with the IDE), set your path to include the >JDK. (see the tutorials), then use the JAR tutorial.

I've already read the JAR tutorial but where am i supposed to type all these commands that they tell you about?

Message was edited by:

Alex1989

Message was edited by:

Alex1989

Alex1989a at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 37
> I've already read the JAR tutorial but where am i> supposed to type all these commands that they tell> you about?In a command shell, of course.That's a DOS window if you're using Microsoft Windows.%
duffymoa at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 38
> In a command shell, of course.> > That's a DOS window if you're using Microsoft> Windows.<nitpick>Command Prompt: http://www.interact-sw.co.uk/iangblog/2004/03/04/notdos</nitpick>
dcmintera at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 39

> > In a command shell, of course.

> >

> > That's a DOS window if you're using Microsoft

> > Windows.

>

> <nitpick>

> Command Prompt:

> http://www.interact-sw.co.uk/iangblog/2004/03/04/notdo

> s

> </nitpick>

i've already tried the command prompt and it gives me this error: "'jar' is not recognized as an internal or external command, operable program or batch file."

Alex1989a at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 40

> i've already tried the command prompt and it gives me

> this error: "'jar' is not recognized as an internal

> or external command, operable program or batch file."

You either need to configure your PATH, or specify the full path when you try to execute the command.

Kaj

kajbja at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 41

> > > In a command shell, of course.

> > >

> > > That's a DOS window if you're using Microsoft

> > > Windows.

> >

> > <nitpick>

> > Command Prompt:

> >

> http://www.interact-sw.co.uk/iangblog/2004/03/04/notdo

>

> > s

> > </nitpick>

>

> i've already tried the command prompt and it gives me

> this error: "'jar' is not recognized as an internal

> or external command, operable program or batch file."

you might have not installed JRE .. try it like this....

c:/><file name>.jar

srivastava@univa at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 42

> > Well, lets put it this way. If Java is to succeed as

> > a language for commersial applications on the desktop

> > then native executables are a must. When it comes to

> > open source, in-house applications, hobby projects

> > etcetera, then it's probably less important.

>

> I'd take issue with this. Java is already a success

> for commercial applications on the desktop - in the

> very "in-house" applications that you wave away.

> There's a lot of money in bespoke systems.

>

> Shrink-wrapped software is very visible - and needs

> the kind of seamless integration that "native"

> languages tend to offer, but I wouldn't be remotely

> surprised to find that it was the smaller of the two

> markets.

I'm not that familiar with the terminology used but with "commersial application" I actually meant what I think you call "shrink-wrapped software". You pay a fee and get a copy of an already developed program.

Note that my point is NOT that you should abandon Java for some other language. I mean you should still use Java but with this kind of software, in my view, a native executable is the better distribution form (and this doesn't reduce the platform independence of the application)

srivastava@univa at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 43

> you might have not installed JRE .. try it like

> this....

> c:/><file name>.jar

I have installed JRE 6. when i try c:/><file name>.jar it gives me this: "'C:\Documents' is not recognized as an internal or external command, operable program or batch file" :/

Alex1989a at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 44

> I have installed JRE 6. when i try c:/><file

> name>.jar it gives me this: "'C:\Documents' is not

> recognized as an internal or external command,

> operable program or batch file" :/

You'll have to put quotes around the path - it's having a Barry when faced with the spaces in "Documents and Settings".

D.

dcmintera at 2007-7-21 16:45:52 > top of Java-index,Java Essentials,Java Programming...
# 45

> > Just wondering - what would be a good, platform

> > independant way of packaging a java application so

> > that somebody with a non-technical background

> could

> > use it with ease?

>

> Java Web Start or a Java aware installer (Install

> Anywhere for example).

I agree with this. With JWS you can setup a webpage that can check for the JRE and direct them to a page where it can be downloaded. Once that's done downloading and launching the application is one click of a button.

Of course JWS doesn't work for everyone. Maybe they don't have internet access, or you don't want to maintain a webpage, or you don't want to run your application through JWS and deal with the security. In those cases I'd use a Java aware installer that is capable of installing the JRE if needed and keep things simple. Sure, it's more work for you to have an installer for each OS but chances are you know what you're doing and can deal, the user may not be able to.

kablaira at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...
# 46

> > And, again, how often do you write real, compiled,

> > executed Java code, and how often do you also make

> > and distribute native executables?

>

> You're looking for proof in numbers?

>

> Well, lets put it this way. If Java is to succeed as

> a language for commersial applications on the desktop

> then native executables are a must. When it comes to

> open source, in-house applications, hobby projects

> etcetera, then it's probably less important.

Well:

1) Again, you didn't answer the question. My major point in asking this was to determine whether this has any practical implications for you or whether it's purely theoretical for you. It seems to be the latter.

2) Even if it were true that compiling to .exes were necessary for Java to succeed on the desktop (and I'm not convinced that's true for reasons already outlined on this thread) that's a straw-man argument. Java is doing really well right now as an enterprise language, and as far as Java is concerned the desktop is a niche market. Java was not originally conceived as a desktop app language either. For those of us who work with enterprise Java, and probably for many people who chose Java for other reasons, the platform independence of the object code was a major reason for selecting Java in the first place -- precisely because we didn't want to have to distribute multiple versions of the object build.

paulcwa at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...
# 47

Actually...you know what would be a really appropriate use of a native compiler?

@Excelsior guy: you can start paying attention again

J2ME code. Handsets are so restricted, and developing for them is so idiosyncratic, that in that field apparently even Java developers create lots of different target builds for different platforms anyway. So in that field the advantage of portable object code is pretty minor to begin with.

Secondly, some handsets do BREW, some do J2ME, some may do both, but it seems that most do one or the other but not both. If there were a native Java compiler that produced BREW code, then a shop could (ideally, anyway) keep their whole codebase in Java, and produce object code for both BREW and J2ME devices.

OK, Excelsior guy. You've heard it. If you're not already doing this, start doing this, and pay me royalties. Now get cracking!

paulcwa at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...
# 48
@paulcw: Ideaworks 3D have an interesting bit of middleware (C/C++) which supports multiply platforms. The basic concept is most devices out on the market are Brew, Symbian, Windows Mobile or Linux so it can compile to each.
mlka at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...
# 49

> 1) Again, you didn't answer the question. My major

> point in asking this was to determine whether this

> has any practical implications for you or whether

> it's purely theoretical for you. It seems to be the

> latter.

I try to keep discussions principal. It's not that interesting what the individual programmer do really. And it's my principal view that producing a native executable doesn't in any way limit the platform independence of the application itself (the application being "source & rights" in my view).

But if you ask if I've personally been distributing a native executable the answer is no. But I have participated in developments where this has been the case and when I'm closer to distribution of my own pet-project I certainly will.

For me, native executable deployment beats bytecode big time. It's so much less trouble.

mlka at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...
# 50

> 2) Even if it were true that compiling to .exes were

> necessary for Java to succeed on the desktop (and I'm

> not convinced that's true for reasons already

> outlined on this thread) that's a straw-man argument.

> Java is doing really well right now as an enterprise

> language, and as far as Java is concerned the

> desktop is a niche market. Java was not originally

> conceived as a desktop app language either. For

> those of us who work with enterprise Java, and

> probably for many people who chose Java for other

> reasons, the platform independence of the object

> code was a major reason for selecting Java in

> the first place -- precisely because we didn't want

> to have to distribute multiple versions of the

> object build.

As I've said many times my principal standpoint is that a native executable in no way limits the platform independence of the application. You can still deploy the bytecode executable anytime you wish.

So what's your beef really? If you feel that bytecode distribution is everything you ever wanted then just keep doing it. Do as you please but don't claim native executables limit the Java concept of platform independence.

As you mention, platform independence is very much a big thing for developers. Users usually don't care much. They want an application which is guaranteed to work on exactly their platform(s). Whether this is easily accomplished or not isn't their headache.

And note that the concept of Java platform independence itself doesn't automatically give users the right to run Java applications everywhere.

mlka at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...
# 51

Before I give my 2cents in this thread, I want to mention that I've only gotten up to post #38 before writing this - so please forgive my stepping on anyone elses toes by re-inventing their post.

It appears to me to be a case where someone goes out of their way to buy a vehicle - I am a car guy, BTW - that can "allegedly" go anywhere (on/off road that is) and then proceeds to place wheel and tire combinations on it that effectively leave it as a "can't go much of anywhere" vehicle, because ground clearance is reduced, and tires lack traction and ability to protect the wheel and suspension components from potholes due to incorrect tread design and insufficient sidewall depth.

Java was developed to be platform independant for some very good reasons and alot of work went into the language to make it capable of doing that to about as great a degree as is probably possible. Why degrade that?

MS has indeed made their O/S ever present, obviously to make money initially on the product itself, but also by taking the long view of things ... by generating market forces that are self-perpetuating - so just about everything runs on Windows.

We "want" that same self-perpetuation for the Java platform. We do that by - in a sense - forcing others to get a JRE.

Now I know that in a couple of other recent threads I myself have asked about a "good" Java .exe maker. I thank the poster of early on in this thread for posting the link to Excelsior Jet, because it filled in a few gaps in my own understanding of the various offerings out there. But my opinion has not changed on that one either ... it seems they are all either too expensive or incomplete.

~Bill

abillconsla at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...
# 52

> As I've said many times my principal standpoint is

> that a native executable in no way limits the

> platform independence of the application. You can

> still deploy the bytecode executable anytime you

> wish.

Unless, of course, the bytecode executable doesn't exist.

Which it won't if the application were compiled by a newbie who didn't know that a bytecode executable is the whole point most of the time, and they shouldn't have wasted all that money on a native compiler, and they haven't really learned Java properly because they've been producing native executables only while they've been learning, and when they're at a job interview they learn that their lack of understanding about normal Java deployments makes them less desireable for the position they're applying for.

> So what's your beef really? If you feel that bytecode

> distribution is everything you ever wanted then just

> keep doing it. Do as you please but don't claim

> native executables limit the Java concept of platform

> independence.

My beef is that you insist on presenting a niche situation as being standard. As such you're doing a disservice to any newbies who are confused about the Java platform.

> As you mention, platform independence is very much a

> big thing for developers. Users usually don't care

> much. They want an application which is guaranteed to

> work on exactly their platform(s). Whether this is

> easily accomplished or not isn't their headache.

And this is a forum for developers!

And anyway in the Java world the users (of the executable) and the developers are often the same people.

> And note that the concept of Java platform

> independence itself doesn't automatically give users

> the right to run Java applications everywhere.

I have no idea what you mean by this. "Right"? Are you talking licensing?

paulcwa at 2007-7-21 16:45:57 > top of Java-index,Java Essentials,Java Programming...