RE: Java under Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Kobly wrote:

> Add the servlet API JAR to the classpath (with -cp or CLASSPATH env
> variable).  Or use Maven to build your projects and define the
> dependencies appropriately.

>> When I run "javac HelloWorld.java" I get a number of errors like
>>   HelloWorld.java:12: error: cannot find symbol
>>     public class HelloWorld extends HttpServlet {
>> 
>> I see that this class is in /usr/share/java/tomcat-servlet-api.jar
>> and if I expand this jar file in the current directory
>> then the compilation succeeds.
>> But it is not sufficient to copy the jar file to the current directory
>> (or to put a link to it in /usr/lib/java/ .)> 


> Add the servlet API JAR to the classpath (with -cp or CLASSPATH env
> variable).  Or use Maven to build your projects and define the
> dependencies appropriately.

Thanks very much,
  export CLASSPATH=$CLASSPATH:/usr/share/java/tomcat-servlet-api.jar
did the trick.
I was assuming (rather stupidly) that it was sufficient
to put the directory into the classpath.

.
  



-- 
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux