Live data from Hacker News

Java Pain

tbray.org

21–30 of 151 posts

Re: Java Pain

#21
tl;dr: Missing certificate in keystore. It'd be helpful to know the details; it's hardly an issue limited to Java (although it's harder to bypass certificate checking than in, say, curl)

Re: Java Pain

#22
post #11

How is the classpath problem different from manually specifying the -L and -I compiling that little c program exactly?

-L and -I are specified at compile time, so if you distribute/deploy a binary the runtime doesn't have to care (except in the case of dynamic linking - eek!) $CLASSPATH is purely runtime, so it's all the fun of dynamic linking, all the time. Monolithic shaded JARs can solve this problem but introduce some of their own.

So someone has already gone to the effort of specifying them. In that case the analogous java situation is downloading a packaged jar and running java -jar mything.jar

Re: Java Pain

#23

you're kidding me, right? rhodey@rhodey$ mvn package rhodey@rhodey$ java -jar .jar

I don't think you read the article. You don't address his certificate issues. Your solution also requires writing a pom.xml which is non-trivial.

Re: Java Pain

#24
post #14
post #8

Earlier quoted context omitted.

I have always had the feeling that JVM is very stable, but I don't have much Java experience. Is that a wrong assumption?

Stable != Convenient to develop with.

Right, of course. Been working a lot with the Swift compiler so I was in some state of mind where I associated interpreter/compiler pain with faults and crashes :)

Re: Java Pain

#26
This is what I hear: "I am java newb and it doesn't work!" . Its true that other languages are simpler but he is missing the point why in java you have explicitly set classpath. Java allows not only for having multiple versions of libraries on the system with no installation whatsoever, but allows running components requiring those different versions of same lib in the same process (OSGi).

Re: Java Pain

#27

Without the code and error message, this is just a rant from some (famous) guy who can't/won't figure out his tools. First of al­l, it took me for­ev­er to fig­ure out the ja­va command-line in­can­ta­tions to tell it that it need­ed my project’s class files and the json.org li­brary (which I’d al­ready down­load­ed so I could com­pile the suck­er). Yeah, I used to know that stuff ten years ago, but there re­al­ly sh…

I'm no fan of Java, but in this case I have to say I don't have much sympathy for Bray. Yes, running Java from the command line is a huge pain, especially if you haven't done it in ten years. Yes, it should be possible. But it can't be intuitive to everybody because people have conflicting ideas of what the intuitive thing would be. Yes, you will have to run "java -help" to figure it out, or package everything in a .jar file.

Re: Java Pain

#30
post #20

´./gradlew run´ Good luck trying to compile a C project without autotools/make either.

It's not that hard. I believe in you. gcc test.c -o test

That's not much of a C project. If that's the standard, then Java is a breeze:

javac Test.java

Easy to run, too:

java Test

Post reply on HN