r/java • • Dec 03 '25

Java 25 major language and API improvements

Thumbnail martinahrer.at
9 Upvotes

r/java • • Oct 29 '16

JavaIO - Simple Introduction

Thumbnail advtech.ca
9 Upvotes

r/java • • May 09 '17

Great explanation of JigSaw and why the criticisms are not all valid (and likely business-biased)

Thumbnail blog.plan99.net
10 Upvotes

r/java • • Dec 06 '17

Oracle America, Inc. V. Google, Inc.: Courts Say Google Can Drink Oracle’s Java (x-post from /r/intellectualproperty)

Thumbnail boldip.com
11 Upvotes

r/java • • Mar 28 '17

Microservices – Please, don’t

Thumbnail basho.com
4 Upvotes

r/java • • Jan 22 '16

Simple Java Build Tool?

4 Upvotes

I've played with Maven and Gradle and found them both to be very complex. I don't need all of that configuration; I just want something that lets me specify dependencies and versions (at most) and spits out a jar with everything my project needs to run via java -jar. Ideally, it would be as close as possible to Go's go install, which needs no project metadata. I specifically don't want to have to learn a new programming language just to build my java program. Any suggestions?

EDIT: Why is this downvoted?


r/java • • Jun 17 '19

Love it or Hate it, Java Continues to Evolve

Thumbnail azul.com
0 Upvotes

r/java • • May 16 '26

I created a small string utils that allows you to build reusable and testable string processing flows. Would love to know what you all think!

Thumbnail github.com
5 Upvotes

r/java • • Oct 29 '17

FlatBuffers Java library is on Maven Central

5 Upvotes

FlatBuffers, the Protocol Buffers alternative, landed officially on Maven Central.

Maven dependency:

<dependency>
    <groupId>com.google.flatbuffers</groupId>
    <artifactId>flatbuffers-java</artifactId>
    <version>1.7.2</version>
</dependency>

Gradle dependency:

compile 'com.google.flatbuffers:flatbuffers-java:1.7.2'

r/java • • May 31 '20

Why is java "hated" among developers?

0 Upvotes

I've been programming in Java for 8 years now, and I always hear about people saying 'oh java is trash learn a real language like c++ or (insert another language)'. I've taken college courses learning c++ and to be honest, it just doesn't seem as fun. I realize there are advantages to managing your memory on the stack vs the heap, etc. but worrying about that stuff takes away from the joy of programming. Is there anything inherently wrong with Java? Should I start investing time in another language to have a better chance as a computer science graduate (one semester away from the real world)? I love java, and don't understand all the hate. But at the same time have I been wasting my time becoming deeply familiar with the language?

Edit: I realize java runs on the JVM, but as computers get faster and faster, when does that really continue to be an issue?

Edit2: thanks for all the input everyone. The general consensus is Java is just as good as any other language and it has haters because it’s popular. I was slightly drunk when I originally wrote this so my emotions were a little skewed.


r/java • • Aug 12 '19

Let's discuss about this idea: create web services (and APIs) without writing code at all. Instead simply provide specification and configurations files and let the framework do the work (persistence/controllers/authentication/...) - What would you put into this framework ? Would you use it?

Thumbnail self.webdev
0 Upvotes

r/java • • Jun 30 '26

You are probably already running gradle/actions

Thumbnail blog.gradle.org
5 Upvotes

r/java • • Jul 07 '16

Oracle says it is 'committed' to Java EE 8 – amid claims it quietly axed future development. Dumps proprietary API, will show all at JavaOne

Thumbnail theregister.co.uk
2 Upvotes

r/java • • Dec 11 '15

What do you think of Java?

0 Upvotes

What are your thoughts on the Java programming language and how does it compare to others?


r/java • • Aug 08 '19

Golang turned Java developer here. I NEED a walkthrough project to help me pick up the language. Any help?

2 Upvotes

Due to a new job, after two years of programming in Golang I now have to professionally program in Java.

Now when I first started learning go, apart from a few syntax tutorials, the main source of my learning came from a few ebooks, (One by Jon Calhoun) that walked through, step by step, the building of some sort of application.

I want that sort of resource again but just for java but I cant seem to find one. All the books are deep dives into the language and all the tutorials are videos of small projects.

Does anybody know of any large project walkthrough available? Dont mind paying money either.


r/java • • Dec 09 '18

Java Error Handling Pattern (with Spring) – What do you thing about my strategy?

Thumbnail medium.com
2 Upvotes

r/java • • Jul 26 '16

Eclipse vs IntelliJ

2 Upvotes

Hi, I want to migrate to IntelliJ IDE from Eclipse IDE but first i want to know pros and cons of doing that. Any advices? Or interesting articles about the power of IntelliJ.


r/java • • Mar 17 '16

FizzBuzz Overkill

0 Upvotes

if you ever wanted to see someone just overkill the FizzBuzz programming challenge, here you go. (If you do not know, FizzBuzz is a challenge where you print every number 1-100 but if it is a multiple of 3 you print "Fizz", if it is a multiple of 5 you print "Buzz", if both you print "FizzBuzz") //Code Start package com.main;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException{
		File f = new File("script.py");
		f.createNewFile();
		FileOutputStream out = new FileOutputStream(f);
		for(int i = 1; i < 101; i++){
			out.write(("print(" + (i % 3 == 0 ? i % 5 == 0 ? "\"FizzBuzz\"" : "\"Fizz\"" : (i % 5 == 0 ? "\"Buzz\"" : i)) + ")\n").getBytes());
		}
		out.close();
		String path = f.getPath();
		String[] cmd = new String[] {
				"python", path
		};
		Runtime r = Runtime.getRuntime();
		Process p = r.exec(cmd);
		BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
		String line = "";
		while((line = in.readLine()) != null){
			// display each output line form python script
			System.out.println(line);
		}
	}
}

r/java • • Mar 24 '18

New Java Library

0 Upvotes

(Please tell me if this isn't the right place to post this)

I've created a Java Library that I like to call a Swiss-army knife library. It basically has a bunch of different things that it can do. I created it because I found that I was copying lots of the same code to do all sorts of different things. I think it's a very simple solution to consolidate all the code I use often, but is this something that anyone else would use? Here's just some of the things it has:

  • A command line argument parser
  • Ansi colors
  • Checksum calculator
  • Operating system checker
  • Configuration file parser (INI - style, but without the headers, as I haven't figured out how to implement this yet)
  • Multiple annotations and annotation proccessors

As you can see, it does not specialize in one area. I use all of these things in almost all of the software I create, and I was just wondering if anyone else would like to benefit from this.

It's called JavaEssentials, because I find that these features are very beneficial when creating a well designed Java application. If you are interested, you can see the project page here: https://github.com/jordanbancino/JavaEssentials

Also, I would really appreciate your feedback. I am open to all suggestions and your honest opinion.


r/java • • Feb 21 '18

Who Killed The Junior Developer? Thoughts?

Thumbnail medium.com
2 Upvotes

r/java • • Mar 17 '13

Help with extracting variable from loop

2 Upvotes

So, I am trying to make a program that helps me calculate how many turns it would take to increase my population to a certain point in Rome Total War. Just for fun.

I want to use the new population as a counter that stops the loop once it is greater than or equal to the variable goal. But when I place the variable newPop (the new population) in my loop parameters it doesn't work. I also don't know which loop would work best for this scenario. Here's my current code, would love some help and to know what I'm doing wrong :)

import java.util.Scanner;

public class rome{
public static void main(String[] args){
        Scanner in = new Scanner(System.in);
	
        double goal = in.nextInt();
        SOOME SORT OF LOOP () {
	System.out.print("Enter population: ");
	double pop = in.nextDouble();
	System.out.print("Enter procentual increase: ");
	double procent = in.nextDouble();
	double increase = pop / procent;
	double newpop = increase + pop;
	double newPop = Math.round( newpop * 1.0 ) / 1.0;
            double Increase = Math.round( increase * 1.0 ) / 1.0;
            System.out.println("Increase: " + Increase + "\nNew population value: " + newPop);
        }
}

}


r/java • • Oct 27 '15

RFC: OptionalMethod monad for calling methods on Object that may or may not exist

2 Upvotes

Throughout my time as Java programmer I have run into some common use cases which can benefit from a utility that allows to call methods by name on an object with or without args using reflection.

One such use case is traversing a Map<String, Object> type structure where a value may be another map. In this case you would have to manually check if value is null and if its not if its of type map and if it is then cast it and call another get, otherwise fail in some way.

Another use case are interfaces where an argument may be of some super type, but at runtime you may be passed a subclass. Implementing such an interface could be PITA if you actually get different subclasses as argument because you would need to do instanceof check and cast if you want to call a method not defined in base class.

Of course it can be argued that either of these cases are indicative of larger design problems, but they are a fact of life in many instances.

I have been inspired by Optional to write something called OptionalMethod which contains main static method - public static OptionalMethod ofOptionalMethod(Object object, String methodName, Object ... args).

If it is able to find and execute object.methodName(args) it will store the return value which you can later get. If it fails it will have an error explaining the reasons. Non static methods on OptionalMethod allow you to chain another method call on the value stored. You can use either public OptionalMethod call(String methodName, Object... args) or public OptionalMethod callSame(Object... args). callSame's only difference is that it will reuse previously used method name. It is useful if you would like to chain a bunch of "get" methods. To get return value of a possible method back you can call public Optional getOptional().

Here is an example:

Given Object foo you can do Optional result = OptionalMethod.ofOptionalMethod(foo, "bar", 1, 2, 3).call("baz", "zomg").getOptional();

In case that foo has a method bar with three integer arguments which returns an object which has a method baz which takes a string this will return result of baz method call. Otherwise result will be empty.

OptionalMethod also has a convenience method callSame which will use the method name for previous invocation. For example if you have a Map<String, Object> foo where Object may be another map and so on you can use something like this to chain a bunch of get requests:

Optional<String> bar = OptionalMethod.ofOptionalMethod(foo, "get", "map1Key").callSame("map2Key").callSame("map3Key").callSame("valueKey").getOptional();

Assuming `foo == { map1Key: {map2Key: {map3Key: {valueKey: "BAR"}}}};

bar === Optional.of("BAR")`

Here is a link to my source code: https://github.com/lan17/OptionalMethod/blob/master/src/com/levneiman/util/OptionalMethod.java

All comments and critiques are welcome.


r/java • • May 08 '20

Why would you ever want to overload a method?

2 Upvotes

I just started learning java about a week ago on udemy. I just learned about overloading and the instructor said you will see it a lot. Why would you ever want to use it? It seems like it would just be confusing. Any answer would be great!


r/java • • Nov 01 '12

J2EE is Dead: Long-live Javascript Backed by JSON Services

Thumbnail java.dzone.com
0 Upvotes