Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 13 of 13

Thread: JAVA criticism or inexperience?

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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?


  2. #2
    Junior Member
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: JAVA criticism or inexperience?

    Im really interested in hearing some opinions.

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: JAVA criticism or inexperience?

    java requires the jre
    .exe files require the Windows OS
    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default 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?

  5. #5
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default 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.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default 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".

  7. #7
    Junior Member
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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.

  8. #8
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: JAVA criticism or inexperience?

    Quote Originally Posted by reapaz1 View Post
    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 View Post
    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.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  9. #9
    Junior Member
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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.

  10. #10
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: JAVA criticism or inexperience?

    Quote Originally Posted by reapaz1 View Post
    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 View Post
    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.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  11. #11
    Junior Member
    Join Date
    Feb 2013
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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.

  12. #12
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default 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.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  13. #13
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: JAVA criticism or inexperience?

    Quote Originally Posted by aussiemcgr View Post
    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).
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 4
    Last Post: May 12th, 2012, 09:53 AM
  2. No error, but I want criticism
    By JustForLawls in forum What's Wrong With My Code?
    Replies: 7
    Last Post: July 10th, 2011, 10:34 PM