Loading classes from an area in the filesystem.

I need to do a scan for classes on a given area of the filesystem, but I'm not sure how to do this. I also need to be able to find the current jre/lib/ext location on the current system (thats going to be the first area I scan).
The reason for all this is that I want a list of all available JDBC drivers installed (DriverManager.getDrivers() only shows currently LOADED drivers).
Any idea how I :
1: Scan a dir and get a list of classesnames contained within.
2: Get the location of jre/lib/ext
It's a heavy one, but hopefully someone will be able to help.

System.getProperty("java.ext.dirs")will get you the location of the extension directories. I think java.class.path will get you your classpath, but doSystem.getProperties().list(System.out);to get a complete list of system properties including that.
To get a list of files in a directory, use methods from the File class (you could look it up).

Similar Messages

  • How long does it take to down load mavericks from snow leperd. The mini Mac has two gig of ram.  It has been over two hours.   I have DSL

    long does it take to down load mavericks from snow leperd. The mini Mac has two gig of ram.   It's over two hours now.    I have DSL

    By cable standards it's not very fast. Assuming it runs at top speed with no hiccups at either end you can download about 650 KB/s. So, that suggests it will take a little over two hours. Of course transfers are rarely ever perfect, so could take more than two yours, realistically. My pipe is about four times faster than yours, and I've seen the download take twice as long as it "should."

  • We encountered a problem with some client machines that use Firefox version 24ESR and IE8. Ajax requests of aspx pages from Firefox are getting the following er

    I encountered a problem with some client machines that use Firefox version 24ESR and IE8.
    Ajax requests of aspx pages from Firefox are getting the following error from the iis server (iis version 7.5):
    Bad Request - Request Too Long
    HTTP Error 400. The size of the request headers is too long.
    From analyzing the request that was sent to the server, I saw that the request consist of only the viewstate of the aspx page.
    I tried to disable the viewstate for one page and the server got the request correctly.
    I do not encounter any issues on these laptops with postback requests from Firefox or when running the same application with IE8.

    Sometimes that means that the page address sent is loo long.
    Check the link address you are using.
    I can't help you further and will send for more help.

  • Loading class from an external .swf file

    Hi,
    My flash application has lots of resources which will change all the time. In order to keep the the user from having to download my main .swf file over and over again, and in order to keep the main file's size low, I would like to put the resources into separate .swf files and load them dynamically from a url using a Loader.
    Once downloaded I would like to extract the classes that are in the resource swf and use them in the main swf. Can anyone share some code for doing this? Note that I am not just interested in using a symbol from the resource swf. I would like to use a class, with all of its methods and everything, and my main swf does not contain the class definition. Only the resource swf does.
    Thanks!!

    This is a great question for flash programming.
    And when you know the answer to this, you are likely to use it on daily basis like the top level programmers  of an agency.
    ApplicationDomain is your answer and the adobe docs has a chapter on this.
    ApplicationDomain is where all of your classes will be loaded into and when you use a loader you have the ability to target this with the laoderContext.
    AplicationDomain.currentDomain loads all classes into the main app and if your main app already has these classes, then the app uses the parents classes
    new Application.Domain() specifies a seperate repo of classes that are loaded in so that classes in the main app will not be confused by the classes in a loaded swf. that refer to the same names.
    this locks down the communication between the swfs but will use the newer updated classes on the child when a child is loaded in with the same class names as the parents.
    new ApplicationDomain(currentDomain)  will enclose a new repo with the parent repo of the class definitions.

  • Failover to loading classes from codebase?

    The Java Plug-In fails over to loading class files from codebase when the jars specified do not contain the class in question.
    I need this same behavior from Java Web Start -- in part because I'd like to convert some applets and in part because due to customization, reflection, etc, it is not possible for me to force all class files to reside in the jars. Some will only be found in the codebase.
    Is there any way to accomplish this with Java Web Start? Or do we have to use another JNLP implementation? I understand performance is best when the jars are complete, but why did Sun make Java Web Start's behavior so inconsistent. [This is not the only case of this, but I'll keep my other questions/gripes on this matter to other threads.]

    I fully agree with your opinions on the environment variables such as CLASSPATH, PATH etc.
    But my problem is: I want to force the application to load the classes over RMI from the codebase specified by the other machine first before trying to load the classes from its own class path specified by -cp or whatever mechanisms.
    In other words, I want to load the classes remotely instead of locally on the hard drive if the classes with the same names exist locally.

  • Load class from XML (Dynamic Dispatch)

    I'm continuing my voyage into the realms of LVOOP.....
    I have encountered a new problem which I am sure there's a solution to.....
    I have a certain hierarchy and I want to implement a single save and load routine for all objects int he hierarchy (located int he parent class of course).
    Using the "flatten to XML" I'm able to create some nice XML files with all parent and sibling information saved (as long as the values are non-default of course).
    Where I am running into problems is the loading of the data within this XML file.  I want to be able to take an object and basically re-initialise it to the values within the file.  All fine and good I thought, but it doesn't work.
    The problem is that when using the VI with Dynamic dispatch inputs, the output of the "Unflatten from XML" is giving me a conflict with the Dynamic dispatch output saying the obejct types do not  necessarily match.  Is it not possible to match the object type on the input and output of the "Unflatten from XML" primitive?
    If I try removing the "Dynamic Dispatch" input to a static input, then it only loads the data for the parent class regardless of the actual input class.
    Am I doing something silly here or is there no other way to properly load a sibling class from a file using only a method residing within the parent class?  I was hoping I could have a single "Save-Restore" function residing within my parent class to make life easier for me.
    Shane.
    Message Edited by Intaris on 06-17-2009 05:24 AM
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

    Hi Tst,
    Problem is that in order for the cast to yield any useful results, I have to make the inputs and outputs non-Dynamic which results in ONLY the data for the parent class being loaded.
    If the inputs and outputs are Dynamic, then a cast will not solve the problem (It could be a grandchild class being cast as a child, thus breaking the dynamic dispatch tables).
    The only solution I see is for the "UnFlatten from XML" to RETAIN the true object type.
    Either that or use my beautiful solution 
    Shane.
    Ps I just did a bit of a test of the race condition probabilities.  I ran 100000 tests (100k) with a program stressing both cores AND ram of my machine in parallel and all 100k of 100k iterations worked out OK.  I suppose that lets me think I should be in the range of at least 99.99%....... 
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • URLClassLoader loading class from jarB, which uses classes from jarC

    Hi, here's my problem:
    I have a classA in executable jarA.
    This uses URLClassLoader to load classB from jarB. So far so good.
    But classB uses classC, which lives in jarC. jarC is specified in the Class-Path of the manifest in jarB. But classB gets a ClassNotFound exception when it tries to use classC.
    The situation I want to achieve looks like this (sorry for the bad art; it's almost impossible to make it look better because sun strips out extra spaces):
    jarA:
    classA-----> URLClassLoader(jarB).loadClass(classB)
    jarB:
    Class-Path jarC
    classB------> new classC
    jarC:
    classC
    My expectation was that URLClassLoader would automatically be used to load all the classes that classB uses, and that it would extend its classpath by the classpath specified in the manifest of jarB, just like the default classloader does. Anyone know what I'm doing wrong?
    When I do the following, i.e. use only the default classloader, everything works fine. Unfortunately I won't know where jarB is until runtime, so I can't actually do this:
    jarA:
    Class-Path jarC
    classA-----> new classB
    jarB:
    Class-Path jarC
    classB------> new classC
    jarC:
    classC
    thanks alot
    j

    Actually, there is definitely a way to make this work. A plugin engine has to handle this in order for plugins loaded by separate loaders to be able to share class instances with one another (dependency). My engine does static runtime plugin dependency resolution, which means it parsers every plugin's config file, then after all plugins are in the "registry" it goes back and resolves all dependencies. How it does this is that each PluginClassLoader keeps a list of "dependent" classloaders. So, if the engine finds plugin A, B, and C, and B depends on C (declares this in its config file), the engine creates 3 class loaders (custom loader called PluginClassLoader), one for each plugin. This is done so that the plugin can be unloaded or reloaded at runtime without having to shut the application down. Now, since B depends on C, when plugin B code requests a class found in C, the JVM first asks B's loader to find the class. The "normal" delegation model of Java is for B's loader to first look in the parent hierarchy, then in its own classpath. The problem with this approach is that in order to support reloadable and unloadable plugins, you do NOT want your plugin .jar file at any location within the main application classpath. The plugin .jar file should be able to be at any URL location outside of any other classpath, even perhaps at another web site.
    So, the JVM asks B to find the class in C. But B's loader isn't able to find it because it is not in B's classpath. The trick is to do one of a couple things. First, remember that each loader keeps a list of dependent loaders. Second, in order to avoid any tie-in to the main classpath, we break the normal classloader delegation model by overriding the loadClass() method. In here we want to first check our local cache of loaded classes. The built-in method findLoadedClass() handles this for us. If that doesn't return a Class, then we want to look in our own classpath. In this case, we only want to look for any classes in B's plugin .jar file. C's class of course wont be found here. So the next step is to delegate to our "dependent" list of loaders. Aha, you say? This is the trick (credit goes to the Eclipse IDE team where a few members taught me this and was able to help me solve my very same problem). By delegating to a dependent loader, B's loader effectively asks C's loader to find C's class. The same thing happens, only this time it is now C's loader doing the work. The very first time the calls is made, no classes are loaded yet, so the finding of the C class in the local cache of C's loader wont yet work. The next step though, looking in C's classpath (C's .jar file) WILL find the class. It is loaded, put in C's loader cache and the Class is returned. Now, at this point B now has a Class from C's classpath that it can use.
    Now, my first foray into this made me think that if B asks C to find it, and C finds it and loads the bytecode, doesn't B's loader also need the bytecode in order to properly "see" the C class. Apparently, this is not needed. I am guessing the JVM keeps a repository of bytecode, so that so long as you have the C ref (location in the JVM's memory where C's bytecode is), you don't need to re-load the bytecode of C into B's loader. Thus, B's loader now can "see" the C class without actually having to have loaded the bytecode of C. Now, B's code can typecast C, use it, etc. Beautiful aint it?
    Let me know if you have any further questions.

  • Unable to load class from JSTL

    Hello. I am using JSTL 1.06 from Jakarta with Tomcat 4.1 on a MacOS X 10.3.9 server. I have a jsp that contains the following:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <jsp:useBean id="validate" class="mypackage.ValidationBean" scope="request">
            <jsp:setProperty name="validate" property="*" />
    </jsp:useBean>
    <c:if test="${validate.valid == false}">
    The input is not valid.
    </c:if>In case it matters, my web.xml file starts out like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">I have placed jstl.jar and standard.jar in my webapp's WEB-INF/lib directory. However, when I try to load the page, I get this error message:
    org.apache.jasper.JasperException: /myjsp.jsp(60,0) Unable to load class if
    I know that many people have asked similar questions, but in each case, the response was to put jstl.jar and standard.jar in WEB-INF/lib and make sure that you're using the proper URI for the taglib, and I think I have done those things correctly. Any help would be greatly appreciated!

    Thanks for your response! In answer to your questions:
    The JRE is 1.4.2_09. I can't use 1.5 (5.0) without upgrading the OS.
    I haven't tried it on a PC. I might be able to, but it would take me some time to set everything up.
    What follows is taken from Tomcat/logs/localhost_log.2006-10-24.txt. If there is another log file I should be looking in, please let me know. Here is the full stack trace from the log:
    2006-10-24 16:58:40 Could not load TagLibraryValidator class org.apache.taglibs.standard.tlv.JstlCoreTLV: EXCEPTION: org.apache.taglibs.standard.tlv.JstlCoreTLV
    2006-10-24 16:58:40 Could not load TagExtraInfo class org.apache.taglibs.standard.tei.ImportTEI: org.apache.taglibs.standard.tei.ImportTEI
    2006-10-24 16:58:40 Could not load TagExtraInfo class org.apache.taglibs.standard.tei.ForEachTEI: org.apache.taglibs.standard.tei.ForEachTEI
    2006-10-24 16:58:40 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /myjsp.jsp(59,0) Unable to load class if
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219)
    at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:712)
    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:553)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
    at java.lang.Thread.run(Thread.java:552)

  • How to load images from client side when the swf is hosted on a server without uplaoding it to server?

    I'm trying to build a online image resize tool.
    problem i face are:
    1. I build a button that allow user to browse the file. Once
    file is selected, it doesnt show full path.
    2. lets say if it shows fullpath, but i try to load it into a
    movieclip, and it doesnt work because the swf file is located at
    the server and not the client's place.
    3. as far as i know, flash can only load images which is
    located in the same server or internet.
    4. if i use php, asp, cgi.. it can only allow me to 1st
    upload the image then resize later, but this is not wat i want.
    5. I need to 1st resize then upload later, because if i have
    100 and more photos taken from digicam, it's going to be very slow
    and heavy.
    What i have tested:
    1. upload "image3.jpg" into the same directory as the
    "viewer.swf", and it works.
    2. do not upload the swf to the server, but run locally from
    the user's computer and open "image3.jpg" and it works.
    3. upload the swf to the server and open "image3.jpg" from
    the user's computer and IT DOESN"T WORK!
    please help me out.
    Thanks~!

    use this php code.
    for flash php image prosses.
    flash file
    import flash.display.BitmapData;
    shaF.onPress = function() {
    output();
    function output() {
    snap = new BitmapData(mc._width, mc._height);
    snap.draw(mc);
    var pixels:Array = new Array();
    var w:Number = snap.width;
    var h:Number = snap.height;
    for (var a = 0; a<=w; a++) {
    for (var b = 0; b<=h; b++) {
    var tmp = snap.getPixel(a, b).toString(16);
    pixels.push(tmp);
    var output:LoadVars = new LoadVars();
    output.img = pixels.toString();
    output.height = h;
    output.width = w;
    output.send("show.php", "output", "POST");
    stop();
    PHP file (show.php)
    <?php
    $data = explode(",", $_POST['img']);
    $width = $_POST['width'];
    $height = $_POST['height'];
    $image=imagecreatetruecolor( $width ,$height );
    $background = imagecolorallocate( $image ,0 , 0 , 0 );
    //Copy pixels
    $i = 0;
    for($x=0; $x<=$width; $x++){
    for($y=0; $y<=$height; $y++){
    $int = hexdec($data[$i++]);
    $color = imagecolorallocate ($image, 0xFF & ($int
    >> 0x10), 0xFF & ($int >> 0x8), 0xFF & $int);
    imagesetpixel ( $image , $x , $y , $color );
    //$font = imageloadfont('arial.ttf');
    $font = 'arial.ttf';
    // $text_color = imagecolorallocate($image, 233, 14, 91);
    $black = imagecolorallocate($image, 0, 0, 0);
    //imagestring($image, $font, 5, 5, "A Simple Text String",
    $text_color);
    imagettftext($image, 12, 0, 10, 20, $black, $font, "A Simple
    Text String");
    //Output image and clean
    //header("Content-Type: image/png");
    imagepng($image,"finoy.png");
    imagedestroy( $image );
    ?>
    <html>
    <body>
    <img src="finoy.png" width="159" height="159" />
    </body>
    </html>

  • Is it possible to load classes from a jar file

    Using ClassLoader is it possible to load the classes from a jar file?

    URL[] u = new URL[1] ;
    u[0] = new URL( "file://" + jarLocation + jarFileName + "/" );
    URLClassLoader jLoader = new URLClassLoader( u );
    Object clsName = jLoader.loadClass( clsList.elementAt(i).toString() ).newInstance();
    I get this error message.
    java.lang.ClassNotFoundException: ExceptionTestCase
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    // "file://" + fileLocation + fileName + "/" This works fine from a browser.
    Is there anything I am missing? Thanks for the reply.

  • Loading classes from another jar file

    I've set up my jnpl file so that it references a core jar file (contains main() function). The jnlp also references another jar file (app.jar) which contains class files that I load and instantiate dynamically (using ClassLoader). The core.jar file contains a manifest that includes a reference to app.jar.
    The app works fine when I use "java -jar core.jar" from the command line.
    However, when I wrap the jars using jnlp, I always get a null pointer exception because it cannot find any class that is in the app.jar file. I've tried different strategies, such as trying to load a class file that sits on the server (in a jar file and not in a jar file), but that also fails if I use jnlp (However, it works if I use "java -jar core.jar")
    Any ideas what is going on?

    This is the "OckCore.jar" manifest before signing:
    Manifest-Version: 1.0
    Main-Class: com.Ock.OckCore.OckApp
    Class-Path: . OckMaths.jar
    Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
    Name: com.Ock.OckCore.OckApp.class
    Java-Bean: FalseThis is the manifest after signing:
    Manifest-Version: 1.0
    Main-Class: com.Ock.OckCore.OckApp
    Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
    Class-Path: http://hazel/Ock/. http://hazel/Ock/OckMaths.jar
    Name: com/Ock/OckCore/OckApp.class
    SHA1-Digest: KRZmOryizx9o2L61nN+DbUYCgwo=I have removed a load of irrelevant stuff from the "after" manifest to keep it readable.
    note that :-
    The OckApp.class loads normally from webstart and tries to load a class from OckMaths.jar.
    I can prove that OckApp.class does load because it creates a log file when it does.
    The OckApp.class tries to load a class from the OckMaths.jar. This fails if webstart is used but works if OckCore is launched using "java -jar OckCore.jar".
    The jars do exist at the location specified by the manifest.
    The application launches normally if I use "java -Jar OckCore.jar"
    Here is the jnlp file
    <?xml version='1.0' encoding='UTF-8'?>
    <jnlp
         spec="1.0"
         codebase="http://hazel/Ock"
         href="OckMaths.jnlp">
         <information>
              <title>Ock Maths Demo</title>
              <vendor>Rodentware Inc</vendor>
              <description>Demo of a ported app running as a Java Webstart application</description>
              <description kind="short">An app running as a Java Webstart application"></description>
              <offline-allowed/>
         </information>
         <security>
              <all-permissions/>          
         </security>
         <resources>
              <j2se version="1.3"/>
              <jar href="OckCore.jar"/>
              <jar href="OckMaths.jar"/>
         </resources>
         <application-desc main-class="com.Ock.OckCore.OckApp">
    </jnlp> I have also signed the jars outside of a webdirectory. I get the following manifest file:
    Manifest-Version: 1.0
    Main-Class: com.Ock.OckCore.OckApp
    Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
    Class-Path: . OckMaths.jar
    Name: com/Ock/OckCore/OckApp.class
    SHA1-Digest: KRZmOryizx9o2L61nN+DbUYCgwo=
    note that :-
    The jars do exist at the location specified by the manifest.
    The application launches normally if I use "java -Jar OckCore.jar".
    The application doesn't launch from webstart.
    I've found that cache, but the jar files have been renamed.
    OckCore.jar is anOckCore.jar, etc... so I'm not sure if trying to write a cmdline will work anyway.

  • Automatic loading data from data files in the hard drive?

    Hi, I want to automate the process of loading data from a data file in the file system (e.g. c:\data\temp). I have the script to run using the loader (control file), but have to do manually. I basically have monthly data (exported into the data files from other systems) to load into the database and run the sql loader every month. I appreciate if you can tell me how to automate this or point to any tool. Thanks a lot!

    Depends on your version (it's really important to mention it anytime anyone posts here!)
    If you are on 10g, then DBMS_SCHEDULER can schedule anything you can do at the operating system. If you can write a script to run SQL*Loader, then you can use DBMS_SCHEDULER to automatically run that script.
    It's rather harder to do the same trick on any non-10g database. DBMS_JOB cannot, for example, perform OS commands (such as 'sqlldr'), so then you have to use your operating system's scheduling capabilities (at for Windows or cron for Unix/Linux... and knowing your OS also helps provide meaningful answers!)

  • Well i can load Class from file, but how i save it to file?

    Hello,
    Let's say we can load some Class using ClassLoader, but if i want to do the opposite? I would like to make a .class file, for this i have got Class object and few methods.
    the start would look like this;
    Class<?> cl = ....;
    String nameWithPackages = cl.getName().replaceAll("\\.", "/")+".class"
    File file = new File(nameWithPackages);
    ... Well now i need to fill the class file with the data, any ideas?
    Thanks
    Juraj

    morgalr wrote:
    Don't use a class file for data, use a JAR or ZIP.I mean it's data - the bytecode of the class, but not sure where i get the it, because there isn't any method like that in Class.
    To better explain it lets say i got class
    public class SomeClass {
    }Let's say i got the SomeClass
    Class<?> thisIsSomeClass = ...; //
    //now i want to make file SomeClass.class so i can use this class later
    ...Edited by: Juraj on Jul 31, 2010 10:11 AM

  • Loading class from byte[]

    Hi,
    is there a way to load class (create object) from byte[] ?

    Yes. Look at ClassLoader. You will have to write your own subclass though many exist in other packages.

  • JSP cannot load class from classpath

     

              Ken:
              I run into this problem yesterday too. I'm wondering if you have it resolved? Thank you very much!
              Lucy
              Ken Rimple <[email protected]> wrote:
              >All,
              >
              >I'm using 5.10 WLS, and have a jsp that is trying to access a class in a
              >package loaded in my java classpath. I'm using visual cafe expert
              >edition, and the class is part of the project classpath. To be safe,
              >I've also put it in the sc.ini file under CLASSPATH.
              >
              >The jsp keeps failing with the following error. Servlets I'm using
              >place these things in the HttpSession and are called before this page
              >and they work. I'm baffled, as I even tried the jspc compiler utility
              >adding the classes to the class path.
              >
              >Parsing of JSP File '/ShowResults.jsp' failed:
              >--------------------------------------------------------------------------------
              >
              > /ShowResults.jsp(4): Could not create a bean of type:
              >com.<companyname>.<software>.common.UserSession:
              >java.lang.ClassNotFoundException: class
              >com.<companyname>.<software>.common.UserSession :
              >java.lang.InstantiationException:
              >com/<companyname>/<software>/common/UserSession
              >probably occurred due to an error in /ShowResults.jsp line 4:
              ><jsp:useBean id="user_session" scope="session"
              >class="com.<companyname>.<software>.common.UserSession" />
              >--------------------------------------------------------------------------------
              >
              >(<companyname> and <software> are regular names. The file is in the
              >class path and is used by Servlets.
              >
              >It's almost as if the jsp compiler is ignoring any class paths.
              >
              >Please help if anyone has made this work. I'm stuck.
              >
              >Ken Rimple
              >
              >
              

Maybe you are looking for