Solved

How to add a class to the classpath

Posted on 2004-08-16
13
201 Views
Last Modified: 2010-03-31
I have a webapplication that uses jasper repots to generate a report.  The i have my report is as follows:  There is a report file called address.jasper with a scriplet( which is just a java file) called adressscriplet.class

I dont want to add the addressscriplet.class to the WEB-INF/classes directory b/c  i may modify the report and the scriplet and dont want to stop the webapp.  I want to take my new report modifications along with the scriplet and put it in a directory called reports and update it at anytime with out having to stop the application.  
I have tried putting the path in the classpath: ex. CLASSPATH=%CLASSPATH%;c:/reports
with no luck.

Is there a way to do it?

0
Comment
Question by:netizen1
  • 6
  • 4
13 Comments
 
LVL 92

Expert Comment

by:objects
ID: 11816558
> I dont want to add the addressscriplet.class to the WEB-INF/classes directory b/c  i may modify the report and the scriplet and dont want to stop the webapp.

where your class is doesn't really make any difference
0
 
LVL 92

Expert Comment

by:objects
ID: 11816560
is your webapp configured to do dynamic class reloading?
0
 

Author Comment

by:netizen1
ID: 11817384
That is what i was looking at which was dynamic class reloading.  But I dont think it can be used for what i need it to do.  The thing is i dont use the class directly.  The report address.jasper uses the class but i dont want it tied to the WEB-INF/classes.  Here is what i would like to do:

I created a directory called:
c:\reports
And then i put the address.jasper and the class that the reports use.

I then run the application and it runs fine.  But days later the report needs to be changed so i modify the address.jasper file and adressscriplet.class so i then need to update the files in c:\reports.  But i would like to do it without stopping and re-starting the application.  

I have tried adding c:\reports to the classpath  on startup but it doesnt seem to work.  But again if i put the class in WEB-INF/classes it finds it fine.  But i dont want it there.

Hope this clear it up.
If dynamic loading would work how would you do it.

Thanks
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 92

Expert Comment

by:objects
ID: 11817405
> but i dont want it tied to the WEB-INF/classes

why not?
0
 

Author Comment

by:netizen1
ID: 11817413
b/c this is a war file and i dont want to create a new build everytime.  I'm trying to do this withoug stopping the application.
0
 
LVL 92

Expert Comment

by:objects
ID: 11817428
0
 

Author Comment

by:netizen1
ID: 11817445
But that isnt what i'm looking for.  I dont want to deploy a new war file just the report and its scriplet file.
0
 
LVL 92

Expert Comment

by:objects
ID: 11817459
that link doesn't even mention a war does it?
0
 

Author Comment

by:netizen1
ID: 11817471
But  i'm not using tomcat.  I'm using weblogic that is why i'm looking for the this particular solution.  I guess the question then is can this  be done?
0
 
LVL 92

Accepted Solution

by:
objects earned 70 total points
ID: 11817497
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now