Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
FaxWave - Free Trial.
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Ziff Davis Enterprise Virtual Tradeshows: Hot Topics, Cutting Edge Technology, Real-time Networking among IT Professionals. Learn more
  #1  
Old June 30th, 2000, 03:55 PM
xtony xtony is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 4 xtony User rank is Private First Class (20 - 50 Reputation Level)xtony User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi there,

When I tried to compile a servlet, I got
the following error:

$ javac RentBuyServlet.java
java.lang.NoClassDefFoundError: antlr/collections/AST
at at.dms.kjc.Main.beautifyParseError(Main.java:692)
at at.dms.kjc.Main.parseFile(Main.java:488)
at at.dms.kjc.Main.run(Main.java:119)
at at.dms.kjc.Main.compile(Main.java:449)
at at.dms.kjc.Main.main(Main.java:432)
$

I cannot figure out what causes this. Does
KJC here stands the Korean-Japanese-Chinese
language support package? I see nothing in
my code is related tothe international
language support though. Could some of you
here help me out? This is my first time to
post a msg in this forum. Your help is highly
appreciated. If you need to see the code, I
can show it. Please somebody help me!


------------------
Regards,
Tony
Comments on this post
JimmyGosling agrees!

Reply With Quote
  #2  
Old July 1st, 2000, 11:02 PM
jcbell jcbell is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 14 jcbell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The message you are getting simply means that the javac compiler program cannot find a class that it needs. This invariably indicates that your classpath environment variable is not set correctly.
Also, maybe your path variable might not be set to include the current file folder or directory which is desgnated as a "."
You might just try
javac -classpath %CLASSPATH%;.;c athto/antlr/collections/AST RentBuyServlet.java

where you replace c athto/antlr/collections/AST with the path to imported package antlr/collections/AST

Reply With Quote
  #3  
Old July 3rd, 2000, 05:57 PM
xtony xtony is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 4 xtony User rank is Private First Class (20 - 50 Reputation Level)xtony User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you, jcbell.

After setting classpath, I got the
following error msg:

$ javac LeaseBuyServlet.java
LeaseBuyServlet.java:257: Can''t find method "setContentType(java.lang.String)"
$

If I commented this--
res.setContentType("text/html");
--out, I got the following error msg:

$ javac LeaseBuyServlet.java
LeaseBuyServlet.java:260: Can''t find method "getWriter()"
$

--this is from line--
PrintWriter out = res.getWriter();
--

But seen from the source code for my Java
Servlet package, these methods all belong
to HttpResponseServlet.

What could be the problem? Please help.
Thanks in advance.


------------------
Regards,
Tony

Reply With Quote
  #4  
Old July 17th, 2000, 01:58 PM
jcbell jcbell is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 14 jcbell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
From what you describe, it is clear that you need to add the jar file (jsdk.jar) for your jsdk (java servlet development kit) into your classpath statement or environment varaible

just add it after a semicolon in your current classpath statement
example:
set CLASSPATH=".";%JAVA_HOME%;c:jsdklibjsdk.jar

you can also invoke the jsdk.jar with the javac statement as in
javac -classpath %CLASSPATH%;.;c:jsdklibjsdk.jar;pathto/antlr/collections/ASTRentBuyServlet.java RentBuyServlet.java


------------------


[This message has been edited by jcbell (edited July 17, 2000).]

Reply With Quote
  #5  
Old July 17th, 2000, 04:17 PM
cynthia cynthia is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: CA USA
Posts: 2 cynthia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Everytime I get this message, I have a syntax error in my code. Once I fix the syntax error this error message goes away. If you can't find an error in your code, include it in another post and maybe someone else can find it.
Hope this helps, C

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by jcbell:
The message you are getting simply means that the javac compiler program cannot find a class that it needs. This invariably indicates that your classpath environment variable is not set correctly.
Also, maybe your path variable might not be set to include the current file folder or directory which is desgnated as a "."
You might just try
javac -classpath %CLASSPATH%;.;c URLathto/antlr/collections/AST RentBuyServlet.java

where you replace c URLathto/antlr/collections/AST with the path to imported package antlr/collections/AST
[/quote]


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Please help!! -- java.lang.NoClassDefFoundError: antlr/collections/AST


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway