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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 35241
    
    7
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.


Android appsImageJ pluginsJava web charts
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: 35241
    
    7
You may want to start by working through this: http://www.javapassion.com/handsonlabs/javaclasspath/index.html
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: when i compile import file its showing error
 
Similar Threads
Not able to COMPILE!!!
Help with Package understanding
compiling package program error
how to compile
using package getting compiler error