Is Eclipse a 100% pure Java program?

Is Eclipse a 100% pure Java program?

Eclipse runs on linux, windows, MAc OS X and I think a few others. It has native widgets via SWT for those platforms using the native OS Look and Feel. It is smoother than Swing in most ways, yet Swing does have some advantages as well. SWT is a nice kit. It would be nice if the Swing Team took the idea of building a cross platform native GUI kit into the AWT/Swing layer so that Swing was even faster. I think Swing and SWT are great, only I wish Swing had provided what SWT does (in some ways) so that Swing would have been used and SWT never written. It's a shame, but then again, perhaps it promotes the Swing Team to make Swing better/faster.
Look at Swing on Mac OS X, it is very nice, looks like native OS (because Apple wrote their own L&F for Mac OS X Only), but it is faster than Swing on Windows/Linux.

Similar Messages

  • 100% Pure Java Program

    I have seen that the 100% Pure Java Program has "completed the Sun End of Life process and it is no longer supported by Sun" (see http://java.sun.com/100percent/).
    Can anyone explain to me why is this, and what alternatives do we have now to be Java Certified (if any)?
    Thanks.

    It's disturbing but probably not end of the world.
    I like this:
    "Any use of product on this page is at the sole discretion of the developer and Sun assumes no responsiblity for any resulting problems."
    Do they mean that jdk 1.4 is bugless and they are resposible for any problems if something happens?
    I do not think so.

  • Where is the "100% Pure Java Check" ?

    Dear friends,
    few years ago we had a very popular application called 100% Pure Java Checker.. a tool used to verify the portabiliy of Swing Programs...
    is there something similar nowadays ?
    where ?

    JavaPureCheck has completed the Sun EOL process and is no longer supported.

  • Opening a project in Eclipse by using a java program from outside..

    Hi friends,
    I have a java program which will open the Eclipse editor..now i want to open a file , in a specifeid path, in that eclipse. I completed opening the eclipse editor and also i m fetching the file which in a particular path..my problem is i couldnt open that file in eclipse by using my java program..
    i donno how to open a particulat file or proj in the eclipse from outside java prog.
    thanks,
    Krishna

    Try this:
    Error "This project contained a sequence that could not be opened" 

  • 100 % Pure Java Certification !!!

    I have a product developed in Java 2. The product is developed entirely in Java and is platform independent. I want to go in for the 100 % Pure Java Certification from Sun Microsystems. Can someone let me know how to go about getting this certification.
    Thanks a lot in advance.
    chet888

    Hi, here is something that I have found very useful..
    http://cramsession.brainbuzz.com/cramsession/sun/java2
    Let me know if you need any more information..Hi Geetanjali,
    Well your site does not mention anything about product certification, it only talks about Sun Certification of Progammers. If you have any idea about product certification, please let me know asap.

  • 100% pure Java

    Does Sun have to formally authenticate one's code as 100% pure Java or is this purely an informal tag that the developer uses to show people it will run on any platform.
    Ta

    Its not possible to write a 100% pure usfull java project (meaning a project with
    some form of input or output), but the code is not system dependent. what? Java was written to provides cross platform compatitable. ou can write useful application that is 100% pure Java and is not System dependant.
    look at the Java API...it's prett abstract from the operating system. Of course, thee are libraries (3rd party) that aimed at a specific OS (such as Jakarta POI library)

  • How to create a setup.exe from a pure java program

    i have some program using pure Java Swing.... i already created jar files to make it executable everytime you click on the icon... but i want to create a installer type like setup.exe just like in VB....
    How on earth can I do that?!?
    Thanks!

    This is one...
    http://www.excelsior-usa.com/jet.html
    And there are a lot more like jexe n stuff.
    But look out. Only some convert it to pure native
    form. The rest are only launchers - you would still
    need a JRE to run yer program.
    extremely sorry. Didnt read the post properly .Sorry

  • 3D environment in pure java programming

    hi all,
    my problem is dat...
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    </applet code="project1" width=1024 height=768>
    </applet>
    public class project1 extends Frame implements ActionListener , MouseListener {
         deathscreen screen=new deathscreen();
         int choice;
         project1(){
              super("3D-Image Processor");
              setSize(1026,768);
              setVisible(true);
              setResizable(true);
              addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent we){System.exit(0);}});
              addMouseListener(this);
    //MENU BAR----------------------------------------------------------------------------------------------------------
              MenuBar mbar=new MenuBar();
              setMenuBar(mbar);
              Menu file=new Menu("File");
              MenuItem item1,item2,item3,item4;
              file.add(item1=new MenuItem("New...."));
              file.add(item2=new MenuItem("Open..."));
              file.add(item3=new MenuItem("-"));
              file.add(item4=new MenuItem("Close.."));
              mbar.add(file);
              Menu edit=new Menu("Edit");
              MenuItem item5,item6,item7;
              edit.add(item5=new MenuItem("Cut...."));
              edit.add(item6=new MenuItem("Copy..."));
              edit.add(item7=new MenuItem("Paste.."));
              mbar.add(edit);
              Menu components=new Menu("Components");
              MenuItem item9,item10;
              components.add(item9=new MenuItem("Canvas............"));
              components.add(item10=new MenuItem("General Properties"));
              mbar.add(components);
              Menu help=new Menu("Help");
              MenuItem item11=new MenuItem("Help...");
              help.add(item11);
              mbar.add(help);
              //MyMenuHandler handler=new MyMenuHandler(this);
              item1.addActionListener(this);
              item2.addActionListener(this);
              item3.addActionListener(this);
              item4.addActionListener(this);
              item5.addActionListener(this);
              item6.addActionListener(this);
              item7.addActionListener(this);
    //Item8 destroyed(Component class removed)
              item9.addActionListener(this);
              item10.addActionListener(this);
              item11.addActionListener(this);
    //CALL OF INDIVIDUAL COMPONENTS------------------------------------------------------------------------------          
              screen.setVisible(true);
              screen.setResizable(true);
         public static void main(String args[]){
              new project1();
         public void paint(Graphics g){
              setBackground(Color.gray);
         public void actionPerformed(ActionEvent e){
              if(e.getActionCommand()=="Close.."){
                   System.exit(0);
              if(e.getActionCommand()=="Canvas............"){
                   screen.setVisible(true);
              if(e.getActionCommand()=="General Properties"){
                   screen.gen.setVisible(true);
    //MOUSE COMPONENTS---------------------------------------------------------------------------------------------
         public void mouseClicked(MouseEvent me){
              screen.setVisible(true);
              screen.gen.setVisible(true);
         public void mouseEntered(MouseEvent me){}
         public void mouseExited(MouseEvent me){}
         public void mousePressed(MouseEvent me){}
         public void mouseReleased(MouseEvent me){}
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.io.*;
    class genproperties extends Frame implements AdjustmentListener,ActionListener{
         Scrollbar red;
         Scrollbar blue;
         Scrollbar green;
         Canvas colour;
         Label r;
         Label g;
         Label b;
         Scrollbar thickness;
         Scrollbar height;
         Label th;
         Label he;
         Button SelectRect;
         Button SelectPoly;
         Button DrawRect;
         Button DrawPoly;
         Button DrawCircle;
         Button DrawLine;
         Button Pencil;
         Button Plotter;
         FileOutputStream temp;     
         int choice=0,i=0;
    int props[][]=new int[1000][40],fin;
    /*     props--->     0=choice of draw item
                   1=red
                   2=blue
                   3=green
                   4=thickness
                   5=height
                   6=x1     |
                   7=y1     | of the chosen
                   8=x2     | component
                   9=y2     |
         genproperties(){
              super("General Properties");
              try{
              temp = new FileOutputStream("Z:\temp.txt");
              }catch(FileNotFoundException _ex){}
              setSize(270,695);
              setLocation(10,45);
              setResizable(false);
              setLayout(null);//new FlowLayout());
              setBackground(Color.gray);
    //GENERAL PROPERTIES OF ALL DRAWING COMPONENTS <LOOKS>-------------------
    //Color of individual components
              red=new Scrollbar(Scrollbar.HORIZONTAL,0,1,0,256);
              blue=new Scrollbar(Scrollbar.HORIZONTAL,0,1,0,256);
              green=new Scrollbar(Scrollbar.HORIZONTAL,0,1,0,256);
              Label lc=new Label("CHOSEN COLOR",Label.CENTER);
    //thickness and height of individual components
              thickness=new Scrollbar(Scrollbar.HORIZONTAL,0,1,1,6);
              height=new Scrollbar(Scrollbar.HORIZONTAL,0,1,0,256);
              th=new Label("Thickness=0");
              he=new Label("Height=0");
    //Individual components
              SelectRect=new Button("Select Rectangle");
              SelectPoly=new Button("Select Polygon");
              DrawRect=new Button("Rectangle");
              DrawPoly=new Button("Polygon");
              DrawCircle=new Button("Circle");
              DrawLine=new Button("Line");
              Pencil=new Button("Pencil");
              Plotter=new Button("Plotter");
              r=new Label("RED=0");
              g=new Label("BLUE=0");
              b=new Label("GREEN=0");
              colour=new Canvas();
              red.setBounds(5,50,256,15);
              blue.setBounds(5,100,256,15);
              green.setBounds(5,150,256,15);
              colour.setBounds(50,210,170,100);
              lc.setBounds(50,330,170,30);
              r.setBounds(80,70,70,20);
              b.setBounds(77,120,70,20);
              g.setBounds(75,170,75,20);
              thickness.setBounds(30,380,200,15);
              height.setBounds(5,430,256,15);
              th.setBounds(80,400,100,20);
              he.setBounds(90,450,100,20);
    //Chosen color display
              colour.setBackground(Color.black);
              r.setBackground(Color.gray);
              b.setBackground(Color.gray);
              g.setBackground(Color.gray);
              SelectRect.setBounds(20,500,100,30);
              SelectPoly.setBounds(150,500,100,30);
              DrawLine.setBounds(20,530,100,30);
              DrawRect.setBounds(150,530,100,30);
              DrawPoly.setBounds(20,560,100,30);
              DrawCircle.setBounds(150,560,100,30);
              Pencil.setBounds(20,590,100,30);
              Plotter.setBounds(150,590,100,30);
              add(red);
              add(blue);
              add(green);
              add(colour);
              add(lc);
              add(r);
              add(g);
              add(b);
              add(thickness);
              add(th);
              add(height);
              add(he);
              add(SelectRect);
              add(SelectPoly);
              add(DrawLine);
              add(DrawRect);
              add(DrawPoly);
              add(DrawCircle);
              add(Pencil);
              add(Plotter);
              thickness.addAdjustmentListener(this);
              height.addAdjustmentListener(this);
              //colour.setBackground(Color.red);
              red.addAdjustmentListener(this);
              blue.addAdjustmentListener(this);
              green.addAdjustmentListener(this);
              SelectRect.addActionListener(this);
              SelectPoly.addActionListener(this);
              DrawLine.addActionListener(this);
              DrawRect.addActionListener(this);
              DrawPoly.addActionListener(this);
              DrawCircle.addActionListener(this);
              Pencil.addActionListener(this);
              Plotter.addActionListener(this);
    //To escape array from getting into nullpointer exception.....
              /*int j=0;
              for(i=0;i<1000;i++){
                   for(j=0;j<6;j++){
                        props[i][j]=0;
         public void paint(Graphics g){
              setBackground(Color.gray);
              g.setColor(Color.black);
              g.fillRect(40,200,190,120);
         public void adjustmentValueChanged(AdjustmentEvent ae){
              colour.setBackground(new Color(red.getValue(),green.getValue(),blue.getValue()));
              r.setText("RED="+new Integer(red.getValue()).toString());          
              b.setText("BLUE="+new Integer(blue.getValue()).toString());          
              g.setText("GREEN="+new Integer(green.getValue()).toString());     
              th.setText("Thickness="+new Integer(thickness.getValue()).toString());
              he.setText("Height="+new Integer(height.getValue()).toString());
    //Array props being initialized to store attribute values of
    //individual components to feed into file for later use......
              props[1]=red.getValue();
              props[i][2]=blue.getValue();
              props[i][3]=green.getValue();
              props[i][4]=thickness.getValue();
              props[i][5]=height.getValue();
              //System.out.println("Ch:"+props[i][0]+" R:"+props[i][1]+" B:"+props[i][2]+" G:"+props[i][3]+" Th:"+props[i][4]+" He:"+props[i][5]+" i:"+i);
         public void actionPerformed(ActionEvent e){
              if(e.getActionCommand()=="Pencil"){
                   i=++i;
                   choice=7;
              if(e.getActionCommand()=="Line"){
                   choice=6;
                   i=++i;
              if(e.getActionCommand()=="Circle"){
                   choice=5;
                   i=++i;
              if(e.getActionCommand()=="Polygon"){
                   choice=4;
                   i=++i;
              if(e.getActionCommand()=="Rectangle"){
                   choice=3;
                   i=++i;
              if(e.getActionCommand()=="Select Polygon"){
                   choice=2;
                   i=++i;
              if(e.getActionCommand()=="Select Rectangle"){
                   choice=1;
                   i=++i;
              if(e.getActionCommand()=="Plotter"){
                   choice=0;
                   i=++i;
              /*try{
                   temp.write(props[i][0]);
                   temp.write(props[i][1]);
                   temp.write(props[i][2]);
                   temp.write(props[i][3]);
                   temp.write(props[i][4]);
                   temp.write(props[i][5]);
                   temp.close();
              }catch(IOException _ex){}*/
              props[i][0]=choice;
              props[i][1]=red.getValue();
              props[i][2]=blue.getValue();
              props[i][3]=green.getValue();
              fin=i;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.Math;
    public class deathscreen extends Frame implements MouseListener,MouseMotionListener{
         int x1=0,x2=0,y1=0,y2=0;
         genproperties gen=new genproperties();
         int xtemp=0,ytemp=0;
         //boolean flicker=true;
         Image buffer;
         Graphics gg;
         deathscreen(){
              super("Canvas");
              setSize(500,500);
              setResizable(true);
              setLocation(280,45);
              setLayout(new FlowLayout());
              setVisible(true);
              buffer=createImage(500,500);
              gg=buffer.getGraphics();
              gen.setResizable(false);
              gen.setVisible(true);
              addMouseListener(this);
              addMouseMotionListener(this);
         public void update(Graphics g)
              paint(g);
         public void paint(Graphics g){
              int rmin=1,gmin=0,bmin=0,thmin=0,hemin=0;
              setBackground(Color.black);          
              gg.setColor(Color.black);
              gg.fillRect(0,0,500,500);
              for(int i=0;i<=gen.i;i++){
                   rmin=(gen.props[i][1]/256)*(256-gen.props[i][5]);
                   bmin=(gen.props[i][2]/256)*(256-gen.props[i][5]);
                   gmin=(gen.props[i][3]/256)*(256-gen.props[i][5]);
                   gg.setColor(new Color(gen.props[i][1],gen.props[i][3],gen.props[i][2]));
                   gg.drawString("Nags Project1",20,30);
                   if(gen.props[i][0]==6){
                        gg.drawLine(gen.props[i][6],gen.props[i][7],gen.props[i][8],gen.props[i][9]);
                        for(int lc=0;lc<gen.props[i][4];lc++){
                             gg.setColor(new Color(gen.props[i][1]+rmin,gen.props[i][3]+gmin,gen.props[i][2]+bmin));
                             rmin=++rmin;
                             bmin=++bmin;
                             gmin=++gmin;
                             gg.drawLine(gen.props[i][6]+lc,gen.props[i][7]+lc,gen.props[i][8]+lc,gen.props[i][9]+lc);
                             gg.drawLine(gen.props[i][6]-lc,gen.props[i][7]-lc,gen.props[i][8]-lc,gen.props[i][9]-lc);
                   else if(gen.props[i][0]==3){
                        if(gen.props[i][6]>gen.props[i][8] && gen.props[i][7]<gen.props[i][9]){
                             gg.drawRect(gen.props[i][8],gen.props[i][7],gen.props[i][6]-gen.props[i][8],gen.props[i][9]-gen.props[i][7]);
                        else
                        if(gen.props[i][7]>gen.props[i][9] && gen.props[i][6]<gen.props[i][8]){
                             gg.drawRect(gen.props[i][6],gen.props[i][9],gen.props[i][8]-gen.props[i][6],gen.props[i][7]-gen.props[i][9]);
                        else
                        if(gen.props[i][6]<gen.props[i][8] && gen.props[i][7]<gen.props[i][9]){
                             gg.drawRect(gen.props[i][6],gen.props[i][7],gen.props[i][8]-gen.props[i][6],gen.props[i][9]-gen.props[i][7]);
                        else
                        if(gen.props[i][6]>gen.props[i][8] && gen.props[i][7]>gen.props[i][9]){
                             gg.drawRect(gen.props[i][8],gen.props[i][9],gen.props[i][6]-gen.props[i][8],gen.props[i][7]-gen.props[i][9]);
                   else if(gen.props[i][0]==5){     
                        if(gen.props[i][6]>gen.props[i][8] && gen.props[i][7]<gen.props[i][9]){
                             gg.drawOval(gen.props[i][8],gen.props[i][7],gen.props[i][6]-gen.props[i][8],gen.props[i][9]-gen.props[i][7]);
                        else
                        if(gen.props[i][7]>gen.props[i][9] && gen.props[i][6]<gen.props[i][8]){
                             gg.drawOval(gen.props[i][6],gen.props[i][9],gen.props[i][8]-gen.props[i][6],gen.props[i][7]-gen.props[i][9]);
                        else
                        if(gen.props[i][6]<gen.props[i][8] && gen.props[i][7]<gen.props[i][9]){
                             gg.drawOval(gen.props[i][6],gen.props[i][7],gen.props[i][8]-gen.props[i][6],gen.props[i][9]-gen.props[i][7]);
                        else
                        if(gen.props[i][6]>gen.props[i][8] && gen.props[i][7]>gen.props[i][9]){
                             gg.drawOval(gen.props[i][8],gen.props[i][9],gen.props[i][6]-gen.props[i][8],gen.props[i][7]-gen.props[i][9]);
                   else if(gen.props[i][0]==7){
                        //gg.drawLine(gen.props[i][6],gen.props[i][7],gen.props[i][6]+5,gen.props[i][7]+5);
              /*if(!flicker){
                   screengc.drawImage(buffer,0,0,null);
              g.drawImage(buffer,0,0,this);
    //MOUSE COMPONENTS--------------------------------------------------------------------------------------------------
         public void mouseClicked(MouseEvent me){
         public void mouseEntered(MouseEvent me){  }
         public void mouseExited(MouseEvent me){  }
         public void mousePressed(MouseEvent me){
              x1=me.getX();
              y1=me.getY();
              gen.props[gen.i][6]=me.getX();
              gen.props[gen.i][7]=me.getY();
              //repaint();
         public void mouseReleased(MouseEvent me){ 
              x2=me.getX();
              y2=me.getY();
              gen.props[gen.i][8]=me.getX();
              gen.props[gen.i][9]=me.getY();
              gen.i=++gen.i;
              gen.props[gen.i][0]=gen.props[gen.i-1][0];
              gen.props[gen.i][1]=gen.red.getValue();
              gen.props[gen.i][2]=gen.blue.getValue();
              gen.props[gen.i][3]=gen.green.getValue();
              repaint();
         public void mouseDragged(MouseEvent me){
              x2=me.getX();
              y2=me.getY();
              gen.props[gen.i][8]=me.getX();
              gen.props[gen.i][9]=me.getY();
              //flicker=false;
              repaint();
         public void mouseMoved(MouseEvent me){ 
              //flicker=true;
    im not able to have a 3D feel in the program where i draw the objects,
    when i try to use a loop and draw and redraw i am unable and i get a null pointer exception......wat do i do???

    im not able to have a 3D feel in the program where i draw the objects,What do you mean 'a 3D feel'? Nothing in your code seems to be doing anything other than using standard awt widgets, and drawing 2D shapes, so why would it be 3D?
    or do you mean it's using the Java look and feel rather than the platform one?
    when i try to use a loop and draw and redraw i am unable and i get a null pointer exception......wat do i do???repost the relevent code using [code] [[i]code] tags.
    Pete

  • What is 100% pure java?

    A philosophy?
    A style?
    I dont know...

    It means using only Java - no native code compiled in, for example.

  • Can clock synchronization be implemented by pure java?

    I want to build a simple distributed application, whose main purpose is to synchronize the local system clock in the slave JVM with the clock in the master JVM. Can it be implemented by pure java? Or I have to use JNI to implement it?
    And although the application is mainly used in LAN, the delay of transferring the data of time is small, but is there any algorithm to minimize the difference of system clock between the master and the slave?

    No. You can not synchronize the System Clock (clock) in 100% Pure Java.
    Using The Network Time Protocol (NTP) and Java, you can access the current time from many servers around the world.
    The problem here is that you can't change the clock through Java without an interface to the actaul clock.
    Since the clock is a native component (application, service, or utility) you can't change it while being 100% Pure Java.
    That does not mean that you can't do it at all. It just will not be Pure Java. You can, however, test to see what system you are on and then adjust the method used.
    On a Windows system, the clock is set by the Control Panel applet "Date and Time." This applet can be updated using the Command Driven Interface (CDI), also known as a Command Prompt. To do this you can use the Java object Process. The parameter, a String value, should point to the location of command prompt. Then add a PrintStream object to the Process object. Send the following line (using PrintStream.println()) - "time" and "date"
    To update the time use the following line:
    time [ time ]
    Use the time format: hh:mm:sec
    To update the date use the following line:
    date [ date ]
    Use the date format: mm-dd-yy
    This will work on Windows machines (3.x, 95, 98, Me, NT, XP) MS-DOS (all versions with Date/Time capability).

  • Compile and run java programs using batch file

    i am using eclipse to run my java programs.How to compile and run those programs using a batch file?

    a) just write a batch file, and add it to the project. When you want to run it, go to a command window and invoke it. (There is probably also a way to invoke it from Eclipse)
    b) if the project is complicated, take a look at ant. Eclispe knows about ant files.

  • Java is 100% pure object oriented language or not?

    PLS help me...?
    I am get confussed.
    Java is 100% pure object oriented language or not?

    the only full OO programming language on thisplanet
    is SmallTalk.On your planet maybe. On mine, at least Eiffel
    also exists, probably more unknown others too. Some
    count Ruby, but I never looked at it.Ruby is pure OO too, FYI.
    the only full OO programming language on thisplanet
    is SmallTalk.Care to explain it in some more detail? What
    exactly is 100% OO, b.t.w.?No, I don't careWow, what an incredibly unhelpful response.
    In essence, 100% OO implies that every type within the language is an object. Since Java has primitive types like int, boolean, float etc, it cannot count as 100% OO.

  • Running a java program outside eclipse...!

    Hi guys...!
    I wrote a java program that uses different classes. The program deals with xml documents and creates a new xml document. The problem is, the program works fine in eclipse, but when I run through the command line in windows, it complains that it can't see the different classes that I created. Here is one of the error messages:
    Test.java:44:cannont find symbol
    symbol : class Circuit
    location : class src.Test
    Circuit cir = new Circuit ();
    Note: Test.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details
    Does anyone know how to resolve this...?
    Any help from you guys will be very appreciated.
    Thanks..

    I think the problem is probably something like this:
    You have a path thus:
    C:\blahblahblah\With a subdirectory thus:
    C:\blahblahblah\srcIn which you have declared classes thus:
    package src;
    public class Foo {
    }And you have then used a classpath something like the
    following:
    javac -classpath C:\blahblahblah\src Foo.javaThis is incorrect. Your classpath needs to point to
    the root of the package hierarchy. If it's like the
    above, it will look in C:\blahblahblah\src for a
    package src, which results in a path like
    C:\blahblahblah\src\src which does not exist.
    You should set it to:
    C:\blahblahblah\Where that is the root from which your packages
    stem.
    Dave.Thanks Dave. It works man. I really appreciate your help.

  • Running Java program created with Eclipse plugin fails to open report

    I created a CR 2008 report and using the Eclipse plug-in I created a Java program to drive data through the report and export the resulting reports as pdf files.
    This process works just fine if I run the Java program in Eclipse. I copied the code to a server to run the application remote.
    The program fails at the point of opening the Crystal Report. This is the error.
    D:\src>java EDIInvoice
    Current date : 2009928-
    Report output name is : D:\src\report\Invoice2009928-45462829.pdf
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com/ibm/icu/util/Ca
    lendar---- Error code:-2147467259 Error code name:failed
            at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(Unknown Source)
    This is the code
    public class EDIInvoice {
         private static final String REPORT_NAME = "D:
    src
    CR8Invoice.rpt";
         public static void launchApplication() {
         try
            FileInputStream in = new FileInputStream("D:
    src
    ghxInv.txt");
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
            String strLine;
            Calendar cal = new GregorianCalendar();
            int month = cal.get(Calendar.MONTH);
            int year = cal.get(Calendar.YEAR);
            int day = cal.get(Calendar.DAY_OF_MONTH);
            String today = (year + "" + (month + 1) + "" + day + "-");
            System.out.println("Current date : " + today);
    // Read the file one line at a time
            while ((strLine = br.readLine()) != null)  
                String patternStr = ",";
                String[] fields = strLine.split(patternStr);
                String EXPORT_FILE = "D:
    src
    report
    Invoice" + today + fields[1] + ".pdf";
                String Company  = fields[0];
                String Invoice = fields[1];
                String PO_number  = fields[2];
                       System.out.println("Report output name is : " + EXPORT_FILE);
         try {
    //Open report.
         ReportClientDocument reportClientDoc = new ReportClientDocument();
         reportClientDoc.open(REPORT_NAME, 0);
         System.out.println("Opened the report");
    As you can see the first 2 println statements worked fine, but the 3rd one failed. The program was not able to open the report.
    Is there a reason the code can not run without Eclipse?

    did you copy all the jar files? especially the jrcadapter.jar? please download the following sample and modify it accordingly:
    [http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/f087d31f-3e11-2c10-2cba-fcb5855f79ef]

  • Running a java program with eclipse

    Hi,
    I'm trying to run this java program(below) in eclipse..when i go to the 'run' icon inorder to choose the option 'run as' then 'java application' , i have 'none applicable' as the only option available. is it possibly because the program uses threads?
    could someone using eclipse please try to execute this program and let me know if you succeed and how exactly you do it.
    package reseaux;
    import java.io.*;
    import java.net.*;
    import java.util.*;
         public class LeServeur extends Thread{
         Socket socket;
         BufferedReader in;
         PrintWriter out;
         Vector FlowList=new Vector(10);
         public LeServeur(Socket socket)throws IOException{
              this.socket=socket;
              in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
              out= new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
         public void run(){
              String s;
              synchronized(FlowList){
                   FlowList.addElement(this);
              try{
                   while(!(s = in.readLine()).equalsIgnoreCase("/quit")){
                        for(int i=0;i<FlowList.size();i++){
                             synchronized(FlowList){
                                  LeServeur monServeur=(LeServeur)FlowList.elementAt(i);
                                  monServeur.out.println(s + "\r");
                                  monServeur.out.flush();
              catch(IOException e){
                   e.printStackTrace();
         finally {
         try {
              in.close();
              out.close();
              socket.close();
         } catch(IOException ioe) {
         } finally {
              synchronized(FlowList) {
              FlowList.removeElement(this);
    thanks

    thanks...
    Infact, i wanted to run the main program called 'Serveur' but it uses 'LeServeur'( the code i sent before') and apparently it gives me an error msg that it doesnot recognise the 'LeServeur'...that's why i was thinking that i should probably first compile the 'LeServeur' so that it can be recognised in the 'Serveur' program.
    here is the 'Serveur' code that uses an instantiation of the LeServeur...
    package reseaux;
    import java.net.*;
    import java.io.*;
    public class Serveur {
              public int port;
              public ServerSocket skt;
              public Socket socket;
         public static void main(String[] args) {
              int port=8975;
              ServerSocket skt=null;
              Socket socket=null;
              try{
                   if(args.length>0)
                        port=Integer.parseInt(args[0]);
              catch(NumberFormatException n){
                   System.out.println("This port is used uniquely for listening");
                   System.exit(0);
              try{
                   skt= new ServerSocket(port);
              while (true){
                   socket =skt.accept();
                   LeServeur flow=new LeServeur();
                   flow.start();
         catch(IOException e){
              e.printStackTrace();
         finally{
              try{
                   skt.close();
              catch(IOException e){
                   e.printStackTrace();
    do you know have any idea why it doesnt recognise the 'LeServeur'?
    ps:they're in the same package
    thanks

Maybe you are looking for