Results 1 to 12 of 12
Like Tree3Likes
  • 1 Post By trcooke
  • 1 Post By trcooke
  • 1 Post By JosAH

Thread: What is the power of Pure Java?

  1. #1
    Ziya is offline Member
    Join Date
    Jan 2015
    Posts
    6
    Rep Power
    0

    Default What is the power of Pure Java?

    Pure Java is development on Java only using Java Development Kit (JDK) to write once and run anywhere.
    It is about the slogan: "Write once, run anywhere" (WORA).
    As i understand JDK is programming in binary using bytes.

    So, the question is:
    What is power of Pure Java?
    Is it worth to develop everything on that to run anywhere?
    Can i write something worthful only using Java Development Kit (JDK)?
    For example, what about a Paint app?

    Thank you)
    Last edited by Ziya; 01-02-2015 at 10:17 AM.

  2. #2
    trcooke is offline Tim Cooke
    Join Date
    Jul 2014
    Location
    Belfast
    Posts
    101
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    Quote Originally Posted by Ziya View Post
    What is power of Pure Java?
    What kind of answer are you expecting from such a broad question? Like everything, there's strengths and weaknesses.
    Quote Originally Posted by Ziya View Post
    Is it worth to develop everything on that to run anywhere?
    If you need an app to run on different platforms then yes. But you should always develop your application for the target platform or platforms. For example, the application I maintain at work is designed to run on Solaris servers, so there is no effort spent making sure it works on a Windows server.
    Quote Originally Posted by Ziya View Post
    Can i write something worthful only using Java Development Kit (JDK)?
    Sure you can.
    Quote Originally Posted by Ziya View Post
    For example, what about a Paint app?
    Sure, why not. For learning you would want to do something that interests you.
    Ziya likes this.

  3. #3
    Ziya is offline Member
    Join Date
    Jan 2015
    Posts
    6
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    Thank you for answers.

    > But you should always develop your application for the target platform or platforms.
    Why? And why there are so many apps the require to choose OS?
    It is kinda better to make those apps cross-platform. No?

  4. #4
    trcooke is offline Tim Cooke
    Join Date
    Jul 2014
    Location
    Belfast
    Posts
    101
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    If you want your app to be cross platform, then yes.

    The example I gave is for an application that will never be run on anything but Solaris servers, so why waste time, effort, and money on supporting anything else? That's why I say you should develop for your target platform or platforms. If your target platform is multiple platforms then you need to make sure it's a cross platform app, but in reality that involves a lot of development and testing effort. If you're just working on it yourself as a hobby then it's just your time spent, but if you're a company building an enterprise app then it's real money you're spending.
    Ziya likes this.

  5. #5
    Ziya is offline Member
    Join Date
    Jan 2015
    Posts
    6
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    Ok, great thanks, i learned lots of stuff.

    But there is still suspicious of slogan "Write once, run anywhere", many people say it is a lie, it won't run on any operation system.
    Last edited by Ziya; 01-02-2015 at 11:47 AM.

  6. #6
    trcooke is offline Tim Cooke
    Join Date
    Jul 2014
    Location
    Belfast
    Posts
    101
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    Not necessarily. For example you might pull in a file in your application and refer to it as "/tmp/somefile.json", which will work on a *NIX system but will fail on Windows.

    You see, just having an application that will run on multiple platforms doesn't necessarily mean that it will run correctly on multiple platforms.

  7. #7
    Ziya is offline Member
    Join Date
    Jan 2015
    Posts
    6
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    I know that if to create a binary file it will not run anywhere, it is impossible or as you said will not run correctly, so it is just a lie and the same thing about Pure Java.
    Yes of course, it may be possible to optimize an app for different platforms, but the idea to write once on Pure Java JDK and it will run on all the platforms in the world, it is just a lie, great lie.
    Last edited by Ziya; 01-02-2015 at 12:02 PM.

  8. #8
    trcooke is offline Tim Cooke
    Join Date
    Jul 2014
    Location
    Belfast
    Posts
    101
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    Calling it a lie is a bit over critical. You just need to be aware that there are many factors other than the actual JDK that influence an applications suitability for a platform.

    Also, I'd like to correct you on one point. When you compile a Java program with a JDK you are not creating a binary, you are creating bytecode. It is the job of the JVM to convert that bytecode into the binary required for that platform. That's how the cross platform thing works, by having a different JVM for each platform.

  9. #9
    Ziya is offline Member
    Join Date
    Jan 2015
    Posts
    6
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    Thank you for correcting.
    i understood everything i needed in exception of one point.

    Let's conclude:
    Java claims WORA, apps will run anywhere where Java Virtual Machine (JVM) is installed.
    But it is not really true, it is not true for 100%, may be not true at all.

    I am a bit confused whether it is true or not, can you help? True or not, yes or not?

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

    Default Re: What is the power of Pure Java?

    99% of Java code is WORA; most certainly so if it is written by beginners (or it won't run at all, nowhere). Only if you need to dig into OS dependent stuff, you're beyond WORA, but in general, it's nothing to worry about ...

    kind regards,

    Jos
    Ziya likes this.
    Build a wall around Donald Trump; I'll pay for it.

  11. #11
    Ziya is offline Member
    Join Date
    Jan 2015
    Posts
    6
    Rep Power
    0

    Default Re: What is the power of Pure Java?

    Ok, thanks!

  12. #12
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    13

    Default Re: What is the power of Pure Java?

    My two cents: Write Once Run Anywhere is a tool that the Java platform gives to its programmers - whether the programmer then makes it happen or not is their responsibility. Where it usually goes wrong is that the programmer in question does not take the responsibility to understand the platform they're developing for and the tools they work with and then you get claims such as "Java does not do this, Java is not working, bla bla bla". Wrong wrong wrong, you simply don't understand enough of the problem domain to identify what is and isn't a correct approach.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 1
    Last Post: 05-13-2012, 04:35 AM
  2. Replies: 23
    Last Post: 11-20-2011, 10:07 PM
  3. HDF format ( HDF4 HDF5 ) files in pure Java
    By williamfgc in forum Advanced Java
    Replies: 0
    Last Post: 12-04-2009, 09:34 PM
  4. is java is pure object oriented program?
    By 435.mahesh in forum New To Java
    Replies: 1
    Last Post: 04-21-2009, 04:42 PM
  5. New article about ZK the pure Java RIA framework
    By simbo in forum Web Frameworks
    Replies: 0
    Last Post: 03-13-2009, 09:27 AM

Posting Permissions

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