Solved

How to add a class to the classpath

Posted on 2004-08-16
13
215 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse console opening separately 2 35
hashmap order 17 40
java mysql insert application 14 41
learn programming 8 66
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

713 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