Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Cannot import external jar file in Rational Software Developer Platform

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all:

I have struggled with this for a while -- this is semmingly such a simple and common task, which is really frustrating.

I have build a dynamic web project, I want to import an external jar file. I used Rational Software Developer Platform's utility to import the jar file, and I can see it right there in my project (under java resources). When I instantiate a class in this jar file, the context sensitive editor recognizes the class (it would auto-complete the statement, for example). So far so good. But, when I try to run the project, I got a javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError.

It sounds like the compiler is able to recognize the jar file, but it is not in the runtime classpath. I've struggled for a few hours now and could not get it to work, any ideas?

Any help will be much appreciated.

Thanks,
Walter
 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to set the runtime dependencies (manifest.mf) for the jar that wants to use the other jar. You can do this by right clicking on the jar that contains the code to be executed.
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic