Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to compile ,, says Recompile with -Xlint

 
jimmy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks
 
jimmy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic