-
1. Re: Unable to compile with jboss-javaee.jar library
jaikiran Mar 23, 2011 4:42 AM (in response to nimrob28)jboss-javaee.jar doesn't include javax.persistence.* classes. So that compile error is expected. Try using the jbossall-client.jar (present in JBOSS_HOME/client folder) instead:
javac -cp C:\jboss-5.1.0.GA\client\jbossall-client.jar GameRecord.java
-
2. Unable to compile with jboss-javaee.jar library
welle Mar 23, 2011 4:44 AM (in response to nimrob28)First of all "jboss-javaee.jar" is not located in "$JBOSS_HOME/lib", it's in "$JBOSS_HOME/common/lib"
Do a "jar tvf jboss-javaee.jar" and you will see that not ALL classes you seem to need are there.
Look for them in other jar-files.
-
3. Unable to compile with jboss-javaee.jar library
welle Mar 23, 2011 4:46 AM (in response to jaikiran)Wow... "double post" helps in a couple of minutes....
Jaikiran's answer is the way to go forward!
-
4. Re: Unable to compile with jboss-javaee.jar library
nimrob28 Mar 23, 2011 4:50 AM (in response to jaikiran)Woah you are a savior jaikiran pai. I am extremely greatful for the insanly quick reply, you have saved me many hours of pain. This did fix my problem although I am curious as to why it may not occur on windows as well.
Again thank you very much.
Anders Welen thank you as well for the reply however I personally put the file in the lib directory (don't ask me why, I am just a noob) so it is actually there on windows.
-
5. Re: Unable to compile with jboss-javaee.jar library
nimrob28 Mar 23, 2011 6:44 AM (in response to nimrob28)I am now running into an error that says javax.servlet does not exist as well as other things when I try to compile my servlet. Isnt this defined in
jbossall-client.jar as well? I also included
other jar files but to no success. =( -
6. Re: Unable to compile with jboss-javaee.jar library
welle Mar 23, 2011 6:54 AM (in response to nimrob28)After a quick search I found javax.servlet in "servlet-api.jar"
"jbossall-client.jar" is meant for clients and servlets isn't client code. They runs on the server.
-
7. Re: Unable to compile with jboss-javaee.jar library
nimrob28 Mar 23, 2011 6:55 AM (in response to welle)I have added /usr/local/jboss-5.1.0.GA/common/lib/servlet-api.jar to my classpath but the problem still persists.
-
8. Re: Unable to compile with jboss-javaee.jar library
welle Mar 23, 2011 6:57 AM (in response to nimrob28)What class is missing?
-
9. Re: Unable to compile with jboss-javaee.jar library
nimrob28 Mar 23, 2011 7:00 AM (in response to welle)class HttpServlet
Maze_war/servlets/MazeServlet.java:10: cannot find symbol
symbol: class HttpServlet
public class MazeServlet extends HttpServlet {
-
10. Re: Unable to compile with jboss-javaee.jar library
welle Mar 23, 2011 7:05 AM (in response to nimrob28)Hmm... can you please provide "MazeServlet.java" (or at least the rows around row #10 + all imports)
-
11. Re: Unable to compile with jboss-javaee.jar library
nimrob28 Mar 23, 2011 7:07 AM (in response to welle)its just to test my beans right now, it compiles fine with netbeans I just need to be able to do it manually as well
-
12. Re: Unable to compile with jboss-javaee.jar library
welle Mar 23, 2011 7:13 AM (in response to nimrob28)You can't have the classpath right.
The following "servlet" compiles with "javac -cp servlet-api.jar Servlet.java" and so should yours!
=============
import javax.servlet.*;
import javax.servlet.http.*;
public class Servlet extends HttpServlet {
}
=============
-
13. Re: Unable to compile with jboss-javaee.jar library
djhill Mar 25, 2011 4:03 PM (in response to nimrob28)Just a hunch, but make sure the java versions are in synch, especially if you recently switched to a Java 6 JDK. You have to use the corresponding JBoss installer with binaries compiled under Java 5 or 6.