• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error running javac.exe compiler

 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
When i build my project using ant , I get a error "Error running javac.exe compiler" I have JDK installed. I have my path variable pointing to javac.
Please help me to fix this issue.
BUILD FAILED
C:\Documents and Settings\kumarkud\workspace\ipm\build-install.xml:145: Error running javac.exe compiler
Thanks
Deepak
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Is your compiler in the PATH ? Try to type "javac" at the command prompt. If javac is not found, then you should put your bin directory in the PATH.
For example, in Windows, SET PATH=c:/jdk1.5.0_07/bin;%PATH%
2. Are you using the "executable" attribute of the javac task ?
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another thing to look for - make sure that the version of Java on the PATH, and pointed at by JAVA_HOME - is a JDK - *not* just a JRE.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm also facing same issue with this. But i'm getting an error like this:
Error running "C:\Program Files\Java\jdk1.5.0_16\bin\javac" compiler
And i'm using 'executable' & 'compiler' as the parameter to the javac task.

Please help!

Thanks.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sachin Sr wrote:Hi,
I'm also facing same issue with this. But i'm getting an error like this:
Error running "C:\Program Files\Java\jdk1.5.0_16\bin\javac" compiler
And i'm using 'executable' & 'compiler' as the parameter to the javac task.

Please help!

Thanks.



Isn't there an explanatory message as well? Something like "Program not found?"
 
Sachin Ramaprasad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. Nothing as such. The main idea that i want to use executable and compiler attribute in my javac task in ANT is because of this error that i'm getting:

[javac] <path>\JMSMessageSender.java:25: type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds T,javax.jms.Message
[javac] return builder.buildMessage(session);

I thought this particular java file is unable to compile with the mixed java version that i had. Now i've uninstalled the other Java version and only left with one version i.e., "1.5.0_16".

Does anybody have ever seen this type of error. And Fyi, my ANT build.xml file is able to compile all other JAVA files except this one alone. Your help is greatly appreciated.

Thanks,
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java isn't one of those "Highlander-type" systems (There Can Be Only One), so you didn't need to uninstall other JRE's and/or JDK's. Ant will use whichever JDK was pointed to by the JAVA_HOME environment variable when you run Ant. Which is why Nathan suggested you check it. The PATH isn't important in the selection of which javac.exe to use, but JAVA_HOME is critical.

But it looks to me like you did supply the missing additional messages after all! It's not having a problem getting javac to run, but rather that you're getting a compilation error. Which is a big difference.

The source code in question is doing something esoteric with a parameterized (generic) type. And to tell the truth, I can't make sense of that message, either. I'd google for the message and see if somewhere out there there's a better explanation of what that message means.
 
Sachin Ramaprasad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your quick response.

I was able to get rid of this issue by removing the character "<T>T" in the source code and it compiled fine.

But I'm getting another different issue with another java file.
[javac] D:\classpath\com\ts\hostmsg\AggregatorQueueListenerMDB.java:15: illegal start of expression
[javac] }
[javac] ^
[javac] 1 error

Any idea how to get rid of this error?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
snehal shinde,
Your post was moved to a new topic.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic