Codigo jar não executando no cmd

Estou começando a mexer em java, desculpe a pergunta de iniciante.

Estou tentando transformar esse código que esta em .java em .jar:

class main {
public static void main (String[]args){

    System.out.println("Ola mundo");


Eu já tentei de tudo e já procurei em vários lugares inclusive aqui e quando tento usa o código no cmd da o erro: Não foi possível localizar nem carregar a classe principal, mesmo os arquivos estando dentro do arquivo .jar e o manifest estando correto: Main-Class: Main.

Meaning of “callee is too large” in jvm +LogCompilation output

So in the output of +LogCompilation there are messages printed

callee is too large


too big

associated with specific methods (and the decision by the compiler not to inline).

But isn’t the “callee” the method itself? What else could it mean?
And if so, what’s the difference between “callee too large” and “too big” – wouldn’t they mean the same thing (maybe it’s just a legacy log message, 2 engineers using different language for the same thing?)

Or is it possible that “callee” really means “caller”?
Either reason would be legitimate for not inlining.
I’m a bit embarrassed that I don’t understand this.

How to get drive letter of current running program in Java without using getRoot() [duplicate]

This question already has an answer here:

The only solution I’ve found to do this is this, using the getRoot() method, but it requires a reference to a file on the drive. That won’t work for me, because my program needs to know the current drive letter that it’s located on before it can reference any other files in the directory. Is there any better way to do this on a Windows system?

Spring session how to change Session_id value (token)?

Nowadays I am developing with a little proyect which uses spring security and spring session. When the user is authenticated in the system with spring security (basic Authorization), spring session creates the user session automatically within a table named SPRING_SESSION (and other two tables). The main table is formed by the
fields follow: SESSION_ID, CREATION_TIME, LAST_ACCESS_TIME, MAX_INACTIVE_INTERVAL and PRINCIPAL_NAME. Like in the I have selected the propperty, then spring session creates and use the tables automatically.

I want to use JWT like a token in the system, because it is generic. however the user want to have a session table everytime to manager the users. I want to user SPRING_SESSION, for this reazon I want to change the SESSION_ID value (token) by the JWT. I have looked for how to do it (change the SESSION_ID that Spring session create by default, and change it by a custom value), but I did not luck, I do not know if it is possible.

Thanks for your time.

Concurrency in Netty

I’m implementing ChannelInboundHandlerAdapter and have a question about concurrency. Is it necessary to make it thread safe? I mean I have to store some state for each client per their session.

public class Impl extends ChannelInboundHandlerAdapter{
    private List<Integer> someState;

    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        int size = someState.size();  //Should I worry about memory consitency here?

The thing is from request to request the channelRead method is invoked by different threads I have to put some memory barriers.

Is it necessary? Or Netty takes care of it by itself?

Weka, how should I construct a new arff file based on my txt file?

I have a txt file formatted like this:
326379831954661376 N Glad I’m taking olanzapine or I’d be evem more.
The first one is ID, and a tab to separate each column, second one is classifier (only N or Y), and third one is message.
And I want to add an attribute like olanzapine, how can I build a arff formatted file like @Attribute olanzapine @data 326379831954661376,1,N? Are there any ways allow me to do that based on Weka or Java?

Infix to postfix evaluation

How do I convert char to Integer type?

int p2 =(int)stack2.pop();     
  int p1= (int)stack2.pop();       
    int res= result(p2,p1,calStr.charAt(i));   

I did the above method, but getting a runtime error that java.lang.Character cannot be cast to java.lang.Integer

Exception in thread “main” java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Integer