netbean java找不到类,Netbeans / java:无法找到或加载主类库

I'm trying to setup my development environment on Linux Mint after an unfortunate reinstall of my whole computer due to some windows troubles. For the development of the Java program I use Netbeans. I allready installed all dependencies and external libraries. However when I'm trying to run the program I get the following output:

ant -f /home/***/Documents/ebart/git/projecten/nedap/Next -Dnb.internal.action.name=run run

init:

Deleting: /home/***/Documents/ebart/git/projecten/nedap/Next/build/built-jar.properties

deps-jar:

Updating property file: /home/***/Documents/ebart/git/projecten/nedap/Next/build/built-jar.properties

compile:

run:

Error: Could not find or load main class library

Java Result: 1

BUILD SUCCESSFUL (total time: 0 seconds)

I already tried to make it work with openJDK, orcacle(normal) JDK, Ubuntu 15.04, Linux Mint, Netbeans 8.0.2, Netbeans 7.0...?1 or 2? but it doesn't make a difference. Also google couldn't provide me with a solution.

The strange thing is that my main class is called "Next" and I'm fairly sure that I selected the right Main Class (com.bata.ebart.next.Next). I suppose it has something to do with that java cannot find its main libraries(http://en.wikipedia.org/wiki/Java_Class_Library) but I'm not sure about that. Also I am not into that and therefore I have no clue what to do.

Does someone know how to solve this issue or help me in the right direction?

解决方案

And the solution lays in a VM Options. I already added the VM Option -Djava library path="/usr/lib/jni/" to make librxtx-java work (according to this post). Removing this VM Options fixed my problem. I haven't tested if I still can connect to my serial device (the reason why I'm using librxtx-java) because I don't have my serial device over here.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值