Problems with compiling

I have written my first java source. but the compiler (JDK 1.4) gave the next errors:
FrontEnd Plus Compiler GUI for the Java JDK - Trying to compile bron.java
A:\java\bron.java:8: package netscape.javascript does not exist
import netscape.javascript.JSObject;
^
A:\java\bron.java:111: cannot resolve symbol
symbol : class JSObject
location: class TabMenu
JSObject jsobject = JSObject.getWindow(this);
^
A:\java\bron.java:111: cannot resolve symbol
symbol : variable JSObject
location: class TabMenu
JSObject jsobject = JSObject.getWindow(this);
^
Note: A:\java\bron.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
3 errors
***FAILED*** To Create File A:\java\bron.class
what is my problem and does anybody knows a solution.
henk erik,
(sorry, my enlish is very bad...)

Hi,
your problem is that your 'classpath' does not contain either a location where the class 'netscape.javascript.JSObject' exists or a jar file that contains the class. If you don't know where the class/jar is then you will have to search for it. I suspect that it will be somewhere in a 'netscape' directory. As soon as you have located it you can add the location or jar file to the classpath when compiling. i.e. assume that you have found the class in a jar in a directory c:\netscape\lib and the jar is named ns.jar:
javac -classpath c:\netscape\lib\ns.jar bron.java
you'll also have to use the classpath directive when running i.e.
java -classpath c:\netscape\lib\ns.jar bron
cheers
Dave

Similar Messages

  • Problem with compilation of HelloWorld.java

    hi,
    getting problem with compilation of HelloWorld.java
    CLASSPATH--- C:\java
    PATH--- C:\j2sdk1.4.2_04\bin
    HelloWorld.java source code in: C:\java
    On cmd prompt:
    C:\java>javac HelloWorld.java
    error: cannot read: HelloWorld.java
    1 error
    pls help me with this
    rgds,
    sanlearns

    What does this command yield?
    dir HelloWorld.java

  • Problems with compilation of a Simple JSP

    Hello!
    This is a typical newbie problem with starting off on JDeveloper 3.0 (JDK 1.1.8) and Oracle 8i (8.1.1). When I create a simple JSP (The "Hello World" Jsp given in the File | New | Web Objects option) and try to run it - it gives me the following error :
    java.io.IOException CreateProcess : cmd.exe /C start "" "C:\PROGRAM FILES\ORACLE\JDEVELOPER 3.0\myprojects\WebAppRunner.html" error = 0
    Obviously the JSP does not run.
    Any pointers about what might be wrong?
    Regards
    Mona

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Mona Marathe ([email protected]):
    Hello!
    This is a typical newbie problem with starting off on JDeveloper 3.0 (JDK 1.1.8) and Oracle 8i (8.1.1). When I create a simple JSP (The "Hello World" Jsp given in the File | New | Web Objects option) and try to run it - it gives me the following error :
    java.io.IOException CreateProcess : cmd.exe /C start "" "C:\PROGRAM FILES\ORACLE\JDEVELOPER 3.0\myprojects\WebAppRunner.html" error = 0
    Obviously the JSP does not run.
    Any pointers about what might be wrong?
    Regards
    Mona<HR></BLOCKQUOTE>
    The above error message is likely due
    to JDeveloper looking for the NT command
    interpreter named CMD.EXE .
    I was able to run servlets with JDeveloper
    and Windows 98 by copying COMMAND.COM to
    C:\CMD.EXE, which was much easier to do
    than putting a new OS on my machine.
    Cheers,
    David

  • Problem with compiling STL using program with Forte C++ 6 update 1 in compat mode

    I try to compile SGI STL using program with Forte C++ 6 update 1 and I get an errror
    ld -L/opt/SUNWspro/WS6U1/lib -liostream test.o -o test
    Undefined first referenced
    symbol in file
    __0oNIostream_initctv test.o
    __0oNIostream_initdtv test.o
    Iostream_init - declared as a static class CC4/iostream.h, but nm libiostream.a produce
    __1cNIostream_init2T6M_v_
    __1cNIostream_init2t6M_v_
    and program can't link.
    What's wrong?
    Thank you for any comments

    Hi!
    I experienced the same problem and the solution looks like the following: in sunpro6.mak file there is a variable STL_INCL that has the following value: -I. -I${PWD}/../stlport
    Change that to -I. -I${PWD}/../stlport/SC5 and the problem vanishes. The reason is that stlport/SC5 contains files *.SUNWCCh which are used by SUNpro C++ compiler as standard headers and contain correct STLPort namespace information.
    Regars,
    Art

  • Problem with compilation

              A little question, I have some jsp's working ok with WebLogic51, but When I installed
              the WebLogic61, the same jsp's don't compile ok, I have messages with some classes
              when I call this pages from the browser.
              Do I have to change any class or code from my jsp's for the new version (61) of
              WebLogic?
              Maybe I have to do some new configuration?
              My problem is with the bea.jolt.pool class.
              (I configure this in the WebLogic console, I put the same name that my old installation,
              the same address and port).
              If any body can give some information please.
              Thank's
              Ronald.
              

    Perhaps you could say what the contents of the C:\jrobot\jrobot\jrobot directory and its subdirectories are.
    Though I have set the classpath correctlyWith respect, you are quite possibly in the wrong directory when you attempt to compile the class. As a result the -classpath switch would be setting the classpath incorrectly. Try going up a level:
        C:\jrobot\jrobot\jrobot>cd .. \\    C:\jrobot\jrobot>javac -classpath . jrobot\JRobotStart.javaBut that's only a guess: we need a more complete problem description. (And watch case: jrobot is not JRobot.)

  • Problem with compiling a procedure in debug-mode

    ahoj all together!
    i have a small pl/sql function, which made big troubles yesterday, when i compiled it with debug-info. toad didn't finish compiling and when i canceled it, i got the following two error-messages in the oracle-trace file again and again till the harddisk was full. (file is now 17 gb)
    Probe:read_pipe: receive failed, status 3
    Probe:S:debug_loop: timeout. Action 0
    oracle-version: 9.2.0.4.0
    can someone tell me what's the problem? thx!
    bye,
    christian

    Hello,
    You may get more help raising this with Toad support, or on a Toad forum.
    Regards,
    AG

  • JDev 9.0.3 - problem with compiler options to copy resource file types

    Hello,
    Following a quite strange scenario, I found something bizarre related to the project compile options in 9.0.3 production (I assume the same problem was present way before...)
    Let me first present the facts:
    Assume I have in my project one file named noext (with no extension!) and another one file.verylongext. I know it's not best practice, but let's say they are third party files and I would prefer not to touch them.
    I am able to add them to the project sources, in the specified packages, then I update the Project Settings/Compiler/Resource File Types to Copy to Output Directory.
    But, when I compile, I realize that not all my files were copied to classes/. In fact, if I specify ...;noext;file.verylongext, I get only noext copied, while if I specify ...;file.verylongext;noext, I only get file.verylongext.
    I also tried to use only .verylongext, but the result was exactly the same...
    Of course I can copy the files manually, outside JDev, but this is not best practice neither... :)
    As long as JDev 9.0.3 seems to provide support for filtering the files that will be added to a project (see thread Re: update column for details), I don't really see the purpose of filtering again the files that will be transferred to classes/ (apart from the little bug).
    I think it would be far more useful to have the reverse filter, i.e. "Resource File Types not to Copy to Output Directory". JDev team, would it be possible to have this in 9.0.4?
    Thanks,
    Adrian

    >I tried to reproduce the problem and couldn't.
    Nevermind, I will be back on this when I'll have a simple example.
    >One question, is noext and file.verylongext part of your project?
    Well, you know, since I said I have them in my project, it means that I added them there and I checked that they really were added. No offense...
    >One more question, did you enable Scan Source Path to ... in the input paths panel of the pproject properties?
    No, I did not enable this option, since I see all my files in the project and the only source path is project's src.
    But my real point is related to the enhancement request I made. Given the circumstances,
    could you provide the reverse filter, i.e. "Resource File Types not to Copy to Output Directory", in a future version, maybe 9.0.4?
    Thanks,
    Adrian

  • Problems with compiling the BlackJackServer program

    hello.
    this is james mcfadden. I have developed a multiplayer BlackJack card game in Java. the game consists of six programs: BlackJack.java, BlackJackServer.java, BlackJackClient.java, Card.java, Deck.java, and Hand.java. i got most of the game code from http://www.netsoc.tcd.ie/~duncan/dev/java/games/blackjack/. When i compile the server i get the following errors (i've also included the source code in this message):
    ----jGRASP exec: javac -g X:\NETPROG\Assignment2\BlackJackServer.java
    BlackJackServer.java:56: cannot find symbol
    symbol : method getSource()
    location: class BlackJack
    bj.getSource();
    ^
    BlackJack.java:176: cannot find symbol
    symbol : method getCodeBase()
    location: class BlackJack
    card_images[current_card_loading]=getImage(getCodeBase(),"cards/"+(current_card_loading+1)+".gif");
    ^
    BlackJack.java:197: cannot find symbol
    symbol : constructor Deck(BlackJack,java.awt.Image[])
    location: class Deck
    deck=new Deck(this,card_images);//Create a new deck object
    ^
    3 errors
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    how do i go about fixing these errors?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class BlackJack extends JFrame implements ActionListener,Runnable{
       private Deck deck;//The deck
         private Hand player_hand;//player hand
         private Hand dealer_hand;//dealer hand
         private JButton bHit=new JButton("Hit");
         private JButton bStay=new JButton("Stay");
         private JButton bRestart=new JButton("New Game");
         //lets do some double buffering
         Image offIm=null;
         Graphics offGraphics=null;
         Dimension offDimension=null;
         Image[] card_images=new Image[52];
         private boolean cards_loaded=false;
         private int current_card_loading=0;
         String message;//print a message
         int width;//The width of the applet
         int height;//The height of the applet
         int card_width=-1;
         int card_padding=-1;//How much should we pad the cards by?
         private int games=-1;//How many games have been played?
       public BlackJack(){
              Thread card_loader=new Thread(this);
          card_loader.start();
       public static void main(String[] args){
          JFrame frame=new JFrame("BlackJack");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(500,500);
          frame.setLocation(200,200);
          BlackJack bj=new BlackJack();
          frame.setContentPane(bj);
          frame.setVisible(true);
         public void newGame(){
              bHit.setEnabled(true);
              bStay.setEnabled(false);
              player_hand=new Hand();//Create new hands
              dealer_hand=new Hand();
              //shuffle the deck.
              deck.shuffleCards();
              games++;
         public void hit(){
              bStay.setEnabled(true);
              player_hand.addCard(deck.dealCard());
              if(player_hand.getValue()>21){
                   message="You loose! (score:"+player_hand.getValue()+")";
                   //disable the hit and stay buttons...
                   bHit.setEnabled(false);
                   bStay.setEnabled(false);
                   return;
              message="Score: "+player_hand.getValue();     
         public void stay(){
              while(dealer_hand.getValue()<17){
                   dealer_hand.addCard(deck.dealCard());
              if(dealer_hand.getValue()<=21&&player_hand.getValue()<dealer_hand.getValue()){
                   message="You loose! ("+player_hand.getValue()+" - "+dealer_hand.getValue()+")";
              else if(player_hand.getValue()==dealer_hand.getValue()){
                   message="You draw! ("+player_hand.getValue()+")";
              else{
                   message="You win! ("+player_hand.getValue()+" - "+dealer_hand.getValue()+")";
              bHit.setEnabled(false);
              bStay.setEnabled(false);
         public void actionPerformed(ActionEvent e){
              if(e.getSource()==bRestart){
                   newGame();
              else if(e.getSource()==bHit){
                   hit();
              else if(e.getSource()==bStay){
                   stay();
              repaint();
         public void paint(Graphics g){
              update(g);
         public void update(Graphics g){
              //lets sord out double buffering
              if(offGraphics==null){
                   offIm=createImage(getSize().width,getSize().height);
                   offGraphics=offIm.getGraphics();
              if(!cards_loaded){
                   //display a message saying we're loading the cards...
                   offGraphics.setFont(new Font("Arial",Font.PLAIN,14));
                   offGraphics.setColor(new Color(171,205,239));
                   offGraphics.fillRect(0,0,getSize().width,getSize().height);
                   offGraphics.setColor(Color.black);
                   offGraphics.drawString("Loading cards... ",5,20);
                   offGraphics.drawRect(15,40,102,10);
                   offGraphics.drawRect(13,38,106,14);
                   offGraphics.setColor(new Color(171,205,239));
                   offGraphics.fillRect(0,0,150,35);
                   offGraphics.setColor(Color.black);
                   offGraphics.fillRect(15,40,(current_card_loading)*2,10);
                   offGraphics.drawString("Loading card: "+current_card_loading+1,15,20);
              else{
                   Image currentCard;
                   while(card_width==-1){
                        card_width=deck.getCard(0).getImage().getWidth(this);
                   if(card_padding==-1){
                        card_padding=(width-(card_width*2)-4)/4;
                   //clear the background
                   offGraphics.setColor(Color.blue);
                   offGraphics.fillRect(0,0,width,height);
                   offGraphics.setColor(Color.black);
                   offGraphics.fillRect(1,1,width-2,height-2);
                   offGraphics.setColor(Color.white);
                   offGraphics.drawString("PLAYER:",card_padding,40);
                   offGraphics.drawString("DEALER:",(width/2)+card_padding,40);
                   offGraphics.drawString(message,5,height-20);
                   if(games>0){
                        offGraphics.drawString(games+" game(s) played...",5,height-10);
                   //Draw the players hand
                   for(int i=0;i<player_hand.getCardCount();i++){
                        currentCard=player_hand.getCards().getImage();
                        offGraphics.drawImage(currentCard,card_padding,70+(20*(i-1)),this);
                   //now draw the dealers hand
                   for(int i=0;i<dealer_hand.getCardCount();i++){
                        currentCard=dealer_hand.getCards()[i].getImage();
                        offGraphics.drawImage(currentCard,(width/2)+card_padding,70+(20*(i-1)),this);
              //draw buffered image
              g.drawImage(offIm,0,0,this);
    public void run(){
              MediaTracker t=new MediaTracker(this);
              System.out.println("Frame getting cards...");
              for(current_card_loading=0;current_card_loading<52;current_card_loading++){
                   card_images[current_card_loading]=getImage(getCodeBase(),"cards/"+(current_card_loading+1)+".gif");
                   if(card_images[current_card_loading]==null){
                        System.out.println("Null card... ["+current_card_loading+"]");
                   else{
                        t.addImage(card_images[current_card_loading],0);
                   try{
                        t.waitForID(0);
                   catch(InterruptedException e){
                        System.err.println("Interrupted waiting for images..>");
                   //lets show our new status
                   repaint();
              //create the deck object now
              deck=new Deck(this,card_images);//Create a new deck object
              card_width=deck.getCard(0).getImage().getWidth(this);
              bHit.addActionListener(this);
              bStay.addActionListener(this);
              bRestart.addActionListener(this);
              bHit.setEnabled(false);
              bStay.setEnabled(false);
              width=getSize().width;
              height=getSize().height;
              this.add(bHit);
              this.add(bStay);
              this.add(bRestart);
              player_hand=new Hand();//Create the hands
              dealer_hand=new Hand();
              //make sure that the buttons appear properly
              this.validate();
              message="";
              cards_loaded=true;
              System.out.println("End of thread...");
              repaint();
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    public class BlackJackServer extends JFrame{
       //Text area for displaying contents
       private JTextArea jta=new JTextArea();
       public static void main(String[] args){
          new BlackJackServer();
       public BlackJackServer(){
          //Place text area on the frame
          setLayout(new BorderLayout());
          add(new JScrollPane(jta),BorderLayout.CENTER);
          setTitle("BlackJack Server");
          setSize(500,300);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);//It is necessary to show the frame here!
          try{
             //Create a server socket
             ServerSocket serverSocket=new ServerSocket(8000);
             jta.append("Server started at "+new Date()+'\n');
             //Listen for a connection request
             Socket socket=serverSocket.accept();
             //Create data input and output streams
             DataInputStream inputFromClient=new DataInputStream(socket.getInputStream());
             DataOutputStream outputToClient=new DataOutputStream(socket.getOutputStream());
             while(true){
                //Receive bet from the client
                float bet=inputFromClient.readFloat();
                //Compute double the bet
                float doublebet=bet+bet;
                //Send double the bet back to the client
                outputToClient.writeFloat(doublebet);
                jta.append("Bet received from client: "+bet+'\n');
                jta.append("Double the bet found: "+doublebet+'\n');
          catch(IOException ex){
             System.err.println(ex);
              BlackJack bj=new BlackJack();
              bj.getSource();
    }//end class BlackJackServer
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class BlackJackClient extends JFrame{
       //Text field for receiving bet
       private JTextField jtf=new JTextField();
       //Text area to display contents
       private JTextArea jta=new JTextArea();
       //IO streams
       private DataOutputStream toServer;
       private DataInputStream fromServer;
       public static void main(String[] args){
          new BlackJackClient();
       public BlackJackClient(){
          //Panel p to hold the label and text field
          JPanel p=new JPanel();
          p.setLayout(new BorderLayout());
          p.add(new JLabel("Enter bet"),BorderLayout.WEST);
          p.add(jtf,BorderLayout.CENTER);
          jtf.setHorizontalAlignment(JTextField.RIGHT);
          setLayout(new BorderLayout());
          add(p,BorderLayout.NORTH);
          add(new JScrollPane(jta),BorderLayout.CENTER);
          jtf.addActionListener(new ButtonListener());//Register listener
          setTitle("BlackJack Client");
          setSize(500,300);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);//It is necessary to show the frame here!
          try{
             //Create a socket to connect to the server
             Socket socket=new Socket("localhost",8000);
             //Create an input stream to receive data from the server
             fromServer=new DataInputStream(
             socket.getInputStream());
             //Create an output stream to send data to the server
             toServer=new DataOutputStream(socket.getOutputStream());
          catch(IOException ex){
             jta.append(ex.toString()+'\n');
       private class ButtonListener implements ActionListener{
          public void actionPerformed(ActionEvent e){
             try{
                //Get the bet from the text field
                float bet=Float.parseFloat(jtf.getText().trim());
                //Send the bet to the server
                toServer.writeFloat(bet);
                toServer.flush();
                //Get double the bet from the server
                float doublebet=fromServer.readFloat();
                //Display to the text area
                jta.append("Bet is "+bet+"\n");
                jta.append("Double the bet received from the server is "+doublebet+'\n');
             catch(IOException ex){
                System.err.println(ex);
    }//end class BlackJackClient
    import java.awt.*;
    class Card{
       Image image;
       int value;
       /*Constructor*/
       public Card(Image image,int value){
          this.image=image;
          this.value=value;
       /*Return the image associated with the card*/
       public Image getImage(){
          return image;
       /*Return the current value of the card*/
       public int getValue(){
          return value;
       /*Change the value of the card*/
       public void setValue(int value){
          this.value=value;
    import java.awt.*;
    //import java.applet.*;
    import java.net.*;
    import java.io.*;
    class Deck{
         Card[] cards=new Card[52];
         int currCard;
         public Deck(/*Blackjack myApplet,*/Image[] card_images){
              //These are the (initial) values of all the cards
              int[] values={11,2,3,4,5,6,7,8,9,10,10,10,10,11,2,3,4,5,6,7,8,9,10,10,10,10,11,2,3,4,5,6,7,8,9,10,10,10,10,11,2,3,4,5,6,7,8,9,10,10,10,10};
              //Make all the cards, getting the images individually
              for(int i=0;i<52;i++){
                   cards=new Card(card_images[i],values[i]);
              //Shuffle the cards
              shuffleCards();
         public void shuffleCards(){
              Card temp;
              //loop through each card in the deck and swap it with some random card
              for(int i=0;i<52;i++){
                   int rand=(int)(Math.random()*52);
                   temp=cards[51-i];//take the current card
                   cards[51-i]=cards[rand];//and swap it with some random card
                   cards[rand]=temp;
              //now, reset the currentCard to deal
              currCard=0;
         public Card dealCard(){
              Card card=cards[currCard];
              currCard++;
              return card;
         public Card getCard(int i){
              return cards[i];
    class Hand{
         private Card cards[]=new Card[10];
         private int count;
         private int value;
         public void Hand(){
              count=0;
              value=0;
         public Card[] getCards(){
              return cards;
         public int getCardCount(){
              return count;
         public void addCard(Card c){
              cards[count]=c;
              value+=cards[count].getValue();
              if(c.getValue() == 11 && value > 21){//got and ace, so decrement the value of the hand by 10,if it would have been above 21
                   value-=10;
              count++;
         public int getValue(){
              return value;
         public boolean ace(){
              int aceIndex=0;
              boolean result=false;
              for(int i=0;i<count;i++){
                   if (cards.getValue()==11){
                        value-=10;
                        return true;
              return false;

    Why are you posting this yet again after I told you what the problem was 2 days ago:
    http://forum.java.sun.com/thread.jspa?threadID=5147720
    Nobody likes to repeat themselves, nor what others have already told you.

  • Problem with compilation crashing

    Hi,
    I'm having an issue with RH9 when I try to compile a CHM.
    Fo a start, it's getting very agitated about the variable code for some reason, but just for the master topic:
    Normal2.htt :
    The HTML tag "?rh-variable_start name="title" format="default" v..." is not a valid HTML tag (it does not begin with an alphanumeric character).
    But it also hates a lot of my images:
    Button_Print_Preview.gif :
    The HTML tag "ïMž\ã|ÅR£dPœ$s …U„ ]¸y\¸Ù³w®›,[‘”<‹ ÈÈ”CÆ ¢J„f‹œ Þ..." is not a valid HTML tag (it does not begin with an alphanumeric character).
    I've checked the image, there is no HTML even close to it like the compiler is describing.
    When it gets part way through the images it crashes.
    The images were made with PSP 4 and 8 (I'm having trouble getting funding for newer versions) and have transparent sections.
    If I rename and replace the image names that sometimes work in clearing the issue, and sometimes not. I've tried remaking them...no dice.
    There is nothing in the HTML to suggest what could be tripping up the compiler, is this an IE9 issue?
    To further complicate things, this is a file that was once RH9, then had to be downgraded to 8, then upgraded to 9.
    It's also a template for WebHelp that I've stripped back down to complied help. I'm pretty sure that any of those things could have screwed it up, but I just can't see what has screwed up!
    For example:
    HHC3002: Warning:
    Button_Print_Preview.gif :
    The HTML tag "c" is missing a closing angle bracket.
    The code is:
    <p class="Tip"><span class="Tip">Tip</span>: You can use <img src="../../Images/Button_Print_Preview.gif" alt="Button_Print_Preview.gif" style="border: none;" border="0" /> <span style="font-weight: bold;"><b>Print Preview</b></span> to view the data you are about to print out.</p>
    I've 'deleted' the XPJ, no effect. Any ideas?
    I'm on Windows 7, with IE9
    Nicola

    Hi William,
    2. The HTML tag for the print image is just a lof of gibberish. Is that exactly what you're seeing?
    I can't view the output because the compiler crashes before it can generate the CHM. I can generate WebHelp without these issues.
      - Are your project AND your output directory both on your local drive?
    Yes.
      - Do you use long filenames/folder names? Long file paths may give trouble.
    Typical path: "../../Images/Button_DocumentsStandard.gif"
    I don't think that's excessive!
      - You have deleted the XPJ. Have you also tried deleting the CPJ? Make a full backup, remove the CPJ and open the project again.
    Can't find a CPJ, did you mean the CPD?? I've done that, no change.
      - Can you run the W3C compliance tool to see what problems might be in your code? (File > W3C Compliance > Validate all)
    I could, do you mean on the source or output? I don't have the output code (RH deletes it), and the source looks ok to me... nothing fancy.
      - You say this is a 'file' that was RH9, went back to RH8 and is now back to RH9. Do you mean a single file or the entire project? What did you do to 'downgrade' the file/project?
    Sorry, the project got downgraded. I can't remember what I did to downgrade it, this was a while ago.
    If you get errors that certain tags are incomplete, there might be something wrong with the code in your topics.
    I agree with this, but can't see anything wrong with the code.
    Thanks,
    Nicola

  • Can anybody help solve my problem with compilation?

    In win XP i try to compile program.
    javac Lematizator.java
    Lematozator.java:85: cannot find symbol
    symbol : class PodstatneMeno
    location : class slovnik.Lematizator
    static ArrayList<PodstatneMeno> zoznamPodstatnychMienZoSlovnika = new ArrayList<PodstatneMeno><>;
    ^
    There are more errors this is just example, how can i repair it?
    This is code:
    package slovnik;
    import java.io.BufferedReader;
    import java.io.FileReader;
    //import java.io.PrintStream;
    import java.util.ArrayList;
    import java.util.Vector;
    public class Lematizator
         static String suborSPredlohami = "predlohy.txt";
    //     static String slovnik = "slova.txt";
         static String zoznamPodstatnychMien = "podstatneMena.txt";
         static ArrayList<PodstatneMeno> predlohy = new ArrayList<PodstatneMeno>();
         static ArrayList<PodstatneMeno> zoznamPodstatnychMienZoSlovnika = new ArrayList<PodstatneMeno>();
         static ArrayList<PodstatneMeno> mozneTvarySlova = new ArrayList<PodstatneMeno>();
    //     static ArrayList<String> slovaZoSlovnika;
    //     static String slovo = "slovách";
         static String slovo = "slová";
    //     static String slovo = "mestách";
    //     static String slovo = "cestách";
         public static void main(String[] args)
              String slovo0 = "slovo";
              String slovo1 = "";
              String slovo2 = "";
              String slovo3 = "";
              String slovo4 = "";
              if (args.length>0)
                   slovo0 = args[0];
              if (args.length>1)
                   slovo1 = args[1];
              if (args.length>2)
                   slovo2 = args[2];
              if (args.length>3)
                   slovo3 = args[3];
              if (args.length>4)
                   slovo4 = args[4];
              System.out.println(slovo0);
              System.out.println(slovo1);
              System.out.println(slovo2);
              System.out.println(slovo3);
              System.out.println(slovo4);
              System.out.println();
              System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo0));
              System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo1));
              System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo2));
              System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo3));
              System.out.println(Lematizator.najdiVsetkyZakladneTvary(slovo4));
              public static String najdiZakladnyTvar (String slovo)
                   ArrayList<PodstatneMeno> zt = najdiZakladneTvary(slovo, false);
              if (zt.size() > 0)
                   return zt.get(0).getTvar();
              else
                   return null;
         public static ArrayList<String> najdiVsetkyZakladneTvary (String slovo)
              ArrayList<String> z = new ArrayList<String>();
              ArrayList<PodstatneMeno> zt = najdiZakladneTvary(slovo, true);
              for (int i = 0; i < zt.size(); i++)
                             String t = zt.get(i).getTvar();
                   boolean nebolo = true;
                   for (int j = 0; j < z.size(); j++)
                        if (t.equals(z.get(j)))
                             nebolo = false;
                   if (nebolo)
                        z.add(t);
                        return z;
              public static ArrayList<PodstatneMeno> najdiZakladneTvary (String slovo, boolean vsetky)
                   ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
              if (predlohy.size() == 0)
                   predlohy = Lematizator.nacitajPredlohy(suborSPredlohami);
              if (zoznamPodstatnychMienZoSlovnika.size() == 0)
                   zoznamPodstatnychMienZoSlovnika = Lematizator.nacitajZoznamPodstatnychMien(zoznamPodstatnychMien);
              mozneTvarySlova = Lematizator.najdiMozneTvarySlova(slovo);
              for (int i=0; i < mozneTvarySlova.size(); i++)
                             PodstatneMeno pm = mozneTvarySlova.get(i);
                   if (pm.jeVZoznamePodstatnychMien(zoznamPodstatnychMienZoSlovnika))
                                       vystup.add(pm);
                        if (!vsetky)
                             return vystup;
                             return vystup;
         static ArrayList<PodstatneMeno> nacitajPredlohy(String suborSPredlohami)
                   ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
              try
                             PodstatneMeno zt = null;
                   String nemennaCast = "";
                   String skratkaRod = "";
                   String skratkaCislo = "";
                   String skratkaPad = "";
                   String koncovka = "";
                   BufferedReader br = new BufferedReader(new FileReader(suborSPredlohami));
                   String riadok;
                   while ((riadok = br.readLine()) != null)
                                       if (riadok.equals("koniec"))
                                                 br.close();
                             return vystup;
                                            if (riadok.startsWith("="))
                             zt = null;
                        if (!(riadok.startsWith("-") || riadok.startsWith("=")))
                                                 riadok = (riadok+" ").replaceAll("\t",":");
                             String[] cs = riadok.split(":");
                             if (!cs[0].trim().equals(""))
                                  nemennaCast = cs[0].trim();
                             if (!cs[1].trim().equals(""))
                                  skratkaRod = cs[1].trim();
                             if (!cs[2].trim().equals(""))
                                  skratkaCislo = cs[2].trim();
                             if (!cs[3].trim().equals(""))
                                  skratkaPad = cs[3].trim();
                             koncovka = cs[4].trim();
                             PodstatneMeno p = new PodstatneMeno(nemennaCast,koncovka,skratkaRod,skratkaCislo,skratkaPad);
                             if (zt == null)
                                  zt = p;
                             p.setZakladnyTvar(zt);
                             p.setPredloha (p);
                             vystup.add(p);
                                  br.close();
                        catch (Exception e)
                             e.printStackTrace();
                        return vystup;
              static ArrayList<PodstatneMeno> najdiMozneTvarySlova (String slovo)
                   ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
              for (int i=0; i< predlohy.size(); i++)
                             PodstatneMeno predloha = predlohy.get(i);
                   if (slovo.endsWith(predloha.getKoncovka()))
                                       String jadro = slovo.substring(0,slovo.length()-predloha.getKoncovka().length());
                        PodstatneMeno zPredloha = predloha.getZakladnyTvar();
                        PodstatneMeno zt = new PodstatneMeno(jadro, zPredloha.getKoncovka(), zPredloha.getRod(), zPredloha.getCislo(), zPredloha.getPad(), null, zPredloha);
    //System.out.println(zt);
                        vystup.add(zt);
                        return vystup;
              static ArrayList<PodstatneMeno> nacitajZoznamPodstatnychMien (String subor)
                   ArrayList<PodstatneMeno> vystup = new ArrayList<PodstatneMeno>();
              try
                             BufferedReader br = new BufferedReader(new FileReader(subor));
                   String riadok;
                   while ((riadok = br.readLine()) != null)
                                       riadok = (riadok+" ").replaceAll("\t",":");
                        String[] cs = riadok.split(":");
                        PodstatneMeno pm = new PodstatneMeno(cs[1].trim(), cs[0].trim());
                        vystup.add(pm);
                             catch (Exception e)
                             e.printStackTrace();
                   return vystup;
                        return vystup;     Thanks
    Edited by: 855126 on Apr 27, 2011 11:22 AM
    Edited by: EJP on 28/04/2011 21:39: added code tags. Please use them.

    Please put your code within tags to make it more readable, and then someone will be more willing to offer advice.
    As to your error, the message is telling you exactly what the problem is.  Your code can't find the class PodstatneMeno.  My first question would be, "Is PodstatneMeno in the same package as Lematizator?"  If it's not, then you need to import it in your Lematizator class.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with compiling a class with a package

    Hello,
    I am trying to implement the package example from the SUN Tutorial. It can be found on the page: http://java.sun.com/docs/books/tutorial/java/interpack/QandE/packages-questions.html
    I think I am doing like described but it doesn�t work. The files are stored like following on my machine:
    C:\mygame\Shared\Utilities.java               (this file can be compiled)
    C:\mygame\Server\Server.java                    (can�t be compiled)
    C:\mygame\Client\Client.java                    (can�t be compiled)
    I have no CLASSPATH set (but I tried), Java is installed in C:\Java\j2sdk
    If I try to compile the file Client.java with javac the following error message occurs:
    C:\mygame\Client>javac Client.java
    Client.java:7: cannot resolve symbol
    symbol : class Utilities
    location: package shared
    import mygame.shared.Utilities;
    ^
    Client.java:23: cannot resolve symbol
    symbol : variable Utilities
    location: class mygame.client.Client
    Utilities.printMsg("creating output stream");
    ^
    Client.java:32: cannot resolve symbol
    symbol : variable Utilities
    location: class mygame.client.Client
    Utilities.printMsg("writing current date");
    ^
    3 errors
    Are there any further prerequisites?
    Thank you

    Thank you for helping me. Now I am one step forward. Now I can compile each of my Java classes. But if I want to start them with java the following messages occurs. In addition I changed all pathes and class names to lower case.
    C:\mygame\server>java server
    Exception in thread "main" java.lang.NoClassDefFoundError: server
    C:\mygame\server>cd ../client
    C:\mygame\client>java client
    Exception in thread "main" java.lang.NoClassDefFoundError: client
    C:\mygame\client>cd ../shared
    C:\mygame\shared>java utilities
    Exception in thread "main" java.lang.NoClassDefFoundError: utilities
    C:\mygame\shared>

  • Problem with compile after word import

    Hi all,
    I have an RH6 project that has been generating multiple
    layouts without a problem. This morning I imported a Word 2003 file
    and ever since I can't even generate my primary layout (which is
    Microsoft HTML Help). It does the Copying Files stage, but about
    halfway through the Updating Files stage I get the message
    "RoboHelp HTML Application has encountered a problem and needs to
    close. We are sorry for the inconvenience." I have the option to
    send or not send an error report. Then RoboHelp closes without
    finishing the build.
    Any ideas on what might be causing this or how to fix it?
    Cheers,
    darkagn

    Did the topic imported have a table with some merged cells
    and are you using a build expression when you generate? If that
    could be the case see Snippet 68 on my site. Known problem and a
    patch is available.

  • Problem with compiling build.xml ( ANT tools)  in Eclipse

    I was trying to compile my project thru ANT within eclipse...and it gave me error:
    Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:96)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:557)
         at org.apache.tools.ant.Task.perform(Task.java:217)
         at org.apache.tools.ant.Target.execute(Target.java:184)
         at org.apache.tools.ant.Target.performTasks(Target.java:202)
         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
         at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:262)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.eclipse.ant.core.AntRunner.run(AntRunner.java:233)
         at org.eclipse.ui.externaltools.internal.core.AntFileRunner.execute(AntFileRunner.java:59)
         at org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.executeRunner(DefaultRunnerContext.java:413)
         at org.eclipse.ui.externaltools.internal.core.DefaultRunnerContext.run(DefaultRunnerContext.java:464)
         at org.eclipse.ui.externaltools.internal.ui.AntLaunchWizard$1.run(AntLaunchWizard.java:117)
         at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)
    Build exception: E:\MyPrograms\ejb\MEJB\Hello\build.xml:33: Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your jdk directory.
    I already set my JAVA_HOME with jdk1.3.1, but end up with the same error. JRE 1.3.1_07 is installed on my machine and my project contains the installed jre. It appears in both Project properties dialog box and in Installed JRE tab JAVA BUILD PATH of preferences...
    my ANT compilation works fine with command line.
    Please Help !!

    have you did some wrong with the build output path?
    i am dont understand clearful.but i am think so ;
    example :
    the eclipse's default build out path is 'bin',
    so,if you compile by this code:
    <target name="compile">
    <mkdir dir="./class" />
    <javac srcdir="./src" destdir="./class"
    classpath="com.Ostermiller.util.*"
    encoding="${ENCODING}"
    debug="on" optimize="off" deprecation="off" />
    </target>
    * the "ENCODING" 's value is setting in the properties file.
    you will maybe get the 'Cannot use classic compiler' error only.
    you can change the build output path ,or use the default path ;
    I am sorry ,
    I was limited in English and was a bigginer of java ,
    so that i cant to talk Clearly.
    if it cant working fine ,please mail to me :[email protected]
    good luck!
    Kou.huang

  • Problems with compiler

    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Press any key to continue . . .
    wat does this mean wat do i have to do

    You need to have j2ee.jar (which can be found in <j2ee_install_dir>/lib directory in your classpath in order to successfully compile.

  • Problems with Compiled files when Adobe Jetforms are used

    Hi,
    I am taking outputs of Customer Facing Documents from SAP R/3 using Jetform Output Designer Version 5.4.0.130.
    The printer I am using is HP LaserJet 5100 Series. From the information I gathered this uses PCL 6. Therefore I compiled the file with the presentment target HP Laserjet 5000/5000N(PCL6)-[hp5000x]. When I use the PDF viewer as the default it gives me perfect alignment of the various fields. However when I take a printout everything is disturbed.
    Can you please suggest, what is the best approach to take.
    Thanks in advance.
    Regards,
    Paul

    There is a difference in resolution between PDF print and PCL print. E.g. PDF is default 1000 dpi, which is fine for screen view, yet most printers are 300 dpi or 600 dpi.
    If you make a copy of the PDF.ICS to apv_PDF.ICS. You can change the resolution by opening the file with a text editor like Notepad. Set the value to match your printer. Choose your custom PDF printer driver in Output Designer and recompile the form.
    You'll find it in the \Config directory where your designer is installed. ..\JetForm\Output Designer\Config

Maybe you are looking for

  • How to set a text in the jTextField to right-align?

    when we add a text into a jTextField,normally it start to add them from left to right ,top to bottom.But I want to add a text from the right side instead of the left one.how to achieve that?Thanks in advance!

  • FINAL CUT PRO 7.... RENDERING

    I am in NEED of help with Final cut 7 i have tried to render a clip, but am unable to render it because of 'insufficiant disk space'. I have got plenty of disk space... PLEASE SOMEONE HELP ME!

  • Erasing Free Space on boot drive

    I am getting ready to sell my older Mac Book Air with a SSD.  I would like to erase all free space on the drive to assure that any confidential data I hadn't securely deleted earlier is not recoverable.  In my most recent cleanup, I moved all my own

  • Won't allow Photoshop CS4 to be default to open PSD files?

    I am running Windows Vista and I'm trying to set Photoshop CS4 to be the 'default' to open .psd files, but for some reason it won't allow me to do this?  Has anyone else ever had this issue.  I have no clue why it won't allow me to do this because it

  • Data Staging Doubt??

    Hi Gurus, I learning BI. I created couple of scenarios in BI where sataging is done starting from DataSource-> PSA->Transformation->InforCube. Data load is done using DTP and directly data is reaching from datasource to InfoCube (Not using any infoso