aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes unable to compile ,, says Recompile with -Xlint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "unable to compile ,, says Recompile with -Xlint" Watch "unable to compile ,, says Recompile with -Xlint" New topic
Author

unable to compile ,, says Recompile with -Xlint

jimmy
Greenhorn

Joined: Sep 01, 2004
Posts: 17
Hi

I write small java programe and try to run in Tomcat when i get the following error:
======================

C:\Program Files\Apache Software Foundation\Tomcat 5.5\Myprojects\beerV1>javac - d classes src/com/example/model/BeerExpert.java
Note: src/com/example/model/BeerExpert.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.
=========================

Please help.
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

There must be some typos in your source. Check the small and capitals while using class names.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
jimmy
Greenhorn

Joined: Sep 01, 2004
Posts: 17
Ok i sloved the above errro but now when i try to refer the BeerExpert class from the BeerSelect class its not detecting ,,,

the BeerExpert class is in the 'beerV1\src\com\example\model' derectory and the BeerSelect class 'beerV1\src\com\example\web' derectory and i am using a import package " import com.example.model.*; "

I get an error:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\Myprojects\beerV1>javac -
d classes src/com/example/web/BeerSelect.java
src/com/example/web/BeerSelect.java:3: package com.example.model does not exist
import com.example.model.*;
^
src/com/example/web/BeerSelect.java:18: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert bx = new BeerExpert();
^
src/com/example/web/BeerSelect.java:18: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert bx = new BeerExpert();
^
3 errors
Pranav Shukla
Ranch Hand

Joined: Oct 05, 2005
Posts: 64
Please make sure that you have compiled BeerExpert.java and BeerExpert.class exists in Myprojects\beerV1\classes\com\example\model

Then you need BeerExpert on the classpath while compiling BeerSelect.java

javac -d classes -classpath classes src/com/example/web/BeerSelect.java


Pranav Shukla
SCJP, SCWCD, SCBCD
 
wood burning stoves
 
subject: unable to compile ,, says Recompile with -Xlint
 
Similar Threads
ERRATA - O'Reilly's Head First Servlets and JSP
problem in HFSJ chapter 3 Beer example
help for HFSJ - CH 3 Page 84
help for HFSJ - CH 3 Page 84
Compilation error