Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

jar to jar communication

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends,
i have a problem.
i have created two jar files and i want to use class of one jar file in another jar file
consider J1.jar and J2.jar are the two jar files
J1.jar file contains C1.class and C2.class
J2.jar file contains C3.class and C4.class
Now i want C3 object instantiated in C1
when i tried it gave me an exception :
"NoSuchClassDefError"
reply soon
Deepa Raghuraman
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as both jar files are in your classpath, the classes should be found.
Double-check your classpath settings. Make sure both jars are included - you have to actually include the name of each jar file. It's not sufficient to include the directory where the jar files are located.
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meesa no understand why you have problem wit jar jar!
Are you using the full package name? The objects reside in different namespace, so you have to use the full name or it won't work.
 
eat bricks! HA! And here's another one! And a tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic