Results 1 to 2 of 2
  1. #1
    sumak is offline Member
    Join Date
    Apr 2008
    Posts
    1
    Rep Power
    0

    Default Please help, need to make my class static.

    Hi everyone,
    I am new to this forum as well as java. I struggled to write this class using jdeveloper. But the problem is I cannot/donot know how to make the class as a "static" class. I need to do that so I can load this class into oracle DB and then use PL/SQL to call the method. I appreciate any help you can give me. My code is as follows:
    package com.av;
    import java.io.*;
    public class my1 {
    String avMode = "SCAN";
    boolean scan = avMode.startsWith("SCAN");
    String avServer = "xx";
    int avPort = x;
    int the_return = 0;

    /**
    * @param fileBytes
    * @param fileName
    * @return
    */
    public int scanfile(byte[] fileBytes,String fileName)

    {
    if (scan) {
    AVClient avc = new AVClient(avServer,avPort,avMode);
    the_return = avc.scanfile(fileName, fileBytes);
    if (the_return == -1) {
    return (the_return);
    } else
    return (the_return);
    }
    return (the_return);
    }

    }
    Can anyone please help me?
    rgds,
    Suma.

  2. #2
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    You can read a tutorial about declaring static class in java...
    there are more explainations there.....

    regards,
    sukatoa

Similar Threads

  1. Abstract Class with Static Methods
    By bugger in forum New To Java
    Replies: 7
    Last Post: 09-05-2008, 12:20 AM
  2. Static class
    By eva in forum New To Java
    Replies: 1
    Last Post: 12-31-2007, 01:02 PM
  3. Mocking static methods of class
    By Kat in forum New To Java
    Replies: 3
    Last Post: 11-08-2007, 12:24 AM
  4. Replies: 1
    Last Post: 08-07-2007, 05:05 AM
  5. Replies: 1
    Last Post: 08-01-2007, 09:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •