Run time problem

Hi !
I'm new with Java and it will drive me nuts.
I've to files in F:\javap\Familias:
ModFam.java - where I've the main function
Familias.java - some other classes and methods
each file have the line:
package Familias; at line 1.
Ok.
I compiled from f:\javap using:
java Familias\*.java
No errors and I've 3 class files in f:\javap\Familias:
- ModFam.class
- ModFam$1.class
- Familias.class
First question: what is the $1.class file ?
Now I want to run the application from f:\javap\Familias as follows:
javac -cp . Familias.ModFam
and I get the message: Exception in thread "main" java.lang.NoClassDefFoundError: Familias/ModFam
Second question: Why ? How should I run the program ?
Thanks in advance
<jl>

Since you have your classes in a package, you class files has to be in a directory called Familias, and the CLASSPATH should be set to just before your Familias directory.
Just compile as
javac -d . *.java
-d option just says where you want your source files, and it will also create the directory Familias for you.
Then you run it with java, not javac, as:
java -classpath . Familias.ModFam
Btw, you have a package called Familias, and a class called Familias. The naming convention says that package names should start with lower case letter, so to avoid confusion, it would be better to rename your package to familias.
I'm not even sure you can run your code now, because Familias.ModFam could mean either the class ModFam in the package Familias, or the inner class ModFam in the class Familias. I hope it will check for the package first.

Similar Messages

  • Jar run time problem

    Hi,
    I have an application in SWING where thumbnail images are being created at runtime and displayed in a ListCellRenderer. This is mainly used as a history feature where the user can click on that image and retrieve back the information.
    The problem is: when I run my code without an IDE it works fine as I am giving relative path names at all the places for storing the images. However, when I make a jar file, it is not able to read those images generated at run time.
    Is there a way to read runtime created files outside the jar file?
    Can someone help?
    Thanks in advance........

    sir,
    thanks for your reply.
    Again I give correct class path in Manifest.txt's
    Main-Class.
    ie., I am creating my mainclass as mainEMS.java and
    its .class file is lacated in D:/ram/classes/sdff
    folder. So I am giving the Manifest.txt ,the main
    class as " Main-Class: ram.classes.sdff.mainEMS
    fter that i give enter.
    then create the jar file.
    but, after creating jar file, it will again show,
    "Failed to load Main-Class manifest attribute from
    D:/kbs.jar "
    what's my problem.Does the file META-INF/Manifest.mf containt the Main-Class entry or do you have it only in Manifest.txt... there is a huge difference.

  • Adding panel into JDialog at run time problem

    Hi ,
    I am adding one component at a time into the jdialog at run time.
    What I do , when I launch jdialog instance first time I added one
    component into the jdialog. when OI press next button it removes this
    component and adding next one , but the problem is that is is not showing in the jdialog.
    Please give me any idea that
    How I can add component into jdialog at run time.
    Thaks In Advance.
    - vikas

    Hello,
    without source-code its difficult to understand where your problem is. The following sample code works 'fine':
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class AddCompoDialog extends JDialog {
         int compoCounter;
         public AddCompoDialog(){
              setLocationRelativeTo(null);
              setSize(300,300);
              JPanel mainPanel=new JPanel(new BorderLayout());
              JPanel buttonPanel =new JPanel();
              final JPanel compoPanel=new JPanel(new GridLayout(10,10));
              JButton newCompo=new JButton("add new Component");
              newCompo.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        compoPanel.add(new JLabel("Compo #"+ ++compoCounter));
                        compoPanel.revalidate(); //Dont forget to relayout your container
              buttonPanel.add(newCompo);
              JButton close=new JButton("close Dialog");
              close.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e) {
                        dispose();
              buttonPanel.add(close);
              mainPanel.add(buttonPanel,BorderLayout.NORTH);
              mainPanel.add(compoPanel);
              getContentPane().add(new JScrollPane(mainPanel));
         public static void main(String[] params) {
              new AddCompoDialog().setVisible(true);
    }Regards,
    Tim

  • Applet run time problem

    i complie this applet but at run time "I/O EXCEPTION(the system can not find the file speciied)
    plz help
    import java.applet.*;
    import java.awt.*;
    import java.lang.String.*;
    class Hello extends Applet
    public void paint(Graphics g)
    g.drawString("Hello java",20,30);
    </applet code="Hello" height=100 width=100>
    </applet>
    */

    http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

  • URGENT run time problems

    I am having the following problem with JDeveloper when i try to run a project. Any help would be appreciated :-
    I have a project that contains a JSP page and several .java files. The first time that i run the project, everything works fine, the project runs and is diplayed in IE without any problems. But any subsequent times that i try to the project i get the following error displaying in the JDeveloper message box :-
    Error starting HTTP-Server: Address in use: JVM_Bind
    Error creating the ORB :
    I have tryed terminating the server between each run but the problem still occurs. The only way to get the project to run again is to reboot my PC. Therefore i am having to reboot my PC everytime before i run a project. Any ideas on how to stop this would be appreciated.

    Hi, we have the same problem since we installed JDEV 9.0.3.1035 (no such problem in 9.0.2)
    Terminating the OC4J Server does not eliminate the problem. We ran our project, shut down the browser, terminated the embedded OC4J server and get the following when we try to run it again:
    C:\JDEV\jdk\bin\javaw.exe -ojvm -classpath C:\JDEV\j2ee\home\oc4j.jar -Dhttp.proxyHost=DELL -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts= -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true com.evermind.server.OC4JServer -config C:\JDEV\jdev\system9.0.3.1035\oc4j-config\server.xml
    [Starting OC4J using the following ports: HTTP=8888, RMI=23891, JMS=9227.]
    [waiting for the server to complete its initialization...]
    Error starting HTTP-Server: Address in use: JVM_Bind
    Error creating the ORB :
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized

  • URGENT,,Form Run time problem

    Hi all,
    I just wondering whether you can assist me with the problem I have with running a form.
    When I try to Program Run Form, IE page opens and I have this error msg:
    "Bad Gateway
    The following error occurred:
    The IP address was not found during the DNS lookup. Contact your system administrator. (DNS_NO_DATA)
    -------------------------------------------------------------------Please contact the administrator."
    when I start the OC4J instance,
    It only gives me : "Oracle9iAS (9.0.2.0.0) Containers for J2EE
    initialized"
    I am using Window NT and Oracle 9i Database release 2 and Oracle 9i Developer suite Release 2
    I really appreciate if you can give me some assistance especially in setting up the DNS.
    Thanks
    Regards,
    Silva Hiendra

    The problem seems to be with privileges on the machine running Forms. This is what the online doc said about FRM-30087
    Cause: You lack privileges in the specified directory, or you do not have the disk space required.
    Action: Contact your DBA to make sure you have the access privileges you need.
    Hope this helps
    suvarna

  • Strange run-time problem

    I have a problem in my vi. When the vi loads up, everything seems to work fine, however I have two radio buttons at the top of the vi, and when I use them to select something my vi seems to freeze up. I've tried all kinds of debugging, and I can't find the error. I've also tried to eliminate all race conditions. Could someone please help me find the problem. Thanks!
    Attachments:
    UUT_io_setup_distrib.llb ‏329 KB

    Hi Marshall
    Your Problem Seems to Stem from the Fact that you have two Event Structures in One Loop. If you look up Caveats and Recommendations under event Structure in Labview Help, there is a Paragraph "Avoid Using two Event Structures in One Loop".
    I took your Vi and Did the following Experiments.
    1. Verified that the Vi does Hang as Claimed.
    2. I Put the Tab control at "TTL" and then Deleted the Event Structure form the case "RS232" and than Ran your Vi. It works fine.
    3. Instead of deleting the Event Structure totally, I deleted the event cases which are duplicated in the two event structures. "Yes" Value Change, "No" Value Change event and "Cancel" Event form event Structure under the RS232 Case. Left the timeout Case as is. I ran the Vi Again it Works Fine.
    I believe - The Problem is this. Each Event Structure waits for events it has been programmed for. The event structures are in the same loop. The Event structures themselves have no way of knowing that they are embedded in a case structure and only one of them needs to execute. So after the First event the Program kind of hangs as the second Event structure Waits indefinitely for the Program to Pass execution to it.
    So the Fourth Experiment -
    4. I Used a Local Variable to Change the Tab to RS232 if I was in TTL and to TTL from RS232 if I was in RS232. This Local Vaiables are under the Yes Value Changed Event And Now I checked the Program, If Clicked Yes The TTL Case Executes Changing it and Correspondingly Changing the NO value, then it Changes the Tab Value So on the Next Iteration of While Loop my Program is in RS232 Case and Event Structure Executes and puts the Tab Back to RS232. In effect I have Made My Program Go through Both Event Structures This Works Everytime Only when I click on YES. I click on NO and Program Hangs as I did Not Built the Same Functionality for this case.
    The Event Structures Cache the Events they have been Programmed for andthe First Event Must be Handled Before A second Event can take Place. In your Case One Event is in two Structures and at any given time One of these Structures executes. The Other Structure Waits and Inhibits furthur interaction till the Event generated can be handled by it.
    On a Side Note. It is Advisable to Create an Event Structure and Embed your Cases within them And Also have Only One Event Node to Handle One Event Such as "YEs" Value Change. So you know what is Going on. and easy to Maintain Code. Also It will Help If you could Club Similar Controls in an Array and handle them that way rather than individually
    I Hope I am clear in my explanation. I hope this is the reasoning why Your Program Hangs. I have attached your Vis slightly modified for you to see.
    Good Luck!!
    Good Luck!
    Mache
    Attachments:
    UUT_io_setup_distrib.llb ‏329 KB

  • Oracle Forms 10g run time problem

    Hello.
    I installed Oracle Dev 10g and I'm trying to use Oracle Forms.
    I configured all files like this:
    [steps in other post]
    1. Install the Jinitiator
    location: <devsuitehome>/jinit/jinit.exe
    2. edit the following files:
    a. <devsuitehome>/forms90/server/default.env
    where you set forms90_path=add your path to your library files (*.pll)
    b. <devsuitehome>/forms90/server/formsweb.cfg
    where you set workingDirectory=path to your *.fmx files
    3. at Forms Builder go to Edit/Preferences/Runtime
    then at the Application Server URL click "Reset to Default"
    4. before attempting to run your forms, run "Start OC4J Instance" first
    start/programs/oracle developer suite/forms developer/start oc4j instance
    After this, when I try to run the form, I don't get any error, but the browser opens and does nothing! Some times appears a small form to acces the data base, other don't, but it always stops!!
    Any ideas?!?
    Many thanks,
    Nuno

    Might also be worth turningon the Jinit console (you can do this from your windows Control Panel). And set the trace level to 5 (just press 5 when the jinit console appears).
    Then check error messages.
    Regards
    Grant

  • Java Run-Time problems

    I am new to Java and am trying to write a simple program.
    The test class will instantiate an object of the "house" class which will in turn contain an array of 20 objects of the "player" class.
    Compiles with no errors or warnings, but gives an immediate:
    Exception in thread "main" java.lang.NullPointerException at test.main(test.java:6)
    test.java
    public class test
            private static house h;
            public static void main(String args[])
                    h.players[3].setName("john");
    }house.java
    public class house
            public player[] players = new player[20];
    }player.java
    public class player
            private static String name;
            public static void setName(String n)
                    name = n;
    }What seems to be the problem? To my untrained eyes I can't find any errors.

    alphacoder wrote:
    Thanks for the help. It fixed my problem.Good to know.
    How do I solve the 20 null references problem?That depends soley on what you want your class to do.
    Do I just initialize all 20 references in the house constructor?If you want it to always reference 20 persons, then do so.
    Alternatively you could track how many persons are currently in there and only add a new one when addPerson() is called (or something similar).
    Also, you should avoid this kind of direct access to other classes member variables, it's against encapsulation (that's probably something you'll learn later in the course/book/tutorial, but I'd like to mention it).

  • Dropdownbykey at run time problem

    Hi..
    i am creating the node and attaching attribute which has value set.
    i am binding the attribute to a dropdown key.
    when i select the values in dropdown, and in actions method if i dont perform any operations. It is working fine.
    when i select the values in dropdown, and in actions method if  perform any operations. i am not getting the selected value in dd.
    please help me..
    Thanks

    Hi Vimalraj Madhavan ,
               Usually the selected value will stay there in the drop down even after doing any action. what you can try is in youcode some where you might be clearing the attribute thats binded to the dropdown,
    you can put a debugger on the action you are triggering and check the code.
    or some where you are again calling the code to fill the value set, you can i think better check the code in modify view.
    the same problem will be there if you are doing the selection of a value in ddk and doing any other action (other than ddk action), i think
    Regards
    Sarath

  • Installation problem w/ Java Run Time Environment 1.2.2

    Steps to reproduce error:
    1.On Windows 98 I install Java Run Time Environment 1.2.2
    2.I try to launch Java Plug-in Control Panel from Windows Start menu
    Error message:
    JAVAW caused an invalid page fault in
    module SYMCJIT.DLL at 0167:500bf974.
    Registers:
    EAX=00000e03 CS=0167 EIP=500bf974 EFLGS=00010206
    EBX=006538e0 SS=016f ESP=0063f838 EBP=00000e7f
    ECX=0000009f DS=016f ESI=00000e7f FS=0e77
    EDX=00000003 ES=016f EDI=05110010 GS=0000
    Bytes at CS:EIP:
    f3 a5 ff 24 95 48 42 0c 50 8d 49 00 8d 74 31 fc
    Stack dump:
    500bf8c7 0000027f 500c42b0 5007cc24 05110010 00000e7f 0000027f 00760ab0 00000283 0069a4a8 006538e0 0063f8e4 00653928 05110010 006538e0 00000e7f
    Is there a fix for this?
    Thanks
    -DK

    This dll does not recognise the Pentium 4 processor. You need to update the JRE. It is a well recognised problem. Search the forums (and Google) using "symcjit pentium 4" to obtain more information.
    Hope this helps.--
    <sig> http://www.itswalky.com http://www.crfh.net </sig>

  • Problem in writing Hindi Font in properties file at run time.!

    hi,
    We are using Language translator for our project.
    We are able to convert the language in hindi and chinese language.
    Im also creating properties file respective to each page in hindi,english and chinese language.
    At run time while CREATING properties file shows the english font appropriate but while
    in hindi it shows problem at run time .
    after WRITING at run time the hindi properties file contains lots on question mark(????????????) intead of hindi font words.
    does any advise me the solution to this problem.?
    Thankx in advance.!
    Johnita

    Hi suraya,
    Since the issue regards MVC and website deployment. I suggestion you post the question in the ASP.NET forums at
    http://forums.asp.net/. It is appropriate and more experts will assist you.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • BIP Desktop Install Problem:  Run-time error '9' Subscript out of range

    Hi All,
    I am trying to get my BIP Desktop to work. I have notice previous threads regarding the internet explorer security patches affecting BIP Desktop and my problem is similar. Here is my problem:
    1. I installed BIP Desktop 5.7.146.
    2. I start Template Builder for Word Language by selecting Start>Programs>Oracle BI Publisher Desktop.
    3. A dialog box prompts for UI Language and I select English
    In the midst of the Template Builder for Word Language attempting to initiate/change the user interface language to English, it throws the following error:
    Run-time error '9' Subscript out of range
    Here are some details regarding my PC:
    XP sp2, MSXML6, jre1.5.0_15
    Also, my CPU performance hits it maximum while I am doing this
    Any thoughts on how to correct this?
    Thanks,
    Patrick

    Patrick,
    Were you able to find a solution to this problem?
    One of my colleagues is having the same issue.
    Regards,
    Srini

  • Problems bundling visa run time with installer

    I am trying to build an installer for an application that makes VISA read/writes through a serial port.  I have tried to create an installer for this application but I keep getting a cryptic error that then terminates LV.  I am experiencing the same problem as described in this thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=228510&query.id=494979#M228510
    I am developing with LV8.2 on XP SP2.  I would like to bundle the VISA Run Time so that I can communicate via VISA R/Ws.  After reading the above mentioned thread it didn't seem like there was ever a real resolution to the problem.  I am bundling the VISA Run Time engine just fine with other projects and I have deleted and started over several times with the installer inside this project, but I keep getting the same error, see attached document. 
    So are there any ideas short of me having to reinstall LV or VISA? 
    Thanks in advance!
    Dave
    Attachments:
    LV Error.doc ‏32 KB

    Thanks for the reply.
    I would agree that the project is corrupted.  I think I proved to myself that this was the case when I created a new project and magically everything worked just fine.  The project was created under the exact same release of LV by the same PC so I am just trying to understand why the project was corrupted while trying to build the installer. 
    I guess I have my solution now I'm into the deep dark hole of trying to understand why the error occured.  I know once I go down this path there is no returning.......
    Thanks!

  • Help my hard drive is being taken up by about 200gb of "other" memory, i am running time machine on an imac does does cause the problem how can i get rid of all "other" memory

    my problem is that most of my imac hard drive is being taken up by 200gb of "other' memory
    i am running time machine does this contribute
    how can i get rid of all "other" memory
    thanks

    JKOL96 wrote:
    i am running time machine does this contributex
    Some, possibly, but shouldn't be a problem.
    how can i get rid of all "other" memory
    Much of it is OSX and other things needed to run your Mac.
    See The Storage Display for an explanation, and don't miss the link to Where did my Disk Space go?

Maybe you are looking for