Programming JPEG using java

i wanna program using java language a program that takes input an image,can store this image & retrieve it when needed & can resize it when needed, can anyone plz help me,with all my thanks.

Congratulations! Yyou are the millionth person to ask this question!
What do we have for our lucky contestent? A free trip to Google.com, where you'll enjoy searching and reading through the other 999,999 threads just like this one, which could have been avoided had you learned how to use a library in school.

Similar Messages

  • Need to convert an image to .jpeg using Java !

    Hello,
    i am working in images now. i need to convert any image in the form of .jpeg using Java. in other words, i need to store an image in the form of .jpeg format. can any of u help me ! thanks in advance.
    - Krishna

    There's also jimi, at http://java.sun.com/products/jimi/
    You can do something like:
    image = new BufferedImage (width, height, BufferedImage.TYPE_INT_RGB);
    // create your image
    String path = "/path/image.jpg";
    Jimi.putImage(image, path);
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Running programs WINDOWS using java

    Hi ,
    I would appreciate if anyone could tell me how to run programs WINDOWS using JAVA language .Thank you.

    I am not quite sure what you mean by that, but if you want to execute a program use:
    Runtime.exec(String)

  • I just downloaded the Java software update and now certain programs aren't loading that use Java?

    So I downloaded the new softeware update and now my programs that use Java won't load. Does anyone know what I can do.

    Due to the extreme unpredictability of the Flashback Trojan, that was constantly changing (and a new variant that's been detected and seems to be worse), Apple decided to play it safe just in case the revised Java code was still vulnerable. So, Java is disabled by default for applets and must be manually enabled as needed (with the warning about possible vulnerability).
    So, head on over to Java Preferences, in Utilities, and enable the thing as needed. Disable when no longer in use for security's sake. BTW, if you enable but don't use Java in awhile, it is configured to self-disable for the same reason.

  • I am trying to use an education program that needs Java applets to install and use and it will not use Safari. When I download IE from the web it will not install. How can I get a browser that will work on my MacAir for travel use of this program?

    I am trying to use and education program that needs Java applets and it will not run on Safari. IE will not install from the web. How do I get a browser that will work to install so I can use this program when I travel.

    Try using FireFox. IE will only run on a Mac if you run Windows on the Mac.
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows 7 or Windows 8.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusion and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. A more recent comparison of Parallels, VM Fusion, and Virtual Box is found at Virtualization Benchmarks- Parallels 10 vs. Fusion 7 vs. VirtualBox. Boot Camp is only available with Leopard and later. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • Why am I being told that a JPEG file that I made changes to in Photoshop 6 (CS6) can't be saved?  The message I get says that either the file is locked and I don't have permission to execute this or another program is using this file.

    i recently purchased a 21.5 iMac with Yosemite (10.10.1) and was disappointed to discover that my CS6 programs are not functioning correctly.  I am unable to use the "Save As" command  when making changes to a JPEG file in Photoshop.  The message I get says that either another program is using the file or it is locked and I don't have permission to execute that command.  I'm experiencing a similar problem in Bridge when trying to move an unwanted file to the Trash.  Again, I get a message telling me that i don't have permission to do this.  Lastly, I'm unable to open any Camera Raw files.  Any suggestions?  I had no problems with the Mavericks OS on my old iMac and although it's much slower, I'm tempted to go back to using my old iMac.  At this point, I feel as if I've just wasted $2300+ (tax included). 

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    resetp
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

  • How can I use Java to do Seismic programming as Motif?

    One of my friend recently finished a seismic on-site data processing program using
    Motif on Solaries.He asked me if I can implement the same function to use Java language
    so that the program can run on different platforms such as Windows,Unix.
    Seismic data is usually enormous.And I don't have any experence in plotting seismic
    curves by using Java.
    Is there any seismic processing software programmed with Java available?
    I will appriciate any help.
    Thank you

    I think the point is not the word seismic than 'how to plot curves in Java.'.
    You can find many resources about plotting curves you want in Java2D.
    Refer to these URL:
    Java2D http://java.sun.com/products/java-media/2D/index.html
    Java2D Tutorial http://java.sun.com/docs/books/tutorial/2d/index.html

  • How can I make a Java program pyramid using for loops??

    Hi guys, so I'm stuck with my program here... I don't know how to make it work, and i've been trying really hard.. So now i give up and need some guidance.. Please help me here.
    Your job in this assignment is to write programs to solve each of these six problems.
    1. Write a GraphicsProgram subclass that draws a pyramid consisting of bricks
    arranged in horizontal rows, so that the number of bricks in each row decreases by
    one as you move up the pyramid, as shown in the following sample run:
    The pyramid should be centered at the bottom of the window and should use
    constants for the following parameters:
    BRICK_WIDTH The width of each brick (30 pixels)
    BRICK_HEIGHT The height of each brick (12 pixels)
    BRICKS_IN_BASE The number of bricks in the base (14)
    The numbers in parentheses show the values for this diagram, but you must be able
    to change those values in your program.
    * File: Pyramid.java
    * Name:
    * Section Leader:
    * This file is the starter file for the Pyramid problem.
    * It includes definitions of the constants that match the
    * sample run in the assignment, but you should make sure
    * that changing these values causes the generated display
    * to change accordingly.
    import acm.graphics.*;
    import acm.program.*;
    import java.awt.*;
    public class Pyramid extends GraphicsProgram {
    /** Width of each brick in pixels */
         private static final int BRICK_WIDTH = 30;
    /** Width of each brick in pixels */
         private static final int BRICK_HEIGHT = 12;
    /** Number of bricks in the base of the pyramid */
         private static final int BRICKS_IN_BASE = 14;
         public void run() {     
    }That's my problem.

    yo, so i figure out my for loop. my code is very very very very ugly, so dont laugh i know its ugly! just wanna ask for some tips
    public void run() {
              int initBrick = 30;
              int initPlacement = (getWidth() - BRICK_WIDTH) / 2;
              for (int i = 0; i < initBrick; i += 30)
                   int initX = i;
                   int x = initX + initPlacement;
                   GRect brick = new GRect(x, 0, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 60; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 15;
                   int y = 12;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 90; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 30;
                   int y = 24;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 120; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 45;
                   int y = 36;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 150; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 60;
                   int y = 48;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 180; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 75;
                   int y = 60;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 210; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 90;
                   int y = 72;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 240; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 105;
                   int y = 84;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 270; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 120;
                   int y = 96;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 300; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 135;
                   int y = 108;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 330; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 150;
                   int y = 120;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 360; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 165;
                   int y = 132;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 390; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 180;
                   int y = 144;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
              for (int i = 0; i < 420; i += 30)
                   int initX = i;
                   int x = (initX + initPlacement) - 195;
                   int y = 156;
                   GRect brick = new GRect(x, y, BRICK_WIDTH, BRICK_HEIGHT);
                   add(brick);
         }So yeah, it's very ugly. not general. BUT now; I know the logic of the program..
    I need to change 3 variables here.
    the Y var, the X variable, and the size of the loop test..
    so I need to make a one compact for loop that will change those 3 for every time the loop finish, or for every row the variable will change...
    Ill try to think again, ill head to the balcony, and squeeze my brain. YEAH it took me this long to figure this out, anyway im a noob YET. But i was working a while ago.
    ANYWAY, leave some tips please.. I NEED TIPS NOT SOLUTION

  • How to find out top 10 records from the R/3 using Java code (WD Program)

    Hi Experts,
    I have used Java Web Dynpro program to fetch records from the backend. Following code helps me and fetches record. As per the customer reqirement, we have to fetch only top 10 records (Actual Cost) from the backend. So I have to modify the Java code. How I can do so? Please help.
              wdContext.nodeGraphData().invalidate();
              IPublicCostcnt.IGraphDataElement categoryElement;
                   for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
                   categoryElement = wdContext.createGraphDataElement();
                   categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
                   categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
                   categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
                   wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

    Dear SDN Users,
    This is how I resolved the issue.
    1) Requested ABAPer to provide me sorted data. The data has been sorted in descending order of actual_cost.
    2) After that I used following code. This resolved the issue.
         if (wdContext.nodeItab_Final1().size()>10){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < 10; i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
         if (wdContext.nodeItab_Final1().size()<=10){
         if (wdContext.nodeItab_Final1().size()>0){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

  • How to use java programe in oracle form

    Hello Expert,
    My Config is : -
    Forms [32 Bit] Version 11.1.1.3.0 (Production)
    Jdeveloper - 10.1.3
    I want to use the java programe in form builder. I create the one java class in Jdeveloper -
    package demo;
    import java.net.InetAddress;
    import java.net.NetworkInterface;
    import java.net.SocketException;
    import java.net.UnknownHostException;
    public class get_info{
       public static void main(String[] args){
       ch_add();
       public static void ch_add()
      InetAddress ip;
      try { 
      ip = InetAddress.getLocalHost();
      /*System.out.println("Current IP address : " + ip.getHostAddress());  */
      NetworkInterface network = NetworkInterface.getByInetAddress(ip);
      byte[] mac = network.getHardwareAddress();
      /*System.out.print("Current MAC address : ");   */
      StringBuilder sb = new StringBuilder();            
      for (int i = 0; i < mac.length; i++)
      sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""));
      System.out.println(sb.toString()); 
      } catch (UnknownHostException e) {
      e.printStackTrace();
      } catch (SocketException e){
      e.printStackTrace();
    and this into Formweb.cfg and default.env and also add into Form_class_path. After that i import this java into forms.
    Code genertated -
    PACKAGE BODY get_info IS
      -- DO NOT EDIT THIS FILE - it is machine generated!
      args   JNI.ARGLIST;
      -- Constructor for signature ()V
      FUNCTION new RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
      END;
      -- Method: main ([Ljava/lang/String;)V
      PROCEDURE main(
        a0    ORA_JAVA.JARRAY) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
      END;
      -- Method: ch_add ()V
      PROCEDURE ch_add IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
      END;
      -- Method: wait (J)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
      END;
      -- Method: wait ()V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
      END;
      -- Method: wait (JI)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER,
        a1    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(2);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.ADD_INT_ARG(args, a1);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
      END;
      -- Method: equals (Ljava/lang/Object;)Z
      FUNCTION equals(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
      END;
      -- Method: toString ()Ljava/lang/String;
      FUNCTION toString(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
      END;
      -- Method: hashCode ()I
      FUNCTION hashCode(
        obj   ORA_JAVA.JOBJECT) RETURN NUMBER IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
      END;
      -- Method: getClass ()Ljava/lang/Class;
      FUNCTION getClass(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
      END;
      -- Method: notify ()V
      PROCEDURE notify(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
      END;
      -- Method: notifyAll ()V
      PROCEDURE notifyAll(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
      END;
    BEGIN
      NULL;
    END;
    Now i want to call the o/p of Java programe in oracle text item. Please help me. It's very urgent. I am not good in Java.

    Sir i use java importer.
    PACKAGE BODY get_info IS
      -- DO NOT EDIT THIS FILE - it is machine generated!
      args   JNI.ARGLIST;
      -- Constructor for signature ()V
      FUNCTION new RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
      END;
      -- Method: main ([Ljava/lang/String;)V
      PROCEDURE main(
        a0    ORA_JAVA.JARRAY) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
      END;
      -- Method: ch_add ()V
      PROCEDURE ch_add IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
      END;
      -- Method: wait (J)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
      END;
      -- Method: wait ()V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
      END;
      -- Method: wait (JI)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER,
        a1    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(2);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.ADD_INT_ARG(args, a1);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
      END;
      -- Method: equals (Ljava/lang/Object;)Z
      FUNCTION equals(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
      END;
      -- Method: toString ()Ljava/lang/String;
      FUNCTION toString(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
      END;
      -- Method: hashCode ()I
      FUNCTION hashCode(
        obj   ORA_JAVA.JOBJECT) RETURN NUMBER IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
      END;
      -- Method: getClass ()Ljava/lang/Class;
      FUNCTION getClass(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
      END;
      -- Method: notify ()V
      PROCEDURE notify(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
      END;
      -- Method: notifyAll ()V
      PROCEDURE notifyAll(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
      END;
    BEGIN
      NULL;
    END;
    I read both document which is given by you.
    Basicaly i don't know how to call java program in form builder.
    I wrote this code on When-button-pressed
    DECLARE
    jo ora_java.jobject;
    rv varchar2(1500);
    ex ora_java.jobject;
    BEGIN
    jo := get_info.new;
    rv:=get_info.ch_add(jo );
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
      message (' Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR );
      message('');
    WHEN ORA_JAVA.EXCEPTION_THROWN then
      ex := ORA_JAVA.LAST_EXCEPTION;
      message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
      message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
    END;
    No error comes and no output comes. I want the client MAC ID. please guide me where i need to change the code.

  • How to create a directory or Folder  using java program?

    Hi all,
    Can any one know, how to create a directory(new folder) in java.
    can any give me some idea, on creating a directory using java program dynamically.
    thanx in advance

    hi thanks for your answer,
    sorry, actual i know this technique(its my fault i didnt mentioned it)
    i am looking for some what different technique.
    bye
    ram

  • How Can I execute a java program using java code?

    {color:#000000}Hello,
    i am in great trouble someone please help me. i want to execute java program through java code i have compiled the java class using Compiler API now i want to execute this Class file through java code please help me, thanks in advance
    {color}

    Thanks Manko.
    i think my question was not clear enough.. actually i want to run this class using some java code . like any IDE would do i am making a text editor for java, as my term project i have been able to complie the code usign compiler api and it genertaes the class file but now i want to run this class file "THROUGH JAVA CODE" instead of using Java command. I want to achive it programatically. do you have any idea about it.. thanks in advance

  • New "Windows Programming Using Java" Website

    Our newly created "Windows Programming Using Java" website (http://fivedots.coe.psu.ac.th/~ad/winJava/) is for programmers who want to extend Java's capabilities on Windows XP and/or Vista, but aren't sure where to start. One of the drawbacks of Java's portability is that many Java programmers have a rather sketchy knowledge of Windows-specific programming.
    We plan to explain how Java applications can utilize Windows application software, OS features, and hardware beyond the reach of Java's standard libraries. A variety of Java/Windows programming techniques will be explained, including:
    * Java's employment of the Win32 API via C, JNI, and J/Invoke.
    * Java's utilization of Window's Command Line Interface (CLI) and batch files, accessed through Java's Runtime, ProcessBuilder, and Process classes.
    * Java and Windows object-based scripting, centered around the use of VBScript, Windows Script Host (WSH), and Windows Management Instrumentation (WMI).
    * Java interoperability with COM, including hosting of ActiveX controls in Swing containers using jacoZoom.
    This website is a work in progress, with four chapters available for download at the moment. We'll be adding more regularly, and would love feedback on what we're doing.
    Thanks,
    Gayathri Singh and Andrew Davison
    [email protected] and [email protected]
    Edited by: AndrewDavison on Jun 20, 2008 1:36 AM

    Hi, I am looking the similar kind of requirement that you had done.. Do you have any more details on the code that is working for you . All i need is if the user logs in successfully in windows, the the app should be accessible. Please let me know if you have the code with you on this problem.
    Thanks in advance
    "what i meant is the we b applications running in my system, when i access the application iam able to to login automatically with windows authentication and now in case of other users following process happened:"

  • Accessing seured website using java URL/Socket programming

    Hi,
    I am working on an intranet search engine using java URL and Authenticator class. This is a secured web-site using SSL in http server. I am not able to access the password protected pages. Following is the code:
    URL url = new URL("https://*************");
    URLConnection connection = url.openConnection();
    PasswordAuthentication pa = Authenticator.requestPasswordAuthentication( InetAddress.getByName(connection.getURL().getHost()),
    connection.getURL().getPort(), connection.getURL().getProtocol(), null, "Basic");
    StringBuffer buf = new StringBuffer("*****************");
    buf.append(":");
    buf.append("************");
    String encoded = new sun.misc.BASE64Encoder().encode(buf.toString().getBytes());
    connection.setRequestProperty ("Authorization", "Basic" + encoded);
    InputStream content = (InputStream)connection.getInputStream();
    BufferedReader in = new BufferedReader (new InputStreamReader (content));
    String line;
    while ((line = in.readLine()) != null) {
    System.out.println(line);
    Let me know if there is any other alternative
    tnx,
    Biswajit Biswal

    Below is my first test program. I first take the home page of a website (this can be automated later) and save it to "myTest.html". Then I try to see if this page contains the keywords that a company website often has.
    Could you give your opinion on this approach?
    If this approach is fine, then any idea about the keywords to select a company website from other sites is welcome.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    public class MyTest {
          * @param args
          * @throws IOException
         public static void main(String[] args) throws IOException {
              InputStream in = MyTest.class.getResourceAsStream("/myTest.html");
              Reader reader = new InputStreamReader(in, "UTF-8");
              BufferedReader bufferedReader = new BufferedReader(reader);
              String line;
              while ((line = bufferedReader.readLine()) != null) {
                   line=line.toLowerCase();
                   if (line.contains("contact us")) {
                        System.out.println("contact us: line = "+line);
                   if (line.contains("career")) {
                        System.out.println("career: line = "+line);
                   if (line.contains("company")) {
                        System.out.println("company: line = "+line);
                   if (line.contains("about us")) {
                        System.out.println("about us: line = "+line);
                   if (line.contains("product")) {
                        System.out.println("product: line = "+line);
              bufferedReader.close();
              reader.close();
    }

  • Java programming language uses call by reference for objects?

    Is Java programming language uses call by reference for objects?

    Yes. You make calls to an object via itsreference.
    No.Yes, you're referring to passing a reference into a
    method in which case the value of the
    reference is passed.I believe the OP is using the term "call by reference" to mean "pass by reference." The two are interchangable, AFAIK. So, while "making calls to an object via its reference" is correct, I don't believe it's germane to the question.

Maybe you are looking for

  • Thai characters not displaying correctly within App

    Hi everyone, I have a Adobe Flex Mobile app displays Thai text, however this is not displaying correctly. While developing the App on my Windows machine and testing using the Adobe Flash Builder mobile emulator, the font/characters look correct. Howe

  • Can't rename bins

    Hey everyone, While I'm a seasoned Avid-PC user, I'm fairly new to FCP and I've run into an odd problem that I imagine has a simple solution. As far as I'm aware, you rename bins by double clicking the name, highlighting it, and typing in the new nam

  • (PVID) inconsistency *PVID_Inc Issue

    Hello, Issue: Vlan 1 is in (PVID) inconsistency state on the Core switch for some access switches trunk ports. Native Vlan is 1 (same on all the switches) Find the output below:Core Switch (6513) SW-Core#sh spanning-tree inconsistentports Name Interf

  • Behaviors and .dir gallery

    The old Mediamacros is almost done. So, what is the best source for this material? Can we create one for all us? what say you guys?

  • Zen Micro: Headphone jack (HE

    My first and most major problem is with my headphone jack. I first noticed this problem when I was listening to my Zen on my headphones. It seems that if the jack is in one direction, it will only play certain tracks of whatever song I am listening t