Help regarding Java

Can java work on Dos Operating System ???.

Sun Java (and all derived versions) will not work on MSDOS (or any of its derived versions.) There was supposedly something that ran and was named Java(?), but no more. If you mean a DOS (Disk Operating System) other than MSDOS, I have no idea.

Similar Messages

  • Need help regarding Java decoding of IMAP attachment (IOStream related ques

    Hi ,
    I need some help regarding the processing of an IMAP attachment , It is a basic IOStream related question I guess.
    I have some attachment to a mail , I try to fetch it using javamail and read the content and write it to a file , I was able to do it successfully when I was using stream.read( tempBuffer) function but when I started using stream.read( tempBuffer, 0, m_maxDataSize ); it is giving me following exception
    java.io.IOException: Error in encoded stream: needed at least 2 valid base64 characters, but only got 1 before padding character (=), the 10 most recent characters were: "/59PT/eXQ="
         at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:259)
         at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:148)
    ***Here is the snippet of code that is running this:***
    m_contentObj = m_message.getContent();
    if(m_contentObj instanceof InputStream)
         System.out.println(" Content is type of InputStream");
         InputStream stream = (InputStream) m_contentObj;
         byte[] tempBuffer = new byte[m_maxDataSize];
         stream.skip( m_currPos );
         int bytesRead=stream.read( tempBuffer, 0, m_maxDataSize );
         System.out.println(" Read the following no of bytes from the Object::"+bytesRead);
         m_currPos+=     bytesRead;
    Please suggest what to do.
    Thanks & Regards
    Saurabh

    BUMP, just incase its been missed by a new board member

  • Need Help Regarding JAVA BEAN

    Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
    thanks in advance
    Rehan MIrza

    Here is a good link that indicate that JavaBean is not only for applets
    http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
    quote:
    The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
    Francois

  • Help regarding Java Swing

    Hi All,
    I am a bit confused witht the shortcut syntax for adding action listeners for event handling.
    In the Java tutorial it is mentioned that for implementing an event handler following are the three steps:
    1. Create a class that implements ActionListener interface.
    For example:
    public class MyClass implements ActionListener {
    2. Registers an instance of the event handler class as a listener on one or more components.
    For example:
    someComponent.addActionListener(instanceOfMyClass);
    3. In the event handler class, a few lines of code implement the methods in the listener interface.
    For example:
    public void actionPerformed(ActionEvent e) {
    ...//code that reacts to the action...
    In the tutorial a shortcut syntax is also given:
    For Example:
    Class TestApp {
    JButton btn = new JButton("Test");
    btn.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    ...//code that reacts to the action...
    My doubt is:
    1. How are we allowed to create an instance of ActionListener which is an "interface". (doesnt addActionListener expect instance of a class that implements the ActionListener interface? )
    2. How are we able to access local variables of class "TestApp" the inside the actionPerformed() function.
    Could anyone explain more about this shortcut syntax of adding action listeners?
    Thanks in regards
    Arun

    The example uses so-called "anonymous inner classes". ActionListener is an interface, of course. But if you use the construct
    new ActionListener() {
       public void actionPerformed(ActionEvent e) {
       ...//code that reacts to the action...
    }this is about equivalent to defining an inner class
    private class MyActionListener implements ActionListener {
       public void actionPerformed(ActionEvent e) {
       ...//code that reacts to the action...
    }and using that class. The difference is mainly, that the in nthe shortcut notation the class has no explicit name, it is anonymous.
    There are advantages and disadvantages to that. The main disadvantage is, that you create a large amount of classes in this way. I've read somewhere, that SUN is planning to rewrite the examples without the use of anonymous inner classes.

  • Help regarding java.lang.UnsatisfiedLinkError

    Hi everyone ,
    I have a doubt regarding native property. I am using eclipse I wrote a program (inputoutput.java) to clear the screen after printing a line. This program creates an object (�console�) of �test� class and calls �clear� method. The test class loads the �ClearFunc.dll� file. I placed the ClearFunc.dll file along with the other class files. When I execute it is giving the following error.
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no ClearFunc.dll in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at inputoutput.test.<clinit>(test.java:15)
    at inputoutput.Printing.printing(inputoutput.java:22)
    at inputoutput.inputoutput.main(inputoutput.java:51)
    �test.java code�
    package inputoutput;
    public class test {
    //static final String path ="D:/java_workspace/input_output/bin/inputoutput/ClearFunc";
    public native void clear();
    /*public static void main(String[] args) {
    new test().clear();
    static {
    try{
    System.out.println("hi");
    System.loadLibrary("ClearFunc.dll");
    System.out.println("hello");
    catch(Exception e)
    System.out.println(e.toString()+"santhu");
    e.printStackTrace();
    "inputoutput.java code"/**
    package inputoutput;
    import java.io.*;
    * @author Santhosh_Thadvai
    class Printing implements Runnable{
         Thread t;
         public void run(){
         public void printing()throws IOException,FileNotFoundException {
              try{
                   test console = new test();
                   t=new Thread();
              t.start();
              FileInputStream fileinputstream = new FileInputStream("out.txt");
              int value = fileinputstream.read();
              while(value!=-1){
                   System.out.print((char)value);
                   Thread.sleep(50);
                   value=fileinputstream.read();
                   if((char)value=='\n')
                        console.clear();
              fileinputstream.close();
              catch(InterruptedException e){
                   System.out.println(e);
    public class inputoutput {
         * @param args
         public static void main(String[] args) throws IOException {
              Printing b=new Printing();
              b.printing();
    }

    plz, surround your code with : [code ] [ /code ]

  • Urgent help regarding Java regular expressions.

    hello everyone,
    I am trying to parse a html file which contains
    dyn.Img("http://www.boston.com/news/nation/articles/2007/06/21/bill_clinton_takes_bigger_campaign_role&h=306&w=410&sz=13&hl=en&start=43","","QFo9lqKeMR7uzM:","http://cache.boston.com/resize/bonzai-fba/AP_Photo/2007/06/21/1182410228_1931/410w.jpg","125","93","\x3cb\x3eBill Clinton\x3c/b\x3e takes bigger campaign \x3cb\x3e...\x3c/b\x3e","","","410 x 306 - 13k","jpg","www.boston.com","","","http://tbn0.google.com/images","1")
    the given above function many times. I have to fetch the whole functions into an array. So i have to write a regular expression which recognises the whole above string.
    Can anyone please help me.
    Thank you,
    chaitanya

    well if this is all you want
    http://cache.boston.com/resize/bonzai-fba/AP_Photo/2007/06/21/1182410228_1931/410w.jpg
    You can always substring it like chuck said
    ***BUT all the images would have to be .jpg for this to work***
    back = we.indexOf(".jpg");
    int x = 0;
    while (back < web.lastIndexOf(".jpg"))
                    back = web.indexOf("http",back+1);
                    picture[x] = web.substring(front, back);
                    x++;
                    front = back;
                  }       Might not be the best code but it worked with a website i had to parse
    Message was edited by:
    mark07

  • XI Mail Adapter: sending emails with attachment with help of java mapping

    Hi ,
    On trying out the scenerio mentioned in the blog, using the java mapping provided
    "XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    The scenerio works just fine.
    But the payload as the content of the attachment is not getting generated in proper XML format.
    I suppose it's because of the replace special characters code part..
    Can anyone help me state the modification required in the code.
    Thanks!
    Regards,
    Faria Mithani

    It might be a codepage issue. Is your original payload UTF-8?

  • Help with java mapping

    PI File adapter has a processing option u2018Empty-Message Handlingu2019 to ignore or Write Empty Files. In case there is no data created after mapping on target side then this option determines whether to write an empty file or not. But there is a catch to this option when it comes to using it with File Content Conversion which is described in SAP Note u2018821267u2019. It states following:
    I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory?  Example of such a payload generated from mapping is as follows:                                                           
    <?xml version="1.0" encoding="UTF-8"?>                          
    <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>
    solution :
    If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done:
    Using a Java or ABAP Mapping in order to restrict the creation of node itself during mapping. (This cannot be achieved via Message Mapping)
    Using standard adapter modules to do content conversion first and then write file. 
    can someone help with java mapping that can be used in this case?

    Hi,
        You have not mentioned the version of PI you are working in. In case you are working with PI 7.1 or above then here is the java mapping code you need to add after message mapping in the same interface mapping
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class RemoveRootNode extends AbstractTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    public void transform(TransformationInput arg0, TransformationOutput arg1)
              throws StreamTransformationException {
         // TODO Auto-generated method stub
         this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    In case you are working in PI 7.0 you can use this code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveRootNode implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    The code for PI 7.0 should also work for PI 7.1 provided you use the right jar files for compilation, but vice-versa is not true.
    Could you please let us know if this code was useful to you or not?
    Regards
    Anupam
    Edited by: anupamsap on Dec 15, 2011 9:43 AM

  • Regarding java mapping in SAP XI

    Hi Friends,
                    I need help on java mapping.In java mapping in design side in the receivermessage interface by right clicking on and selecting java proxy generation. here i have a doubt ,we have to select both sender and receiver interfaces are not.please send me any info regarding This issue.

    Hi Vuday,
    Java Proxy
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    Thanks,
    Satya Kumar

  • Help regarding :Video Segmentation & Summerization

    hello friends,
    I am doing my project on above topic and I am trying it with Java.
    Is it possible doing it in Java.
    What Techniques I'm using are:
    1.Java(JMF)
    2.Oracle 9i(Inter-Media)
    3.Matlab
    This project concludes of four parts
    1.Segmentation (Video to Image conversion)
    2.Comparison (Copare frame using algo.)
    3.Extraction (remove duplicate frames based on algo)
    4 Summarization (Collect frames and form a new content based video)
    Is It possible in Java? How?
    Seeking for help regarding this .
    Thank you.

    This project concludes of four parts
    1.Segmentation (Video to Image conversion)
    2.Comparison (Copare frame using algo.)
    3.Extraction (remove duplicate frames based on algo)
    4 Summarization (Collect frames and form a new content based video)So, compressing that into a simple question instead of a convoluted one... you just want to remove duplicate frames from a video and save it to file?

  • In Office 2011 the function "share it by e-mail" seems to be disabled. that happened recently, just after the apple update regarding Java. Any idea on how enable this function again?

    in Office 2011 the function "share it by e-mail" seems to be disabled. that happened recently, just after the apple update regarding Java. Any idea on how enable this function again?

    I was able to get to a support person who helped me fix this without charge. I guess it was my bad for not trying the right way to access support.
    Anyway, they answer is this.
    I had to create a new account on my computer. When I logged into the new account it immediately wanted an AppleID. I used my daughter's e-mail address for the AppleID. This setup the internet accounts correctly with her iCloud.com e-mail address. I was then able to access e-mail in both the browser and Mail. Not that complicated but nothing that I would have easily thought up on my own.
    Thank Apple Support!

  • Need help regarding converting text to Lines and Arcs.

    In my program i have text.Lets say the text is JAVA.
    Now i need to group that text(JAVA) in the form of line and arcs.
    Its like organizing lines and arcs and make it looks like a text(JAVA).
    Can we have such a possibilities to do that?
    Please help regarding this!!
    Thanks in Advance.
    Boopathy.

    Have a look at TextLayout class (http://java.sun.com/javase/6/docs/api/java/awt/font/TextLayout.html)
    Graphics2D g = ...;
    Point2D loc = ...;
    Font font = Font.getFont("Helvetica-bold-italic");
    FontRenderContext frc = g.getFontRenderContext();
    TextLayout layout = new TextLayout("This is a string", font, frc);
    Shape shape = layout.getOutline(null);
    Edited by: AlexeyUshakov on Sep 29, 2008 8:46 AM

  • Re: PLEASE HELP regarding CLASSPATH anyone?

    I am desperate to research on Lucene but i can't understand on how to create the class path in java classpath.
    Hence i really need help regarding this.
    THANKS!

    this is for your Tim
    http://www.darksleep.com/lucene/
    isha,
    whats your exact problem?
    are you using any libraries of lucene?
    if using how are you setting the classpath?

  • Help Regarding Emoticons....('',)    ??

    Hello to all experts,
    I need some help regarding my Chat program...
    Can anybody should tell me how to access Emoticons images from a particular destination or source using a java code....
    Or Is there any way to access that emoticons using XML file...so that it will then read from a Java code....??
    XML file look like as :-
    <root>
    <img1>path of the image or emoticon</img1>
    <img2>.........................     ........................</img2>
    </root>By using above file i will read emoticons using Java code....??
    Is there any function , Method or a sample code to do that job...
    Thanks in Advance.....

    Thanks DrClap....
    One More thing I want to knw from you.....
    Actually Other then this Emoticons help....
    I had given a post in Java Help System for getting help regarding How to open a HelpSet file from a java code By just putting JH.Jar in my Lib path.
    I am using the following program to do so...
    public class JavaHelpDemo extends JFrame
    private HelpBroker someHelpBroker;
    public JavaHelpDemo()
    HelpSet hs;
    try
            File f = new File("Master.hs");
            URL url = f.toURL();
            hs = new HelpSet (null, url);
            HelpBroker hb = hs.createHelpBroker();
            new CSH.DisplayHelpFromSource(hb);
            hb.setDisplayed(true);
          catch (Exception a)
            System.out.println("Error is here");
            System.out.print(a);
    // constructor
    public static void main(String[] args)
    JavaHelpDemo javaHelpDemo1 = new JavaHelpDemo();
    }//classActually my this program is running well and I m getting my helpset only when i insert all my files with htmls in my source path.....
    I hav created a Jar or all these files and named it Help.jar
    is there any way just to call that helpset using this jar without giving all files into source path.....
    Regards,
    Daman.

  • Need help regarding icon loading

    can i get help regarding icon loading in oracle forms???

    ok make a folder name it icons and copy all u r gif icons and paste in the same folder(icons) and then copy the icons folder and paste in
    D:\DevSuiteHome_1\forms\java\oracle\forms
    when u want to display icon then do not use .gif(Note: sometimes also works with .gif) and one thing more becare about capital letter of gif-icons.it should be in small letter.i hope u understand.
    sarah

Maybe you are looking for