Search for simple program in java

hi
i need a program that have more than 50 lines
frogram that have else-if
i need to make a work of qa
thanks

@khansartaj
the main method is the method used by the VM to initiate an application. You need to implement this method in order to run the class. The parameter string[] args is a list of the commandline parameters passed to your application.

Similar Messages

  • What is the best IDE for database programming in java?

    im just new to java, i have experience in powerbuilder and visual basic. Im looking for an IDE for JAVA Database Programming that have same ease of use of the GUI builder of visual basic and power of the Datawindow in Powerbuilder.
    What is the best IDE for database programming in java?

    hey sabre why not just help me? instead of posting
    annoying replies. You want me to browse all the post
    two weeks ago to find what im looking for. stoopsMost regulars to this forum find X-posting annoying. Since you are lazy and want me to search the posts of the last couple of week for you, I find you very annoying.

  • Code Samples for SDK programming in Java

    I need a complete set of Code Samples for SDK programming in Java, like the one that is available in VB and .Net.
    For Example, if you look at the following directory of machine where SDK is installed,
    C:\ProgramFiles\SAP\SAP Business One SDK\Samples\COM DI\VB.NET
    we have following Sample programs in C Sharp, VB6, VB.Net
    01.BasicOperations
    02.MetaDataOperations
    03.UsingSBObob
    04.SerialAndBatch
    05.OrderAndInvoice
    06.ObjectsSchemas
    07.Permissions
    08.LoadFromXML
    09.BudgetEditor
    10.Messages Service
    11.Basic Company Settings
    12. Report Layout Service
    13.SaveXML
    14.ItemCycleCount
    15.ApprovalStagesAndTemplateServices
    16.Alert Management Service
    Iam looking for Samples like what is available above so that we can understand JCO better.

    Hi Sridharan,
    The only JCO samples I know of are posted in the [thread|;.
    Regards,
    Vítor Vieira

  • I am searching for a programmer in java

    I am searching for a programmer in java, to create one class that does the following things:
    1.- Obtain a jpg image from a data base
    2.- Transform from rgb to hls.
    3.- To make a histogram of H and S (Tonality and Saturation)
    4.- Fom the collected data of the histograms, apply the hashing and it�s numeric data, save as an attribute from the image in the BD
    contact to [email protected]
    as soon as possible
    Mexico

    I am searching for a programmer in javaDude, you just found a whole bunch of 'em!
    , to create
    one class that does the following things:
    1.- Obtain a jpg image from a data base
    2.- Transform from rgb to hls.
    3.- To make a histogram of H and S (Tonality and
    Saturation)
    4.- Fom the collected data of the histograms, apply
    the hashing and it�s numeric data, save as an
    attribute from the image in the BD
    contact to [email protected]
    as soon as possible
    Don't ask people to reply by private email. Most Forum regulars believe solving problems should be a public, transparent process during which a first try at an answer can and should be corrected if someone more knowledgeable notices that it is incomplete or incorrect. Also, they get some of their reward for being respondents from being seen to be competent and knowledgeable by their peers (not to mention the possibility of collecting some of those precious Duke Dollars.
    MexicoThe whole country?!?
    Seriously...
    Before asking a technical question by email, or in a newsgroup, or on a website chat board, do the following:
    * Try to find an answer by searching the Web.
    * Try to find an answer by reading the manual.
    * Try to find an answer by reading a FAQ.
    * Try to find an answer by inspection or experimentation.
    * Try to find an answer by asking a skilled friend.
    * If you are a programmer, try to find an answer by reading the source code.
    When you ask your question, display the fact that you have done these things first; this will help establish that you're not being a lazy sponge and wasting people's time. Better yet, display what you have learned from doing these things. We like answering questions for people who have demonstrated that they can learn from the answers.
    --- From How To Ask Questions The Smart Way by Eric Steven Raymond

  • Searching for a file in java

    What I am trying to do is not very uncommon. I want to open a file in it's default application (or at least in a common one.)
    Mainly I am currently thinking either HTML files or PDF's.
    What I was wondering is how to search for a file and get its directory path. For example I want to search for the file "Acrobat". In windows its directory is "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe"
    But I know in MAC or Unix the path could be very different. Not only that, but what if they did not use the default installation directory. I just want to find the path of a file by invoking a search. Is there currently any way to do this?
    I know I can open a JFileChooser and make the user search and find the program they wish to run it in, but that certainly is not very user friendly. I'd rather the program just searched for the proper application(s) and then called the exec() method to run the file in the program.
    Any help is appreciated.

    java.io.File provides a listRoots() method that returns all file system roots. So for Windoze you'd get 'A:/', 'B:/' 'C:/' ... etc.
    Unix you'd get '/' and so on.
    Now you can use other File methods to recursively scan the roots.
    Here's some (untried) code to get you going that searches for all java.exe found on all roots.
    import java.io.File;
    import java.util.Arrays;
    import java.io.FilenameFilter;
    import java.util.List;
    import java.io.IOException;
    public class FindIt {
      public FindIt () {
        File[] roots = File.listRoots();
        List list = new ArrayList();
        for (int i = 0; i < roots.length; i++) {
          scan(roots,list,new FilenameFilter(){
    public boolean accept(File file, String name) {
    return new File(file,name).isDirectory() ||
    name.equals("java.exe");
    public static void scan(File path,
    List list,
    FilenameFilter filter) throws IOException {
    // Get filtered files in the current path
    File[] files = path.listFiles(filter);
    // Process each filtered entry
    for (int i = 0; i < files.length; i++) {
    // recurse if the entry is a directory
    if (files[i].isDirectory()) {
    scan(files[i],list,filter);
    else {
    // add the filtered file to the list
    list.add(files[i]);
    } // for
    } // scan
    public static void main(String[] args) {
    new FindIt();
    You will run into problems with some roots as they will be removeable media (cd's diskettes) or network drives (potentially huge number of dirs to scan). So I do not recommend that you search on all roots, but a subset.
    Dave

  • Searching for simple bluetooth to bluetooth messages tutorial or example

    Hi,
    I want to send messages from 1 mobile phone to another one using Bluetooth but I can't find any simple tutorial or example with this type of bluetooth use.
    So i'm asking for your help :) any simple tutorial/example for bluetooth messages between devices?
    Thanks in advance

    import java.util.Vector;
    import java.io.IOException;
    import javax.microedition.io.Connector;
    import javax.microedition.io.ConnectionNotFoundException;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.TextField;
    import javax.microedition.lcdui.StringItem;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.ChoiceGroup;
    import javax.microedition.lcdui.Choice;
    import javax.bluetooth.LocalDevice;
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.DiscoveryAgent;
    import javax.bluetooth.DataElement;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.UUID;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.ServiceRecord;
    import javax.bluetooth.L2CAPConnectionNotifier;
    import javax.bluetooth.L2CAPConnection;
    import javax.bluetooth.BluetoothStateException;
    import javax.bluetooth.BluetoothConnectionException;
    import javax.bluetooth.ServiceRegistrationException;
    public class ChatController extends MIDlet implements CommandListener
    private Display display = null;
    private Form mainForm = null;
    private ChoiceGroup devices = null;
    private TextField inTxt = null;
    private TextField outTxt = null;
    private Command exit = null;
    private Command start = null;
    private Command connect = null;
    private Command send = null;
    private Command select = null;
    private StringItem status = null;
    private LocalDevice local = null;
    private RemoteDevice rDevices[];
    private ServiceRecord service = null;
    private DiscoveryAgent agent = null;
    private L2CAPConnectionNotifier notifier;
    private L2CAPConnection connection = null;
    private static final String UUID_STRING = "112233445566778899AABBCCDDEEFF";
    private boolean running = false;
    public ChatController()
    super();
    display = Display.getDisplay(this);
         mainForm = new Form("CHAT");
         devices = new ChoiceGroup(null,Choice.EXCLUSIVE);
         inTxt = new TextField("incoming msg:","",256,TextField.ANY);
         outTxt = new TextField("outgoing msg:","",256,TextField.ANY);
         exit = new Command("EXIT",Command.EXIT,1);
         start = new Command("START",Command.SCREEN,2);
         connect = new Command("CONNECT",Command.SCREEN,2);
         send = new Command("SEND",Command.SCREEN,2);
         select = new Command("SELECT",Command.SCREEN,2);
         status = new StringItem("status : ",null);
         mainForm.append(status);
         mainForm.addCommand(exit);
         mainForm.setCommandListener(this);
    protected void startApp() throws MIDletStateChangeException
    running = true;
         mainForm.addCommand(start);
    mainForm.addCommand(connect);
         display.setCurrent(mainForm);
    try
    local = LocalDevice.getLocalDevice();
         agent = local.getDiscoveryAgent();
    catch(BluetoothStateException bse)
    status.setText("BluetoothStateException unable to start:"+bse.getMessage());
              try
              Thread.sleep(1000);     
              catch(InterruptedException ie)
    notifyDestroyed();
    protected void pauseApp()
    running = false;
         releaseResources();
    protected void destroyApp(boolean uncond) throws MIDletStateChangeException
    running = false;
         releaseResources();
    public void commandAction(Command cmd,Displayable disp)
    if(cmd==exit)
         running = false;
              releaseResources();
              notifyDestroyed();
    else if(cmd==start)
         new Thread()
                   public void run()
                        startServer();
                   }.start();
    else if(cmd==connect)
              status.setText("searching for devices...");
                        mainForm.removeCommand(connect);
                        mainForm.removeCommand(start);
                        mainForm.append(devices);
                        DeviceDiscoverer discoverer = new DeviceDiscoverer(ChatController.this);
                        try
                             agent.startInquiry(DiscoveryAgent.GIAC,discoverer);
                        catch(IllegalArgumentException iae)
    status.setText("BluetoothStateException :"+iae.getMessage());
                        catch(NullPointerException npe)
    status.setText("BluetoothStateException :"+npe.getMessage());
                        catch(BluetoothStateException bse1)
    status.setText("BluetoothStateException :"+bse1.getMessage());
    else if(cmd==select)
                        status.setText("searching devices for service...");
                             int index = devices.getSelectedIndex();
                             mainForm.delete(mainForm.size()-1);//deletes choiceGroup
                             mainForm.removeCommand(select);
                             ServiceDiscoverer serviceDListener = new ServiceDiscoverer(ChatController.this);
                             int attrSet[] = {0x0100}; //returns service name attribute
    UUID[] uuidSet = {new UUID(UUID_STRING,false)};
                             try
                                  agent.searchServices(attrSet,uuidSet,rDevices[index],serviceDListener);
                             catch(IllegalArgumentException iae1)
    status.setText("BluetoothStateException :"+iae1.getMessage());
                        catch(NullPointerException npe1)
    status.setText("BluetoothStateException :"+npe1.getMessage());
                        catch(BluetoothStateException bse11)
    status.setText("BluetoothStateException :"+bse11.getMessage());
    else if(cmd==send)
                             new Thread()
                                       public void run()
                                            sendMessage();
                                       }.start();
    //this method is called from DeviceDiscoverer when device inquiry finishes
    public void deviceInquiryFinished(RemoteDevice[] rDevices,String message)
    this.rDevices = rDevices;
         String deviceNames[] = new String[rDevices.length];
         for(int k=0;k<rDevices.length;k++)
         try
              deviceNames[k] = rDevices[k].getFriendlyName(false);
         catch(IOException ioe)
         status.setText("IOException :"+ioe.getMessage());
    for(int l=0;l<deviceNames.length;l++)
         devices.append(deviceNames[l],null);
    mainForm.addCommand(select);
         status.setText(message);
    //called by ServiceDiscoverer when service search gets completed
    public void serviceSearchFinished(ServiceRecord service,String message)
         String url = "";
    this.service = service;
         status.setText(message);
         try
         url = service.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT,false);     
         catch (IllegalArgumentException iae1)
    try
         connection = (L2CAPConnection)Connector.open(url);
              status.setText("connected...");
              new Thread()
              public void run()
                   startReciever();
              }.start();
    catch(IOException ioe1)
    status.setText("IOException :"+ioe1.getMessage());
    // this method starts L2CAPConnection chat server from server mode
    public void startServer()
    status.setText("server starting...");
         mainForm.removeCommand(connect);
         mainForm.removeCommand(start);
         try
              local.setDiscoverable(DiscoveryAgent.GIAC);
              notifier = (L2CAPConnectionNotifier)Connector.open("btl2cap://localhost:"+UUID_STRING+";name=L2CAPChat");
              ServiceRecord record = local.getRecord(notifier);
              String conURL = record.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT,false);
              status.setText("server running...");
              connection = notifier.acceptAndOpen();
              new Thread()
              public void run()
                   startReciever();
              }.start();
         catch(IOException ioe3)
    status.setText("IOException :"+ioe3.getMessage());
    //starts a message reciever listening for incomming message
    public void startReciever()
    mainForm.addCommand(send);
    mainForm.append(inTxt);
         mainForm.append(outTxt);
         while(running)
         try
              if(connection.ready())
                   int receiveMTU = connection.getReceiveMTU();
                        byte[] data = new byte[receiveMTU];
                        int length = connection.receive(data);
                        String message = new String(data,0,length);
                        inTxt.setString(message);
         catch(IOException ioe4)
         status.setText("IOException :"+ioe4.getMessage());
    //sends a message over L2CAP
    public void sendMessage()
    try
         String message = outTxt.getString();
              byte[] data = message.getBytes();
              int transmitMTU = connection.getTransmitMTU();
              if(data.length <= transmitMTU)
              connection.send(data);
    else
              status.setText("message ....");
    catch (IOException ioe5)
    status.setText("IOException :"+ioe5.getMessage());
    //closes L2CAP connection
    public void releaseResources()
    try
         if(connection != null)
                   connection.close();
              if(notifier != null)
                   notifier.close();
    catch(IOException ioe6)
    status.setText("IOException :"+ioe6.getMessage());
    import java.util.Vector;
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.ServiceRecord;
    public class DeviceDiscoverer implements DiscoveryListener
    private ChatController controller = null;
    private Vector devices = null;
    private RemoteDevice[] rDevices = null;
    public DeviceDiscoverer(ChatController controller)
    super();
    this.controller = controller;
         devices = new Vector();
    public void deviceDiscovered(RemoteDevice remote,DeviceClass dClass)
    devices.addElement(remote);
    public void inquiryCompleted(int descType)
         String message = "";
    switch(descType)
         case DiscoveryListener.INQUIRY_COMPLETED:
                   message = "INQUIRY_COMPLETED";
              break;
         case DiscoveryListener.INQUIRY_TERMINATED:
                   message = "INQUIRY_TERMINATED";
              break;
         case DiscoveryListener.INQUIRY_ERROR:
                   message = "INQUIRY_ERROR";
              break;
    rDevices = new RemoteDevice[devices.size()];
         for(int i=0;i<devices.size();i++)
              rDevices[i] = (RemoteDevice)devices.elementAt(i);
         controller.deviceInquiryFinished(rDevices,message);//call of a method from ChatController class
         devices.removeAllElements();
         controller = null;
    devices = null;
    public void servicesDiscovered(int transId,ServiceRecord[] services)
    public void serviceSearchCompleted(int transId,int respCode)
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.DataElement;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.ServiceRecord;
    public class ServiceDiscoverer implements DiscoveryListener
    private static final String SERVICE_NAME = "L2CAPChat";
    private ChatController controller = null;
    private ServiceRecord service = null;
    public ServiceDiscoverer(ChatController controller)
    super();
         this.controller = controller;
    public void deviceDiscovered(RemoteDevice remote,DeviceClass dClass)
    public void inquiryCompleted(int descType)
    public void servicesDiscovered(int transId,ServiceRecord[] services)
    for(int j=0;j<services.length;j++)
         DataElement dataElementName = services[j].getAttributeValue(0x0100);
              String serviceName = (String)dataElementName.getValue();
              if(serviceName.equals(SERVICE_NAME))
                   service = services[j];
              break;     
    public void serviceSearchCompleted(int transId,int respCode)
    String message = "";
         switch(respCode)
         case DiscoveryListener.SERVICE_SEARCH_COMPLETED:
                   message = "SERVICE_SEARCH_COMPLETED";
              break;
         case DiscoveryListener.SERVICE_SEARCH_ERROR:
                   message = "SERVICE_SEARCH_ERROR";
              break;
         case DiscoveryListener.SERVICE_SEARCH_TERMINATED:
                   message = "SERVICE_SEARCH_TERMINATED";
              break;
         case DiscoveryListener.SERVICE_SEARCH_NO_RECORDS:
                   message = "SERVICE_SEARCH_NO_RECORDS";
              break;
         case DiscoveryListener.SERVICE_SEARCH_DEVICE_NOT_REACHABLE:
                   message = "SERVICE_SEARCH_DEVICE_NOT_REACHABLE";
              break;
         controller.serviceSearchFinished(service,message);//calling a method from ChatController class
    controller = null;
         service = null;
    }

  • Search for a wod in java classes in windows 7

    Hello,
    How to search for a specific word in a list of java classes in my windows directory? I know we can search in .java files but not sure how to do the search in .class files. Any help is really appreciated.
    Thank You
    -KK

    Hi,
    For searching in .class files, you need to decompile those using some decompiler.
    1) You can use JAD (Java Decompiler) and decomplie using these commmands:
    jad *.class
    rename *.jad *.java
    2) There is another decomplier, CAVAJ which is very user friendly. You just need to drag the class file onto this and it will show the java code for that class file.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Search for a program

    Hello
    How can i check whether a specified application is installed in a machine.
    If yes how can i get the path (I use windows as operating syatem)
    e.g; I want to get the installation path of windows media player
    Thanks in advance

    Java has no magic way to find random files or data. You have to decide on some information to search for, and then search, or have the user doe the search using some tool - maybe a file chooser.

  • What kind of math sould I know for successful programming in java 2d?

    I want to write fun and little games in Java but am blocked by lack my maths knowledge.I mean I am not
    able to do what I want.
    I know only matrix,determinant,sets,logic,and a little graph theory.I forgot some maths such as differential equation,
    probability,numerical methods due to my being math-phobic.
    So please what maths should I learn or improve to full-fill my wish.
    best regards,
    saddened vegeta

    For any programing:
    You should know basic number representations and when the computer approximates numbers or has actual number values in each (decimal vs integer types).
    You should understand overflow and underflow.
    Know what a significant digit is and why it is significant and what makes the others not significant.
    (NOTE: the previous are things that will save you a world of frustration in "I'm not getting the right answer.")
    For graphics and gaming:
    If you don't know Trig, then you should become at least familiar with how to use the functions.
    Basic Geometry or at least have a reference to and a working knowlege of formulas--a lot of this just goes hand in hand with Trig.
    You should know basic physics on ballistics--Force, Distance, Acceleration, Gravity, Friction (if you can ignore this component, then things are a whole lot simpler--but you should at least know why).
    I'm sure there is a lot more, but off the top of my head this will do. If you know these few things, then you'll be far ahead of many.

  • Searching for simple upload applet

    I hope this is the right forum for this query
    I need an "upload any size file" applet. Most of the commercial ones are way overblown in features that you can't turn off. All I need is the ability to upload a file of any size, browse for the file to upload, and pass parameters with each file.
    are there any simple applets like that available?
    thanks for you time and thoughts
    --- eric

    Ha ha.
    How about telling us what's supposed to accept the
    upload? Technically, simple HTML is sufficient. The
    other end of the line defines what you need.sorry for the new id, the forum lost my old one.
    well the code I've seen elsewhere dictated a server side solution for me. ;-)
    my expectation? since browsers fail to upload more than 90mb at a time (give or take), I expect that the file would be uploaded in chunks or slices. I expect to write a cgi program that would stich together those chunks based on cgi parameters uploaded with the file chunk.
    another alternative for the applet is to stream the file to a file transfer server server with authentication via server generated auth tokens. Or something...
    and no, ssh/ftp and the like are not acceptable for a varity of reasons unless I can write anon write only and can tell the server side app when the xfr is done.
    thanks

  • Searching for helpful programming sites

    What are the useful programming websites for newbies and advance. I am setting up a page for user-contributions.org. Include also languages what are good to add.
    http://user-contributions.org/other.html

    http://dmoz.org/Computers/Programming/Languages/
    http://directory.google.com/Top/Compute … Languages/
    or parent category:
    http://dmoz.org/Computers/Programming/
    http://dir.yahoo.com/Computers_and_Inte … Languages/
    http://directory.fsf.org/devel/
    http://www.koders.com/ (nice source code search engine)
    http://www.planet-source-code.com/

  • Guide for simple program development using screens

    Hi guys!
    I want to learn development in ABAP using screens. Can you advise me some links or send some documents on this? The best would be Simple examples..
    I can develop FMs already..
    Thank you!
    Olian

    Hi,
    Can you check out the links below it will help you in learning module pool programs
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    <b>Reward points for helpful answers,</b>
    Satish

  • Simple program with Java KeyTool

    Hello!
    I tried to create signature using keytool to send data using ssl. I create private key file by
    keytool -genkey -keystore kkm.kst -storepass passwd -alias kkmcert -keypass passwd -keyalg RSA -keysize 1024 -sigalg MD5WithRSA -validity 365 -dname CN=tester
    and then I tried to signature string "test" by following code:
    public static void getSign(){
                 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
                 String keyStoreFile = "kkm.kst";
                 FileInputStream fis = new FileInputStream(keyStoreFile);
                 String keyStorePassword = "passwd";
                 keyStore.load(fis, keyStorePassword.toCharArray());
                 fis.close();
                 String myKeyAlias = "kkmcert";
                 String myKeyPassword = "passwd";
                   PrivateKey privateKey = (PrivateKey) keyStore.getKey(myKeyAlias, myKeyPassword.toCharArray());
                 if(privateKey == null) throw new Exception("Client key not found");
                 String text = "test";
                  Signature signature = Signature.getInstance("MD5withRSA");
                  signature.initSign(privateKey);
                  byte [] data;
                       data = text.getBytes("UTF-8");
                 signature.update(data);
                 byte [] sign = signature.sign();
                 String signString = new String(sign, "UTF-8");
                 System.out.println(signString);
    }After that I tried to verify that derived signature isn't wrong:
    keytool -import -keystore kkm.kst -storepass passwd -file certfile.cer -alias ep -noprompt
    public static void checkSign(String signString){
                 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
                 String keyStoreFile = "kkm.kst";
                 FileInputStream fis = new FileInputStream(keyStoreFile);
                 String keyStorePassword = "passwd";
                 keyStore.load(fis, keyStorePassword.toCharArray());
                 fis.close();
                 String eportAlias = "ep";
                 Certificate cert = keyStore.getCertificate(eportAlias);
                 if(cert == null) throw new Exception("Server certificate not found");
                 PublicKey publicKey = cert.getPublicKey();
                 String text = "test";
                  byte [] data;
                  try {
                       data = text.getBytes("UTF-8");
                  } catch (UnsupportedEncodingException e) {
                       data = text.getBytes();
                  String subscriptText = signString;
                  byte [] subscript = signString.getBytes();
                  try {
                       Signature signature = Signature.getInstance("MD5withRSA");
                      signature.initVerify(publicKey);
                      signature.update(data);
                      System.out.println(signature.verify(subscript) ? "RIGHT": "WRONG");
                  } catch (Exception e) {
                       System.out.println("Exc : WRONG");
              } catch (Exception e) {
                   System.err.println("Error");
                   e.printStackTrace();
    }And after checking I got message "WRONG" that means that generated signature is wrong signature. =( Can anybody help me to find error?

    hey buddy... i am stucked with one more error.
    when the same code was compiled and during the running of the code it says that
    error : error reading in E:\oracle\ora90\network\admin\listener.ora; java.util.zip.ZipException execption
    i saw environment variable, but still for all i couldn't get rid of this problem ..needed help badly!

  • Searching for simple document and picture viewer.

    Hello,
    I've looking for a viewer which supports all of the common picture formats, such as gif,jpeg,bmp and can also display all kind of office documents.
    If i look for viewer with these options, I all end up with great complicated client-webserver models. Can anyone tell me if there is a viewer which is used on the client-side (fat-client). A rather simple api which converts office-documents to images and maybe provide some simple imaging fuctionality such as zooming etc...
    Much thanks,
    Hugo

    I think this is not the forum for your query.
    However, as far as a viewer which supports all common picture formats
    you can purchase Adobe PhotoShop (ver 6.0 or above).
    I think Adobe Illustrator can display all kind of office documents, but
    I am not sure.
    Hope my reply will serve your purpose.
    (S. JAI SANKAR)

  • Searching for a program like "Printfolder" for PCs

    Hi there,
    coming from the PC world and being converted to a Black MacBook only for two week, I'm missing a little freeware utility called "Printfolder" (http://no-nonsense-software.com/freeware/).
    Basically, it lets you "print or save a list of files located in any folder. Right-click any folder in Windows Explorer and select "PrintFolder" in the popup menu"...
    Is there any similar program for the Mac world? Or maybe the same task can be achieved straightly in OSX?
    Thanks in advance
    Sergio

    Just found it! That's what I was looking for
    Thanks!
    Sergio

Maybe you are looking for

  • Creating maintenance plan "MaintenancePlan" (Error)

    Hello, I get the error Creating maintenance plan "MaintenancePlan" (Error) when I try to create a maintenance plan. I checked and the Microsoft Web site and other forums said it may be that integration services is not installed so I tried installing

  • ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], []

    Hi, Can anyone tell me how to resolve this error ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], [], [], [], [], [] ORA-06512: at "ProcName", line 7 ORA-06512: at line 17 thx

  • Error while Transporting changes in Process chain

    Hi All, I have added a Hierarchy InfoPackage in Process chain and added this InfoObject in Save hierarchy and Attribute change Run Process types. My transport Request is showing only three entries each for save hierarchy , attribute change run and on

  • How to pass value from the jsp file to a java bean

    I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file <%db.setDatabase(database);%>are coding to set my databse connection private String databa

  • Deleting several photos at once

    hi, this may sound like a totally stupid question, but i cannot figure out how to highlight several photos for deletion rather than deleting one at a time...any thoughts? thanks