Java 8 Officially Released
darthcamaro writes "Oracle today officially released Java 8, nearly two years after Java 7, and after much delay. The new release includes a number of critical new features, including Lambda expressions and the new Nashorn JavaScript engine. Java 8, however, is still missing at least one critical piece that Java developers have been asking for, for years. 'It's a pity that some of the features like Jigsaw were dropped as modularity, runtime dependencies and interoperability are still a huge problem in Java,' James Donelan, vice president of engineering at MuleSoft said. 'In fact this is the one area where I still think Java has a long way to go.'"
Probably the most important question in the mind of the general public.
Crap, I already have a hard enough time getting non-programmers to understand that Java and JavaScript aren't the same thing.
Is this something everyone should install? How does compatibility work with existing Java 7 projects?
Great. A new version of Java. Many of my vendors do not support 7u51. Now we got 8. When I hear someone propose a Java solution, I reach for my firewall.
Hoist Number One and Number Six.
Just what we need, yet another version to fight with and worry about..
---- Booth was a patriot ----
Yaaaaaaay! :D :D :D
More coding shinies!
Person that says "runtime dependencies and interoperability are still a huge problem in Java" clearly never used C/C++ on multiple platforms.
839*929
Lambdas could be interesting for some GUI coding I have to do in the near future. I look forward to exploring them, but had no interest in playing with the betas.
I do not fail; I succeed at finding out what does not work.
One of the nicest things about Jigsaw is being able to pick and package only those parts of Java that you need, potentially making your app considerably smaller, faster to load and consuming less memory, also thanks to the overdue housekeeping of breaking ancient, useless dependencies in the JRE apart.
It seems like a good idea and all, but I wouldn't consider this a critical must have feature.
My (on the spot off the top of my head) wishlist:
- swing that doesn't suck (seriously, how has this not yet been fixed)
- file choosers that don't suck (yes I already said swing, but file choosers just stand out as being particularly bad
- some standard command line argument processing
- unsigned types
- multiple inheritance (yes I know, old argument, but I want it damnit!)
...and still no properties. Seriously? getBlah()? setBlah()? I'm so glad I switched to Scala for newer development and that I even convicned my company to let us do more Scala development. The devs who are using Scala like it better and seem generally happier.
Java 8 == Absolutely none of the features we wanted and a lot of stuff I could care less about.
I wouldn't say EJB...
More like OSGi. Anybody familiar with writing Eclipse plugins will understand the benefits. And no, it' s nothing like writing EJBs.
Does it still come bundled with Crapware? Why can't Oracle just put a bullet into whoever signed the deal with Ask.com, and start behaving like a big software company again?
Programmers that really cared about things like lambda expressions have already moved on to Scala and/or Clojure (and of course, it's not as if lambda expression support is the only thing those languages have going for them over Java). I work on a mixed Java/Scala codebase, and we just finished upgrading from JDK6 to 7. I don't see us tackling an upgrade to JDK8 anytime soon (probably won't be until JDK7 stops getting security patches).
Now is the perfect time to build out a test server, fire up your applications, and start looking for all of the regressions. File the bug reports early and make sure that all of them are fixed before you even attempt to deploy this to your servers. Lately Oracle has been one of the worst offenders for regressions to the point that it seems like they threaten death to developers who test anything other than the new features.
B.S. ... I downloaded Slime Volleyball and set it up on my own webserver. 1 java upgrade later, it wouldn't work right. Explain. (This was 2001.)
-Clio
Karma: Bad (mostly from not giving a fuck)
Blog: http://clintjcl.wordpress.com
The biggest problem with Java is the fact that it makes dealing with 32-vs-64-bit and user-vs-admin in shell and script environments needlessly painful under Windows.
I mean, seriously. Why, in 2014, do we STILL have bullshit like:
java -jar foo.jar arg1 arg2 arg3
(silent crash), or
[*very public crash*], or
"This application requires a 64-bit JVM"
then, have to screw around figuring out what the path is THIS WEEK to the right java.exe, because every goddamn semi-daily update changes the installation path, so you end up having to do something like:
{swear violently and with frustrated rage}
dir "c:\program files\java"
(see what the installation dir is this week)
"c:\program files\java\jdk1.7.0.69\bin\java.exe" foo.jar arg1 arg2 arg3
I mean, would it really kill them to give us an installer that installs BOTH the 32 and 64-bit JDKs, then creates a bunch of symlinks to a file named java.exe that -- when launched -- looks at the jarfile, determines whether it needs a 32- or 64-bit JVM, finds the latest 32- or 64-bit JVM as appropriate, and launches it -- passing the path to itself and the rest of the args as args?
This is an endless source of pain to me. Java is my main language & I end up using it for almost everything, and its awful handling of commandline launches has driven me crazy for years. When I write some tool I use a lot, I'll go to the trouble of setting it up to build with JSmooth so it can wrap the whole thing in a .exe file... but that's a royal pain in itself, and I'm dreading the day when I have to figure out how to use it to wrap a 64-bit Java app (I'm not even sure it can).
Java also needs to seriously improve the way it deals with UAC... like maybe install a privileged Java background service (that's normally asleep and idle) so we can launch apps as regular users under Windows 7, and programatically auto-elevate via UAC by having Java delegate sensitive tasks to that background service when necessary under Windows 7 or later. Or at least, create something like WindowsUACException that's a subclass of IOException (so Windows-aware apps can catch it explicitly and deal with it gracefully, without breaking Windows-unaware apps that are oblivious to UAC) that gets thrown when something fails due to UAC, instead of throwing some misleading Exception that makes it look like the filesystem is missing.
Regardless, Java's handling of Windows commandline launches of executable Jarfiles *sucks* under Java 7, and we can only hope they've had mercy on us and made it less dysfunctional under Java 8.
Far BETTER would be if Java could be aware of how much ram the computer has, and enlarge its heaps as necessary & possible. Few things piss me off more than getting OutOfMemoryException on a computer with 16 gigs because I forgot to manually specify a larger heap size when I launched some executable jarfile from the commandline.
I mean, seriously. Would it really be *that* hard for the JVM to handle TWO sets of memory pools instead of just one, so that if the Eden space (for example) gets exhausted and is due for GC, the JVM would check with Windows to see how much physical RAM is free, and if there's a lot of it, just allocate a new chunk that's roughly double the size of the old one, start sticking new data into the new one immediately, and consolidate data from the old one into the new one as a very, very low-priority non-blocking background thread that eventually returns the first chunk of RAM to Windows once everything in it has been either moved or freed. For longer-lived services where memory leaks are a real issue, you could tell it, "expand by doubling up to [max megs or percent free], then fall back to conventional garbage collection -- possibly, grabbing a new chunk of ram that's the same size as the old one if possible so the time-consuming object-copy can be deferred and done in the background"
IBM WebSphere was always tightly tied to specific versions of Java. My guess is that as an "enterprise" application, they decided to rely on "enterprise" vendors that have a tendancy towards this kind of stupidity. Using mostly Apache projects you don't tend to run into these problems.
Or it could simply be buggy threaded code, doing things like starting new threads from object constructors. Those can sometimes do things like give the appearance of working under one garbage collector yet start throwing NullPointerExceptions under another.
Forget magic. Any technology distinguishable from divine power is insufficiently advanced.
It's simple. If you have a 32 bit OS, install the 32 bit version of Java. If you have a 64 bit OS, install the 64 bit version of Java.
I have never since Java 1.0 seen a Java program that required the 32 bit or the 64 bit version. That's the runtime, and has nothing to do with how the JVM byte code itself is structured. I don't even know how you could make a Java executable depend on the version of JVM short of using the bindings for calling binary libraries -- in which case you're dealing with crapware, not Java.
I do not fail; I succeed at finding out what does not work.
How cute! Java is only about 5 years behind. They'll catch up one day, by gum!
I kid, I kid. I have to do some Java stuff and this is definitely welcome but sorry - given the choice I will pick .NET/C# every time where possible.
You realise that that is exactly how the JVM works already? The upper limit you asked for is, in fact, the max heap size that you specify using -mx. The -ms flag specifies the initial heap size. If you never allocate more than that, the VM will not request more memory from the operating system.
I think by now everyone knows Java was responsible for the vast majority of drive by infections on the web. Lately they've made Adobe look secure by comparison. By adding development features instead of fixing their security of even just their stupid updated that stalls out permanently all the time, they've shot themselves in the foot. Half my customers at my computer repair shop absolutely refuse to use or install java under any circumstances. Lots of companies are banning all java-based software for security reasons. My former employed switched their multi-million dollar bank account to another bank to avoid the original bank's java web plugin-based internet banking. Java is dying. Who cares if 8 is coming out?
But java.com states that it's about whether you're using a 32 or 64 bit browser, not OS:
http://www.java.com/en/downloa...
Isn't the 32-bit version of Internet Explorer still the default on Windows 8? Isn't Firefox (the one you normally get anyway) and Chrome still also 32 bit?
I only wish it were that simple. On my computer at work, I have at least one Java app that literally dies on launch unless you have BOTH 32-bit AND 64-bit Java installed. It exhibits this behavior on everybody's computer, and not just mine. Nobody, including its author, really knows why.
That oddball app notwithstanding, installing only a 64-bit JRE on a computer running 64-bit Windows 7 is NOT the universal solution. Google finally fixed it, but for the longest time, you literally couldn't do Android software development under Eclipse on a computer with ONLY a 64-bit JRE. It would randomly forget how to find the SDK, fail compilation due to bugs in your code that didn't actually exist (if you cut the class into the clipboard, saved the now-empty class, then pasted it back, all the errors would go away), completely mangle R.java, and would do a phantom cursor-left whenever you typed a semicolon at the end of a line, so that when you pressed return a quarter-second later, it moved the semicolon down to the next line and caused an error.
There a other examples of vehemently-32bit apps, but it's late and Android-Eclipse is the huge one that drove me nuts for about 2 years. Note that I'm not conflating Android and Java... Eclipse itself is what was screwing up when run on a 64-bit VM.
http://superuser.com/a/562869/...
And why, pray tell, are you installing a 32 bit browser on a 64 bit OS when every browser I know of comes with targetted builds?
I do not fail; I succeed at finding out what does not work.
Sigh...no one outside the Windows world gives a shit about .NET
Don't forget Unity3D developers, they care much about C#. Although Unity3D uses an ancient version of the mono runtime...
The problem is while the java platform is extremely important to you and me, it costs money for Oracle to maintain and they don't see much benefit from it. I don't blame them for trying, in some small way, to monetize it.
I don't quite agree with the parts of your post that I quoted.
- Control of Java was probably one of the main reasons for Oracle to buy Sun
- Java makes Oracle a lot of money through licensing and support contracts. You may not be paying for it, but large corporations are.
- The Ask toolbar thing started with Sun, not with Oracle. It actually started with the Google toolbar, but when Google started to push Android (killing Java ME), the relationship soured, and Sun started to promote a competing toolbar instead.
This is the applications installers fault. Properly installed the user never need know its java/C/C#/Lisp whatever you want. I have my java apps installed properly and most have no idea its java. Well pedantic UI nut jobs know its not native. But they are a minority.
On the flip side there are plenty of native apps that have all sorts of issues on Windows as well. Just look at any "install problems" section on a game forum.
If information wants to be free, why does my internet connection cost so much?
Let me introduce you to Firefox on Windows - 32-bit only.
Are you saying that the java classes in .jar are compiled differently for 32 and 64-bit JVM? Bollocks. But yes, the idea of platform independence can be torpedoed by a well aimed .dll hidden in the .jar. Blame the vendor.
That is not what he asked for. He asked for the upper limit to be the available ram. Not some stupid low number suitable only for small apps.
That's because websphere runs by default on IBM's proprietary JVM.
Tiller's Rule: Never use a word in written form that you've only heard and never read. You will end up looking foolish.
Call the wahhhmbulance! Dude spend any time in .NET and you will learn to appreciate Java. Try porting any non-trivial .NET app to 64 bit. Have fun with that. Once COM comes in to the picture (and you can never avoid &*^*&^*&^ COM even now in the 21st century) you're already fuked.
I don't necessarily want to use open source. It is more of a company mandate to never write a line of code that is not necessary. Me, I would prefer to write something that does A myself in a day, having full knowledge of how it works and be certain it works with our system rather than spend weeks trying to understand and integrate a package that does A-Z, where only A is required, but does not quite work in the way that our system needs it to, and fails in various difficult to troubleshoot ways deep in the heart of some code three dependencies deep.
If you are not allowed to question your government then the government has answered your question.
Right, and while one might think that that would be an easy and logical thing to do, it turns out that there are very few (if any) situations where raising the -mx to that of available RAM is the right thing to do. That said, I admit that the the defaults today are somewhat messed up too, but raising the default limit to the total RAM is an even worse idea.
So how many years experience in it do I need to get a job?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
you are joking, right? I can't tell for sure.
Or are you really complaining from a problem in year 2001?
"I think this line is mostly filler"
Were java's promises different in 2001 than 2014? No. It only takes one counterexample to execute a tautology.
-Clio
Karma: Bad (mostly from not giving a fuck)
Blog: http://clintjcl.wordpress.com
Try to use PKCS12 in windows 64bit jvm and see how far you get. Hint: it's non existent because the original code is C and nobody's bothered to compile it because "they didn't have a 64 bits smartcard to test it on"
sign(c14n(envelop(this)), x509)
Any program that uses JNI and bundled libraries, i.e. anything that uses SWT like Eclipse _is_ bound to the architecture of the native library.
Shouldn't java -d32 -version:1.7 -jar myapp.jar on Windows make Java use any installed 32bit Java 7 runtime without the User having to specify the full path to the installation directory?
I have about 10 different java versions installed on my windows 7 computer at work. When I want to use one particular version of java I run a script to set JAVA_HOME, PATH, etc.. to the appropriate java. Ditto if I'm working on Solaris, Linux, or any other system.
I'm not exactly sure how this could be: "Java is my main language & I end up using it for almost everything" without knowing how to handle multiple java versions in windows.
I do think it would be nice (if possible) to install 32bit and 64bit and have the exe determine which jvm to use.
In terms of UAC, why aren't you launching java.exe as administrator and bypassing the uac headaches..or simply turning UAC off?
You didn't follow the guidelines somehow, and the implementation became less flexible with how much it was prepared to do for you. I remember something like this also, but didn't blame Java.
What part of "we inherited this disaster during a company buy-out" did you miss? Nor are most of the issues not "follow(ing) the guidelines" - some of the Java 1.3/1.4 calls have been totally removed, or revised.
StarTrekPhase2 - The Five Year Mission Continues!
IBM WebSphere was always tightly tied to specific versions of Java. My guess is that as an "enterprise" application, they decided to rely on "enterprise" vendors that have a tendancy towards this kind of stupidity. Using mostly Apache projects you don't tend to run into these problems.
And you guessed correctly. So... IBM WAS, Oracle App Server/WebLogic with IBM Java, and Oracle (pre-Sun purchase) Java - plus good ol Sun Java in the mix. Each (of the first two) to use specific libraries written by FileNet (not IBM - IBM cleaned things up in later releases *after* they bought FileNet) or for OAS. :-/
StarTrekPhase2 - The Five Year Mission Continues!