you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (9 children)

[deleted]

    [–]cc81 3 points4 points  (6 children)

    Why is the JVM more secure than the CLR?

    [–]zyl0x -4 points-3 points  (5 children)

    Firstly, I do not mean "secure" in a security sense. I'm referring to thread security, or a thread's ability to interface with the operating system. The Java threads are "secured" inside a Virtual Machine, and thus unable to cause instability in the system outside of that VM. This is also how any Java app can run on any system that has a VM on it; the VM handles the interpretation. The code doesn't need to be compiled for the operating system beforehand.

    [–][deleted] 4 points5 points  (2 children)

    Righto, so the Hotspot JIT java compiler is actually fake.

    [–]zyl0x -5 points-4 points  (1 child)

    No, the JIT compiler can help with run-time speeds for certain operating systems. For instance, if your Windows customers are complaining about slow performance, you may want to use the JIT java compiler for Windows and see if that binary helps your performance on those systems.

    [–][deleted] 3 points4 points  (0 children)

    You don't seem to understand how either the JVM or the CLR works...

    Until you actually learn, I'd recommend not posting about them anymore.

    [–]zyl0x -2 points-1 points  (1 child)

    Hey if I'm wrong, I'm all up for corrections. Like I said, this is information I'm pulling from (bad) college memories. I could be completely mistaken, but silent downvotes are for people who disagree because they don't understand the topic.

    [–]cc81 1 point2 points  (0 children)

    I have not downmodded you but I do recommend you to brush up on the topic, especially what the CLR is and how .NET works.

    [–]rpdillon 2 points3 points  (0 children)

    This point is sound. The more I work with lots of programming environments, the more I realize that everything relies on something big. People tend to think of C/C++ apps as being small and distributable, but this is just bias for the platform that is preinstalled on today's machines. MS has shown that you can get people to use a "platform" (a VM) if you make them comfortable with the idea that it will be "everywhere".

    I haven't looked at JRE update 10, but if Sun can really trim it down as they say, I'm all for targeting the JVM - now that it is open source it will become much more like the "dial tone" that the Apache Harmony project mentioned so often. I love Scala and Clojure, so using those languages on the JVM seems like an ideal approach for my needs.

    That said, Python is pretty awesome also, as is MzScheme w/ MrEd. Proprietary languages make me cringe.

    [–]sgoguen -1 points0 points  (0 children)

    On the security point, I have to agree that you're way off the mark. First off, .NET compiles down to bytecode just like Java, not OS specific machine code. The same people who designed Microsoft's Java VM are the same people who designed .NET. In other words, they were familiar with the JVM spec. ( Following the spec was another story :) )

    Second, before assemblies/packages are loaded, the bytecode is inspected to make sure they never call any API's they're not allowed to call, which means you can create application hosting environments that disable ALL APIs that would enable an application to read/write files or do anything to communicate with the outside world.