JAVA criticism or inexperience?
Hey guys,
I've recently learned some Java programming. I have managed to make a working .jar executable. What came to my attention is the difficulty of setting up your system to be able to run .jar files. When I wanted to show of my application to friends and family it took a lot of trouble and time to make sure their system was set up properly to be able to run my application.
I'm wondering if it would be better to write applications in other languages that allow to create exe files? Am I overseeing something? If just running an application causes so much trouble than progrramming in Java doesnt seem like an attractive option. I dont want my users to be dscouraged using my applications. What are your views on this?
Re: JAVA criticism or inexperience?
Im really interested in hearing some opinions.
Re: JAVA criticism or inexperience?
java requires the jre
.exe files require the Windows OS
Re: JAVA criticism or inexperience?
Java requires the JRE. Most computer's come with the JRE already installed. That being said most computers may not have the most up to date JRE installed - thus if you compile code with the latest up to date version of the JDK, anyone running your program requires that version or above unless you a) do not use runtime API of this latest version and thus you can b) compile with specific flags that specify the minimum required version. As an example, if you compile with JDK 7, anyone with JDK 6 cannot run it.
Writing an application specific for an OS will have the same problem you are stating you are having for java - for instance you could write code for one platform (for instance Windows) but no one with any other OS will be able to run it (and in fact you may have to port your code to each different platform you wish to run your code on). Java on the other hand does not have this problem - you write your code once and can run on Windows, Mac, Linux, etc...as long as the appropriate JRE is installed.
What exactly are the problems you are having when you try to run your code?
Re: JAVA criticism or inexperience?
You could deploy with something like Java webstart, which will ensure that the user has the proper JRE installed.
You can also bundle a JRE with your jar, in effect creating a standalone executable.
But compared to the hassle that other languages require (dll hell, XNA, .net), I'll take "hey install Java" over those any day.
Re: JAVA criticism or inexperience?
Distribution of any program, especially if you're shooting for a wide audience with various OS's and hardware, has always been difficult in my experience, and I can't say I prefer any one over another.
Probably the simplest is a web-app, but then development sucks especially if you want to support as many browsers as possible (::cough:: IE6). My usually response is "Sorry, out of luck if you don't have a HTML 4 or 5 compliant browser".
Re: JAVA criticism or inexperience?
All the people I know use Windows and are used to clicking an installer or executable and having a working program. With Java the problem isnt only about having a correct JRE installed. The problem I encountered is making sure that .jars are opened by JRE, and that the classpath is properly set up. Even after installing the latest version of JRE (which is a big pain in itself for a user), these two things werent automatically done by the JRE installer. It needed an external program called jarfix to do it (I know its possible to do it manually, but this was easier).
I think the idea of makin a standalone executable is very important. I was wondering how Java programmers deal with this problem since Java makes it harder for making an easy to install program which is what users really want. I like the idea of this Webstart thing. And me and most people I know havent had much problems with "normal" programs and their installations as they had with Java programs.
Re: JAVA criticism or inexperience?
Quote:
Originally Posted by
reapaz1
All the people I know use Windows and are used to clicking an installer or executable and having a working program. With Java the problem isnt only about having a correct JRE installed. The problem I encountered is making sure that .jars are opened by JRE, and that the classpath is properly set up. Even after installing the latest version of JRE (which is a big pain in itself for a user), these two things werent automatically done by the JRE installer. It needed an external program called jarfix to do it (I know its possible to do it manually, but this was easier).
Of course Java isn't going to set up your classpath for you, exactly like any other language isn't going to automatically know your dependencies. That isn't a Java-centric problem, but Java webstart does handle that pretty nicely for you.
There are also other ways to handle bundling of a Java program, some of them are discussed here: Java launchers - Java-Gaming.org
Quote:
Originally Posted by
reapaz1
I think the idea of makin a standalone executable is very important. I was wondering how Java programmers deal with this problem since Java makes it harder for making an easy to install program which is what users really want. I like the idea of this Webstart thing. And me and most people I know havent had much problems with "normal" programs and their installations as they had with Java programs.
I think you're underestimating the trouble that programmers of "normal" programs go through, which are going to be the same trouble (if not more trouble) than you go through deploying a Java program. Could it be easier? Absolutely. But a lack of ease of use is often the price you pay for a powerful language, and every language is going to give you similar (or worse) problems with dependency management.
We've given you a few options, and I'd be more than happy to help you out with webstart. But this isn't really a place to complain about Java, especially considering that every other language is going to have the same issues.
To be honest it sounds like you're a bit confused about dependency management, in this case the Java classpath. Migrating to another language isn't going to magically get rid of the dependency problem. We can help you solve it in Java, but switching to another language will just give you other dependency problems that aren't as easily solved as setting up the classpath. Up to you though.
Re: JAVA criticism or inexperience?
What I mean is that the classpath problem for example (and jars not being opened by a jre install automatically) doesnt ussually happen with programs written in c++ for example. Id rather put in some extra time coding and making it easier for the user than leaving them with a mess they cant solve. I like programming in Java but this problem makes me doubt about wanting to use it for Windows programs.
I am not so much complaining about Java but wondering about it, since it is known as a very popular and powerful language (and probably with good reason). My main goal now is to learn making apps for Android so Java is and will be an important tool for me. Thanks a lot for the link, I will definetely look into it when considering how to make Java programs user friendly in Windows.
Re: JAVA criticism or inexperience?
Quote:
Originally Posted by
reapaz1
What I mean is that the classpath problem for example (and jars not being opened by a jre install automatically) doesnt ussually happen with programs written in c++ for example. Id rather put in some extra time coding and making it easier for the user than leaving them with a mess they cant solve. I like programming in Java but this problem makes me doubt about wanting to use it for Windows programs.
I think there's your problem: have you ever written and deployed a program that required dependencies in another language? What about other languages makes dependency issues and deployment easier?
You're assuming that dependency issues do not happen with other languages, which is simply not true. In fact, they can often be harder to track down than Java classpath issues! Switching to another language won't get rid of your dependency issues, they'll just take the form of something other than the classpath.
You can create an executable file in Java using the links above, just like you can in any other language. So switching languages doesn't get you much in that department either.
But Java also gives you much more platform-independent options such as webstart, which other languages do not have. That might not seem like a big bonus for you, but wait until your program becomes more popular (or if you enter something like Ludum Dare), and all of a sudden you have people downvoting you for not having a linux or mac version.
You could even simply package all of your dependencies in a single jar. This is possible using the command line, but tools such as Fat Jar do it for you, and eclipse does it for you automatically. Like I said, I don't think your problem is that Java makes dependency issues harder, I just think you don't really understand dependency issues in general, so they seem like a bigger deal than they are- that's not meant as an insult, just a statement of fact.
I personally prefer the web start option, but it's really up to you. But the point is that Java isn't giving you any extra hassle that you aren't going to have to deal with in any other language, you just aren't used to dealing with dependency issues in general.
Quote:
Originally Posted by
reapaz1
I am not so much complaining about Java but wondering about it, since it is known as a very popular and powerful language (and probably with good reason). My main goal now is to learn making apps for Android so Java is and will be an important tool for me. Thanks a lot for the link, I will definetely look into it when considering how to make Java programs user friendly in Windows.
One thing that might be worth checking out is libGDX. It's more for game development, but it makes it super easy to program in Java and deploy to Android (or as an application). Depends on your ultimate goal.
Re: JAVA criticism or inexperience?
I guess I have to learn more about how to solve depency issues such as the classpath not being set etc. I'm still a bit confused about it but clarity will come in time. Im going to look into the libGDX link you have sent me too. Thanks a lot.
Re: JAVA criticism or inexperience?
In all fairness, I do remember dependency management being extremely daunting when I was a beginner java programmer. It's just one of those things that you have to get used to. Packaging your dependencies seems to be the way to go (in my opinion). An IDE with dependency integration (like Eclipse) does make your life significantly easier.
Re: JAVA criticism or inexperience?
Quote:
Originally Posted by
aussiemcgr
In all fairness, I do remember dependency management being extremely daunting when I was a beginner java programmer. It's just one of those things that you have to get used to. Packaging your dependencies seems to be the way to go (in my opinion). An IDE with dependency integration (like Eclipse) does make your life significantly easier.
I agree. If you can package everything into one jar it's probably easiest, and if you can't, I would vote for using webstart.
But my point is, you're going to have to handle dependency management no matter what language you use. The classpath is how Java handles dependencies, but other languages have their own daunting and obnoxious dependency mechanisms that you'd have to deal with anyway. If you've ever tried to play Ludum Dare games, you'll see that you simply can't play half of them because they require certain libraries or frameworks that you don't have installed, which is way more annoying than setting up a classpath (or just running a webstart).