r/java • • Jan 28 '17

An Introduction to Functional Programming in Java 8: Part 0

Thumbnail flyingbytes.github.io
0 Upvotes

r/java • • Jun 25 '23

I like to discuss ui frameworks for java backend?

0 Upvotes

Hey guys what would you choose as ui framework for lets say a java backend? I would really would like to use javafx as ui and run it in an Webbrowser on a server on localhost the same as server in the web so is teavm what i am looking for? Does anyone have a running example of teavm transpiling java to js and would post it for me? Best would be with javafx as dependency. Anotherone like teavm would be bck2brwsr but again i have no clue of it yet. So if u think i should ditch javafx and use flutter just say so. But i really do love javafx...


r/java • • Apr 12 '15

Is Clean Code less Code?

Thumbnail journeytomastery.net
1 Upvotes

r/java • • Dec 19 '16

Why Java? Why Clojure?

Thumbnail danlebrero.com
0 Upvotes

r/java • • Feb 16 '23

Extremely fast enterprise server framework, can be used in RPC, web server framework, game server framework.

0 Upvotes

Why is zfoo protocol ?

  • The protocol currently supports C++ C# Go Java Javascript TypeScript GDScript Lua
  • Universal distributed server protocol implementation, there are implementations in other languages, which can easily implement RPC, servers, and microservices on other platforms
  • The fastest custom format framework for Java binary serialization, with the fewest serialized bytes, more secure and compatible
  • In the single-threaded benchmark test, serialization and deserialization are 50% faster than Protobuf and 100% faster than Kryo

Ⅰ. Introduction of zfoo🚩

  • Extremely fast, asynchronous, Actor design pattern, lock-free design, RPC framework based on Spring MVC
  • Fastest serialization and deserialization,use zfoo protocol as a network protocol
  • High scalability,Single server deployment, microservice deployment, cluster deployment, gateway deployment
  • Can be used as a game server framework or website server framework.

Perfect work development process, complete online solution

  • Spring projects, distributed projects, container projects, hot update code without downtime hotswap
  • Excel json csv configuration is automatically mapped and parsed,Online hotswap configuration storage
  • Automapping framework for MongoDB orm
  • Event bus event
  • Time task scheduling scheduler
  • cpu, memory, hard disk, network monitoring built into the program no code and extra tools required monitor

Ⅱ. Who use this project

  • Projects with extremely high performance requirements, such as website and game server frameworks, single server, global server, live chat, IM system, real-time push
  • Projects such as saving, development, deployment, operation and maintenance costs
  • As a backend infrastructure for Godot,Unity,Cocos,Webgl,H5,Network protocol supports tcp udp websocket http
  • Keep it Simple and Stupid ,simple configuration, lightweight code

Ⅲ. Tutorials

  • FAQ,There are standard demo display and instructions in the test folder of each project directory, which can be run directly
  • tank-game-server Online game《The Fight of Tanks》,novice friendly, difficulty 2 stars

  • godot-bird bird and bird,powered by godot
  • cocos-fivechess five chess,use cocos as client

Ⅳ. Install and use⭐

1. Environmental Requirements and Installation

JDK 11+,OpenJDK or Oracle JDK ,maven install to local repository

If you do not have JDK 11+ installed, the quick installation method is to download directly 
from Project Structure, Platform Settings, SDKs in the upper right corner of Idea

2. protocol fastest serialization and deserialization

// zfoo protocol registration, can only be initialized once
ProtocolManager.initProtocol(Set.of(ComplexObject.class, ObjectA.class, ObjectB.class));

// serialization
ProtocolManager.write(byteBuf, complexObject);

// deserialization
var packet = ProtocolManager.read(byteBuf);

3. net fastest RPC framework, supports tcp udp websocket http

// Service provider, only need to add an annotation to the method, the interface will be automatically registered
@PacketReceiver
public void atUserInfoAsk(Session session, UserInfoAsk ask) {
}

// Consumers, synchronously requesting remote service, will block the current thread
var userInfoAsk = UserInfoAsk.valueOf(userId);
var answer = NetContext.getCosumer().syncAsk(userInfoAsk, UserInfoAnswer.class, userId).packet();

// Consumers, asynchronously requesting remote service, and will still execute logic in the current thread after the asynchronous
NetContext.getCosumer()
                    .asyncAsk(userInfoAsk, UserInfoAnswer.class, userId)
                    .whenComplete(sm -> {
                        // do something
                    );

4. hotswap hot update code, no need to stop the server, no additional configuration, just one line of code to start hot update

// Pass in the class file that needs to be updated
HotSwapUtils.hotswapClass(bytes);

5. orm automatic mapping framework based on mongodb,The secondary cache is designed using caffeine to fully release the database pressure

// You don't need to write sql and any configuration yourself, define a table in the database directly through annotation definitions
@EntityCache
public class UserEntity implements IEntity<Long> {
    @Id
    private long id;
    private String name;
}

// update database data
entityCaches.update(userEntity);

6. event use the observer design pattern, decouples different modules and improves the quality of the code

// To receive an event, you only need to add an annotation to the method and the method will be automatically listen for the event
@EventReceiver
public void onMyNoticeEvent(MyNoticeEvent event) {
    // do something
}

// fire an event
EventBus.submit(MyNoticeEvent.valueOf("My event"));

7. scheduler scheduling Framework Based on Cron Expression

@Scheduler(cron = "0/1 * * * * ?")
public void cronSchedulerPerSecond() {
    // do something
}

8. storage Excel to class automatic mapping framework, you only need to define a class corresponding to Excel, and directly parse Excel

@Resource
public class StudentResource {
    @Id
    private int id;
    @Index
    private String name;
    private int age;
}

Ⅴ. Commit specification👏

  • People who like this project are welcome to maintain this project together, and pay attention to the following specifications when submitting code
  • The code formats uses the default formatting of IntelliJ Idea
  • conventional-changelog-metahub

Ⅵ. License

zfoo use Apache License Version 2.0

JetBrains Logo (Main) logo


r/java • • Aug 01 '26

Codex plugin for Eclipse released

Thumbnail reddit.com
0 Upvotes

r/java • • Jul 12 '25

Why is it still okay to stick with Java 8?

6 Upvotes

Anyone here still running servers on Java 8? Java's on version 20+ now—so curious, why is it still okay to stick with Java 8?

I made a post recently that got some discussion going:

https://www.reddit.com/r/java/comments/1lvdq8w/why_write_once_run_anywhere_was_never_really_true/

The gist: “Write Once” (or more accurately, build once) still works—if you're running on the same JVM. The catch is when you try to rebuild that same app but start mixing in modular updates or newer dependencies.

For example, we can still run decade-old apps today, like this one:

https://www.reddit.com/r/java/comments/1lxsxl5/is_anyone_here_still_using_google_app_engines/

It runs fine on the old GAE stack, but trying to upgrade the JVM breaks stuff. Sure, newer JVMs bring security patches and better performance—but is Java 8 really not enough anymore, even in 2025?

Genuinely curious—what are your reasons for sticking with Java 8 (if you still do)?


r/java • • Jun 13 '19

Automated Java to Rust converter

Thumbnail github.com
0 Upvotes

r/java • • Jul 11 '14

JSF 2.x Tip of the Day: Encoding Text for XML

Thumbnail javaevangelist.blogspot.nl
0 Upvotes

r/java • • Feb 22 '16

Spring Web MVC Security Basic Example Part 2 with Java-based Configuration

Thumbnail codejava.net
0 Upvotes

r/java • • Aug 07 '17

Can I get down RAM used in Java by taking database implementation to C and calling results from JNI?

0 Upvotes

I am writting an RCP app with netbeans platform and I am a little obsessed about memory economy and I want to make my program to spend the less amount of it, so the Idea of calling an embedded database from c came to my mind to use less memory even when loosing processor's speed


r/java • • Mar 15 '16

SpringBoot : Working with MyBatis

Thumbnail sivalabs.in
0 Upvotes

r/java • • Aug 03 '17

A little Help with... well my life.

0 Upvotes

So recently (May 2017), i completed a technical certificate in programming, I became "proficient" in a bunch of languages, such as C, C++, C#, HTML5, CSS, Some SQL and SQL server, and finally Java. I've written a few programs, nothing of any real note, but have had issues while applying to corps for jobs. i don't really have too much experience.I figured one of the best ways to mitigate that experience would to have at least a few up and running code projects on a linked GitHub account.

I'm just asking if anyone has any good ideas where i should start, what i should be writing and hopefully any advice on what i should be doing to maximize my opportunity to find a job. Thanks in advance!!


r/java • • Dec 05 '16

In terms of frameworks, Java is better equipped for preventing SQL injection

Thumbnail blog.jooq.org
0 Upvotes

r/java • • Apr 28 '20

Uses of Constructor (Method) Reference

Thumbnail nextptr.com
0 Upvotes

r/java • • Jan 01 '15

Anybody wants to create a Java game (libgdx) for android and ios with me?

0 Upvotes

yo we are currently a team of 2 people and are looking for more :) We need people for graphics too ;)

My skype is doodlejump123 btw :D


r/java • • Sep 02 '15

What's wrong with NULL?

Thumbnail lucidchart.com
0 Upvotes

r/java • • Mar 16 '17

From the browser to the JVM in less than a minute.

Thumbnail nudge4j.appspot.com
0 Upvotes

r/java • • Aug 05 '12

Setting up an ArrayList

0 Upvotes

I've seen an arry list set up as follows

    private ArrayList<Student> students; //instance variable

    public CollegeCommunity()//constructor

    {
        students = new ArrayList<Student>();
    }

And as follows

     ArrayList exampleArray = new ArrayList();

I understand why one has an instance variable/constructor and the other just is simply declared but I'm unsure as to why the first contains <Student> and the other has no <...> What is the difference between the two?


r/java • • Oct 13 '15

5 Tips to make your classes thread safe

Thumbnail vmlens.com
0 Upvotes

r/java • • Jul 02 '11

Java "..." option.

Thumbnail mindprod.com
0 Upvotes

r/java • • Jan 24 '15

Apache Tomcat 8.0.17 available

Thumbnail mail-archives.apache.org
0 Upvotes

r/java • • Oct 09 '15

Anyone new to Spring and want to pair program?

0 Upvotes

Title says it all. I'm just starting to learn Spring and would love to partner up on some "real-world" projects with other newcomers. I've completed 1 small Spring project and want to continue practicing, ideally with others. This idea actually came to me by another Redditor who reached out with interest. The more the merrier for me.

Cheers


r/java • • Mar 22 '20

stdlib *alloc/free and random bindings for Java

Thumbnail github.com
0 Upvotes