• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting an error while compiling javac code

 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,


I want to compile below java class.




But when i tried to execute commnad javac HelloAction.java i am getting below errore.

HelloAction.java:3 package com.opensymphony.xwork2 does not exists.

Could anyone please let me know how to compile above class.

Thanks in Advance.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could this be a class path issue? Is your com.opensymphony.xwork2.Action class or Jar on the classpath? This relates to your other thread I believe and you may want to post links in both threads to both threads.
 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pete,

Thanks for reply.
This class uses an inbuilt xwork-2.0.6jar file for Struts framework, but the problem is to just compile java file and not related to Struts framework.

It would be great if could let me know how to set jar file in classpath?

Thanks in Advance.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay Shukla wrote:Hi Pete,
It would be great if could let me know how to set jar file in classpath?


The Sun tutorials will tell you how to do this in a general sense, but (as per your other thread), I believe that you're using Eclipse, and if so, you'll need to set your project's build path in Eclipse. To do this, right click on your project, click on Properties, then Java Build Path, then the Libraries tab.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should take a step back: you're plunging in to deep waters if you can't even get something to compile. This is very basic stuff--get a handle on that first.
 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David for your suggestion.

I am standing near the pond of deep water and will jump as soon as i will get this java file compiled.

Its not that i just post this problem in forum and sitting for reply only.
Even before i post this question i have browsed some 7 link about setting classpath and tried them also. But i am getting an error so i though something is going wrong to which i am doing and hence tried to find what is going wrong here and that is the reason i posted this question.

Thanks.
 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

I just now tried one more time and i got succeded in compiling the class file.

Thanks.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic