0

I am importing an external jar file to run java real-time system. The package I need to import is the javax.realtime

I was able to get this package in a jar file,when i add this jar file to my project, i didn't get any compilation error, but when run the file, i get error

 Exception in thread "main" java.lang.NoClassDefFoundError: javax/realtime/LateStartException

Any idea what is causing this error?? Is there any additional configuration needed in order for runtime to "find" the jar file?

Thanks...

shennyL
  • 2,764
  • 11
  • 41
  • 65
  • AFAIK, Unless you are using the real time JVM, these packages are unlikely to work for you. – Peter Lawrey Nov 28 '11 at 13:10
  • Hi, is there any JVM supported by windows? – shennyL Nov 28 '11 at 22:47
  • This is a licensed product from Sun/Oracle. It costs $K per CPU and AFAIK, no longer being developed. The problem is there is not enough interest in paying for it to support it. Most of the benefits of using RT4J can be achieved using the plain JVM. – Peter Lawrey Nov 29 '11 at 08:32
  • I found one from oracle named jRockit, is it what you mean by plain JVM?? – shennyL Nov 29 '11 at 09:12
  • JRockit is also owned by Oracle. The teams which developed JRockit and the Sun JVM have now merged and I believe in future Oracle will be releasing just one JVM based on the OpenJDK. – Peter Lawrey Nov 29 '11 at 09:41
  • Hi, I had install the JVM, but not really sure how should I use it.. – shennyL Nov 29 '11 at 11:38
  • Check my answer here https://stackoverflow.com/a/53607666/5372008 – Teocci Dec 04 '18 at 07:31

2 Answers2

0

Realtime behavior is not something you can add to a VM by just adding a Jar file. The way priorities and synchronization are handled is completely different in a realtime JVM. Try JamaicaVM / RTSJ.

imanis_tn
  • 1,150
  • 1
  • 12
  • 33
0

Try including jta.jar. It can be found in the lib/j2ee directory.

Mithun Sasidharan
  • 20,572
  • 10
  • 34
  • 52
  • You probably have servlet.jar floating around somewhere it shouldn't be. – Mithun Sasidharan Nov 28 '11 at 13:00
  • I just wondering is it I am doing something right. The external .jar file is a big package, which in turns consist of many other packages. I include the whole jar file in the library of the project, and import only one package from it. Is this something appropriate? I am very new to java, hope can get some help :) – shennyL Nov 28 '11 at 13:07