aspose file tools*
The moose likes Beginning Java and the fly likes when i compile import file its showing error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "when i compile import file its showing error" Watch "when i compile import file its showing error" New topic
Author

when i compile import file its showing error

saravanan rajendran
Ranch Hand

Joined: Jun 13, 2008
Posts: 75
I putted a.java,b.java file into com.example.servlets using package
i compiled a.java its compiling Note:it is package file
i compiling b.java its showing below error Note:it is import from package

location: package com.example.servlets
com.example.servlets.HelloEvents h=(com.example.servlets.HelloEvents)obj;
^
AutoServlet.java:38: cannot find symbol
symbol : class HelloEvents
location: package com.example.servlets
com.example.servlets.HelloEvents h=(com.example.servlets.HelloEvents)obj
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39570
    
  27
What is the exact command you're using to compile? Is the HelloEvents class in your classpath?

I'll move this to more a appropriate forum, since this has nothing to do with servlets, but with basic compilation and classpath issues.


Ping & DNS - updated with new look and Ping home screen widget
saravanan rajendran
Ranch Hand

Joined: Jun 13, 2008
Posts: 75
For compile: javac AutoServlet.java

showing this error

symbol : class HelloEvents
location: package com.example.servlets
com.example.servlets.HelloEvents h=(com.example.servlets.HelloEvents)obj;
^
AutoServlet.java:38: cannot find symbol
symbol : class HelloEvents
location: package com.example.servlets
com.example.servlets.HelloEvents h=(com.example.servlets.HelloEvents)obj;
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39570
    
  27
You may want to start by working through this: http://www.javapassion.com/handsonlabs/javaclasspath/index.html
 
 
subject: when i compile import file its showing error
 
Similar Threads
Not able to COMPILE!!!
using package getting compiler error
compiling package program error
Help with Package understanding
how to compile