Solved

How to add a class to the classpath

Posted on 2004-08-16
13
187 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

743 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

9 Experts available now in Live!

Get 1:1 Help Now