Results 1 to 13 of 13

Thread: java

  1. #1
    mari is offline Member
    Join Date
    Dec 2013
    Posts
    1
    Rep Power
    0

  2. #2
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

    Default Re: java

    Every language is a platform language, java is a platform independent language.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,016
    Rep Power
    6

    Default Re: java

    You contradict yourself - if EVERY language is a platform language, then how can the Java language (which falls in the same collection of EVERY language) be platform independent?

    It is not of course - it requires an environment that supports running the binaries compiled from the language, such as a Java Virtual Machine or Android Dalvik. That's a pretty limiting platform restriction. Java is not platform independent, but it is often referred to as cross-platform.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

    Default Re: java

    Quote Originally Posted by gimbal2 View Post
    You contradict yourself - if EVERY language is a platform language, then how can the Java language (which falls in the same collection of EVERY language) be platform independent?

    It is not of course - it requires an environment that supports running the binaries compiled from the language, such as a Java Virtual Machine or Android Dalvik. That's a pretty limiting platform restriction. Java is not platform independent, but it is often referred to as cross-platform.
    My logic behind that is: Every language can run on a platform, but java can run on multiple platforms without changing code. Provided that it supports the JVM.

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,016
    Rep Power
    6

    Default Re: java

    Read: provided that the end-user installed one that is properly up to date too. The cross-platform thing is to be taken with a grain of salt really, because even though applications can certainly run on multiple platforms if the right environment just happens to have been created, it still doesn't happen automagically - you need to write your code such that it is cross-platform. File systems, user rights and windowing systems are three main things that can instantly break a program when moving to another platform.

    In short: there is too much of an implication that Java does the work for you in that "write once, run everywhere" bit. It's simply not true, you'll still have to test and debug on every platform that you want to support to tune it to that platform specifically.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,524
    Blog Entries
    7
    Rep Power
    20

    Default Re: java

    Quote Originally Posted by zFollette View Post
    Every language is a platform language, java is a platform independent language.
    You're showing that you've never tried to run anything Java related outside those MS Windows PC environments ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

    Default Re: java

    Quote Originally Posted by gimbal2 View Post
    Read: provided that the end-user installed one that is properly up to date too. The cross-platform thing is to be taken with a grain of salt really, because even though applications can certainly run on multiple platforms if the right environment just happens to have been created, it still doesn't happen automagically - you need to write your code such that it is cross-platform. File systems, user rights and windowing systems are three main things that can instantly break a program when moving to another platform.

    In short: there is too much of an implication that Java does the work for you in that "write once, run everywhere" bit. It's simply not true, you'll still have to test and debug on every platform that you want to support to tune it to that platform specifically.
    No shit. I'll even provide an example.
    Java Code:
    JFrame.setResizable(false);
    Does completely different things in Windows than it does in Linux. While it does set resizable to false. It offsets the frame by like 5px in windows (if you don't set the frame up correctly., I forget exactly what it does in Linux.

  8. #8
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

    Default Re: java

    Quote Originally Posted by JosAH View Post
    You're showing that you've never tried to run anything Java related outside those MS Windows PC environments ...

    kind regards,

    Jos
    I have developed on several Linux distros, but going along wit gimbal2s response, you have to set up your program correctly, it will run as expected (or damn close) on most other OSs.

  9. #9
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: java

    OP is prolly like, "wut?"

    I develop on Linux and haven't seen anything misbehave on Windows. But on OSX, you've gotta do some dynamic class loading tricks to test for and use Apple Java Extensions. Otherwise your app doesn't integrate nicely with the Finder and stuff. And to make it more fun, Apple took all the API docs off their developer site. Thanks, Apple...
    Get in the habit of using standard Java naming conventions!

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,524
    Blog Entries
    7
    Rep Power
    20

    Default Re: java

    Quote Originally Posted by kjkrum View Post
    OP is prolly like, "wut?"

    I develop on Linux and haven't seen anything misbehave on Windows. But on OSX, you've gotta do some dynamic class loading tricks to test for and use Apple Java Extensions. Otherwise your app doesn't integrate nicely with the Finder and stuff. And to make it more fun, Apple took all the API docs off their developer site. Thanks, Apple...
    Luxury, pure luxury; I'm currently working on a tiny thing (Linux, openWRT, running on a 400MHz MIPS cpu) and there's no 'official' JVM available for it, so I use jamvm with that lousy GNU 'classpath' (clone of the core classes); jamvm is fine but those GNU classes are a pita to work with ... I should've listened to my old mom ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: java

    Curious: why Java on that platform?
    Get in the habit of using standard Java naming conventions!

  12. #12
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,016
    Rep Power
    6

    Default Re: java

    He's building a robot to spy on his neighbors with.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  13. #13
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,524
    Blog Entries
    7
    Rep Power
    20

    Default Re: java

    Quote Originally Posted by kjkrum View Post
    Curious: why Java on that platform?
    Those openWRT thingies are plugged on MCUs that manage different devices; those devices can be different per MCU and those openWRT thingies have to download the functionality for those devices (over WifI 802.11/b/g/n) Java is ideal for that with its (De)Serialization. Those MIPS thingies are headless (no monitor, no keyboard, no nothing except for their built-in WiFi). If only that GNU classpath weren't so lousy ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •