• Post Reply Bookmark Topic Watch Topic
  • New Topic

can't compile my ejb

 
nuhu jibrin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Even after installing my JBoss-4.0.5GA or even JBoss-4.0.2 correctly and setting my windows environment variables, my attempts to compile my ejbs give the following error:



".....'javac' is not recognized as an internal or external command,
operable program or batch file...."



Please, i want information on want i'm doing wrong.

Thanks!

JB
 
Mark Spritzler
ranger
Sheriff
Posts: 17290
9
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to set a JAVA_HOME environment variable in your OS.

set it to the dir where you installed Java, but not including the \bin dir.

Mark
 
nuhu jibrin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
You need to set a JAVA_HOME environment variable in your OS.

set it to the dir where you installed Java, but not including the \bin dir.

Mark


Hi Mark,

Thanks for your quick and precise response. But, I've set my JAVA_HOME,as you said, JBoss_HOME and even CLASSPATH. There's still error. I don't know what's really missing!

Thanks!

JB
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you compiling your ejbs? In an IDE? With Ant? Via the command line?
[ March 28, 2007: Message edited by: Paul Sturrock ]
 
nuhu jibrin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Sturrock:
How are you compiling your ejbs? In an IDE? With Ant? Via the command line?

[ March 28, 2007: Message edited by: Paul Sturrock ]


Hi Paul,

It's via the command line.

Thanks.

JB
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you need to have the javac executable in your PATH. You don't say which OS you are using, but I'll assume Windows. Type "set PATH" from your command line and see what is in there. Does it include an entry for %JAVA_HOME% (and JAVA_HOME is set) or the bin directory of wherever you have installed your JDK? If it doesn't you'll need to change it so it does.
 
nuhu jibrin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Sturrock:
So you need to have the javac executable in your PATH. You don't say which OS you are using, but I'll assume Windows. Type "set PATH" from your command line and see what is in there. Does it include an entry for %JAVA_HOME% (and JAVA_HOME is set) or the bin directory of wherever you have installed your JDK? If it doesn't you'll need to change it so it does.


Paul,

Thanks for your prompt response. You see, i've done all these. Indeed, i feel there could be a special configuration or special Jar-files the Jboss server requires or that it doesn't recognise the system path and classpath.

I tried all these in windows 2000 and xp server 2003 with JBoss-4.0.5.GA and JBoss-4.0.2. I'm almost frustrated now!

Thanks.

JB
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for your prompt response. You see, i've done all these. Indeed, i feel there could be a special configuration or special Jar-files the Jboss server requires or that it doesn't recognise the system path and classpath.

The path settings in the OS have an affect way before JBoss gets into the picture. The classpath does not play any part in this problem either. The problem is Windows cannot find javac.exe. The only way to fix this is to correct the PATH so it includes the bin directory of your JDK (where javac.exe is). Remember that if you update the path via the Control Panel>System settings it will not take effect till you open a new command prompt. Also remember that if you are setting the PATH via the SET command it must be done in the same command prompt you are trying to compile your code from (and the scope of the change to the PATH is just that command window, it will revert to whatever is stored in the environment variables when you close the command window)
[ March 28, 2007: Message edited by: Paul Sturrock ]
 
nuhu jibrin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Sturrock:

The path settings in the OS have an affect way before JBoss gets into the picture. The classpath does not play any part in this problem either. The problem is Windows cannot find javac.exe. The only way to fix this is to correct the PATH so it includes the bin directory of your JDK (where javac.exe is). Remember that if you update the path via the Control Panel>System settings it will not take effect till you open a new command prompt. Also remember that if you are setting the PATH via the SET command it must be done in the same command prompt you are trying to compile your code from (and the scope of the change to the PATH is just that command window, it will revert to whatever is stored in the environment variables when you close the command window)

[ March 28, 2007: Message edited by: Paul Sturrock ]


Paul,

Thanks a million. I sincerely think that; with people like you, the world will surely go round and round and round!!! thanks once again, i really appreciate.

CHEERS!!!

JB
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are more than welcome nuhu jibrin. Glad you got it fixed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!