JNA example program java.lang.NoClassDefFoundError

前端 未结 3 1058
梦如初夏
梦如初夏 2021-01-19 15:43

I can compile this JNA example code (from step 2 of https://github.com/twall/jna/#getting_started):

package com.sun.jna.examples;

import com.sun.jna.Library         


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 16:14

    Either just remove this line and recompile (which is fine in this case as you just try out some sample)

    package com.sun.jna.examples;
    

    or read up on what packages in java are and how they have to be handled (ChssPly76s Posts as a starter).

    Better choose the second option as sooner or later (probably sooner) you will have to deal with packages anyway. So just take the time now to read up on it.

提交回复
热议问题