java package problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • minuji
    New Member
    • May 2007
    • 4

    #1

    java package problem

    hello everybody
    I have 2 hierarachy of packages.1)com. examples.web2)c om.examples.mod el
    inside 'web' I have BeerSelect.java and inside 'model', BeerExpert.java
    When I write,

    package com.example.web ;
    import com.example.mod el.BeerExpert;
    public class BeerSelect{
    BeerExpert br;}

    It works in Eclipse IDE but shows error when I am using notepad to write individual files.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by minuji
    hello everybody
    I have 2 hierarachy of packages.1)com. examples.web2)c om.examples.mod el
    inside 'web' I have BeerSelect.java and inside 'model', BeerExpert.java
    When I write,

    package com.example.web ;
    import com.example.mod el.BeerExpert;
    public class BeerSelect{
    BeerExpert br;}

    It works in Eclipse IDE but shows error when I am using notepad to write individual files.
    When compiling on the command with javac, you have to specify where the required classes are (classpath). Eclipse does this for you automatically.

    Comment

    Working...