Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to run examples in Spring in Action (2nd Ed) book?

 
Ranch Hand
Posts: 420
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded the example code from the book. I was delighted to see that maven will compile it and run almost all the tests (unfortunately, there were not many tests).

I could not make the examples in the book run as is (so far, I've only tried the first hello world example).

To make the hello world example run in eclipse, I had to
(1) Change the xml file to use the old DOCTYPE syntax instead of the new xsd syntax.
(2) Abandon the call to ClassPathResource in favor of FileSystemResource and specify a full path to the xml file.

Now I used maven to compile and download the necessary jar files. I wonder if the maven repository is out of date? If I manually download those jar files, how do I make maven and eclipse compile with (I presume) the newer jar files. Would I use eclipse to import the newer jar files? Now the maven pom.xml specifies a version so we know which version we are compiling against. But what about eclipse? If I drag and drop a later version of the jar file into the eclipse GUI, will eclipse put both jar files in the class path in random order?
Thanks,
Siegfried
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Siegfried,

I ran the "helloworld" and a few others without any problems.
Did not use Maven though, just copied the java and xml files into a new project (I use Netbeans 5.5 with JDK 6).

The JDBC stuff is next.

Herman
 
Popeye has his spinach. I have this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!