Have you tried looking at the menu code to see what it does to shutdown the EV3?https://sourceforge.net/p/lejos/ev3/ci/ ... java#l2053
Remember you are simply on a Linux system now, so you can do stuff like this just using standard Linux commands. What is it you are doing that requires a Java program to close down the EV3?
Thank you for your great advice. That is a solution of my problem.
While, actually, the same idea came to my mind after I posted this question.
But I still want to use things provided by leJOS if there is anything available because I consider that as the "standard" way when developing by leJOS.
I am building a robot pet and hope it could shut itself down when the battery went low which make the brick shut itself down suddenly, so that the program could save some data of status to file before the brick down.
By this way, a shutdown or battery change would be just a nap for the robot pet instead of a death/rebirth.
I think adding a shutdown method into Brick interface would make leJOS for EV3 easier to use especially when making robot like I am building and more compatible with leJOS for NXT.
By the way, building an electronic version useless box also need a shutdown method.
I made one by NXT some years ago. You can find how it works here (from 00:28): http://v.youku.com/v_show/id_XMjM1NDk2Njgw.html
(Video in Chinese)