How to make use of try-catch and resource statement for closing the connection

I think you should be looking to make Session AutoCloseable rather than your helper class?

Having run into the fact that Hibernate doesn't seem to support AutoCloseable yet I'm assuming that you currently have code along the lines of:

Session session = null;

try {
    session = sessionFactory.openSession();
    ...
} finally {
   if (session!=null) session.close()
}

are you looking to do the following so you don't forget to close the session?

try (Session session = sessionFactory.openSession()) {
...
}

In my project I've created a CloseableSession which implements AutoCloseable and provides access to an underlying Session. Unfortunately, as AutoClosable and Session both have close() methods I couldn't implement both and use a normal delegation pattern.

public class CloseableSession implements AutoCloseable {

    private final Session session;

    public CloseableSession(Session session) {
        this.session = session;
    }

    public Session delegate() {
        return session;
    }

    @Override
    public void close() {
        session.close();
    }
}

Which means you can then do the following and the session gets automatically closed.

try (CloseableSession session = new CloseableSession(
                sessionFactory.openSession())) {
...
}

Although this does mean that whenever you want to use the session you now have to call session.delegate().foo().

As an aside, using a static methods to provide your session may seem like time saver but static methods generally cause problems down the line for unit testing etc and they make it harder to swap out your current implementation with another implementation. I would recommend passing in the SessionFactory or your StuHibernateUtils class where ever it is required.