News for hackers. Stuff that matters.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by jonstewart on Monday October 07, 2013 @08:52AM (#6507851)
Beefs with this article:

1. Runtime-linking _is_ dynamic linking, and it's a PITA that Java doesn't have an option for static linking, especially given the inherent fragility of the CLASSPATH.

2. clang and gcc have compatible command-line option syntax.

3. The options example he lists for gcc is a pure strawman. Maybe they are necessary to compile that particular source file, but it is not necessary to use all these options in the average case.

4. The article title says "now more than ever", but there's really nothing about recent developments here. This article could have been written ten years ago.

This really just seems like crappy linkbait.

Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by gresrun on Monday October 07, 2013 @08:58AM (#6507877)
> 1. Runtime-linking _is_ dynamic linking, and it's a PITA that Java doesn't have an option for static linking, especially given the inherent fragility of the CLASSPATH.

It is possible to roll a 'fat' JAR with all your dependencies baked-in, which is as close to static linking as it gets in Java-land. I prefer this for stand-alone applications as it makes deployment a cinch at the expense of the size of the build artifact.

Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by jebblue on Monday October 07, 2013 @10:02AM (#6508255)
Agreed, this is how I do my Java standalones. Eclipse makes this easy with Export | Runnable Jar providing several options for how to package the build.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by danieldk on Monday October 07, 2013 @10:08AM (#6508300)
The Maven assembly plugin can also do this with the 'jar-with-dependencies' descriptor.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by gresrun on Monday October 07, 2013 @11:09AM (#6508705)
I personally use the maven-shade-plugin for this because it has built-in support for handling special resource files like licenses, service definitions, and manifest entries.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by agibsonccc on Monday October 07, 2013 @11:27AM (#6508828)
The maven shade plugin can be dangerous if you hit the zip file limit of 65535 entries. Watch your filters.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by yaeger on Tuesday October 08, 2013 @04:23AM (#6513613)
I wonder how such a setup would play out in regards to Open Source usage.

Say you create a big jar with all dependencies in there in several layers of "lib" folders.

Licenses like LGPL say you have to keep the LGPL archive accessible to the user and grant permission for them to alter/update them.

Would a nested hierarchy of lib folders inside your jar be viewed as hindrance? Certainly you didn't "hide" the LGPL'd components in order for the user to not alter them but I think it could be viewed as "security through obscurity". If I don't immediately see a component, how do I know its there? I guess this could be solved by a readme that lists in detail what open source components are used and where in the hierarchy they can be found.

Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by jonstewart on Monday October 07, 2013 @12:09PM (#6509172)
Yeah, I've used jarjar before for this.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by latk on Monday October 07, 2013 @08:58AM (#6507875)
Good point(s), especially #4. The article compares an 80s language (C++) to a 90s language (Java), not to more recent compiler toolchains. Admittedly, there aren't many options here, and e.g. Scala (which I hope will be covered in future articles) relies on the java toolchain.

Edit: C++ and Java also have different cultures. The simplest compilation with g++ is "g++ foo.cpp -o foo", which isn't much more complex than "javac Foo.java". The fine-grained options clang/g++ give you are part of the “you pay for what you use”-mentality of C++.

Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by pjmlp on Monday October 07, 2013 @11:48AM (#6508992)
Except there are 70's languages (Modula-2), 80's (Ada) and 90's (Turbo Pascal/Delphi), that offered more powerful compiler toolchains.

However, given C++'s requirement to be kept compatible with UNIX toolchain model, we suffer from a 70's model in C++.

Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by jevinskie on Monday October 07, 2013 @11:01AM (#6508658)
Regarding #1, Java 8 allows for static JNI linking. http://openjdk.java.net/jeps/178
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by pron on Monday October 07, 2013 @11:52AM (#6509031)
Cool. Did not know that.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by diminish on Monday October 07, 2013 @08:59AM (#6507883)
Moreover, their own banner ad at the bottom is ironic. "Java is cured, suffering from redeploy madness. Get your cure".

http://zeroturnaround.com/wp-content/uploads/2013/09/660x122...

Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by pekk on Monday October 07, 2013 @10:08AM (#6508304)
Didn't you hear that all that changed since Twitter switched, and now it rocks more than ever?
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by th0br0 on Monday October 07, 2013 @08:58AM (#6507876)
Most importantly, his gcc example is taken from OSX... ugh.
Re:Why Java Now Rocks More Than Ever: Part 1 – The Java Comp... by Roboprog on Monday October 07, 2013 @10:55AM (#6508608)
As the guy says he is writing music software, Mac OSX would be a pretty important platform to cover.

That said, I'm a recent convert from Linux to OSX, and I like to tinker with Garbage Band from time to time :-)