Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Resolved - Liferay IDE - Error running javac.exe compiler Stan X July 31, 2010 1:00 AM
RE: Liferay IDE - Error running javac.exe compiler p chandru June 25, 2010 1:57 AM
RE: Liferay IDE - Error running javac.exe compiler Corné Aussems July 29, 2010 6:54 AM
RE: Liferay IDE - Error running javac.exe compiler Corné Aussems July 29, 2010 6:58 AM
RE: Liferay IDE - Error running javac.exe compiler Stan X July 31, 2010 12:59 AM
RE: Liferay IDE - Error running javac.exe compiler Jörg Kuhn December 23, 2010 2:34 AM
RE: Liferay IDE - Error running javac.exe compiler Binh Thanh Le December 31, 2010 8:34 PM
RE: Liferay IDE - Error running javac.exe compiler Kiran Kumar Boyini November 21, 2012 10:08 PM
RE: Liferay IDE - Error running javac.exe compiler Kiran Kumar Boyini November 21, 2012 10:10 PM
RE: Liferay IDE - Error running javac.exe compiler Jasmin Leung January 13, 2011 2:31 AM
RE: Liferay IDE - Error running javac.exe compiler Nouran Hafez February 14, 2011 6:32 AM
RE: Liferay IDE - Error running javac.exe compiler Corné Aussems February 14, 2011 8:10 AM
RE: Liferay IDE - Error running javac.exe compiler Nouran Hafez February 14, 2011 9:26 AM
RE: Liferay IDE - Error running javac.exe compiler Corné Aussems February 14, 2011 9:35 AM
RE: Liferay IDE - Error running javac.exe compiler Nouran Hafez February 14, 2011 9:46 AM
RE: Liferay IDE - Error running javac.exe compiler Corné Aussems February 14, 2011 1:02 PM
RE: Liferay IDE - Error running javac.exe compiler Nouran Hafez February 15, 2011 12:43 AM
RE: Resolved - Liferay IDE - Error running javac.exe compiler Horst-Günther Barzik June 21, 2011 5:48 AM
RE: Resolved - Liferay IDE - Error running javac.exe compiler Corné Aussems June 30, 2011 3:21 PM
RE: Liferay IDE - Error running javac.exe compiler Jay Patel July 7, 2011 3:46 AM
RE: Liferay IDE - Error running javac.exe compiler Kiran Kumar Boyini November 21, 2012 10:22 PM
RE: Liferay IDE - Error running javac.exe compiler Miller Gonzalez November 22, 2012 7:40 AM
RE: Liferay IDE - Error running javac.exe compiler tran quyet November 22, 2012 10:50 AM
RE: Liferay IDE - Error running javac.exe compiler Miller Gonzalez November 22, 2012 8:07 PM
RE: Liferay IDE - Error running javac.exe compiler Vishal Panchal November 22, 2012 8:39 PM
RE: Liferay IDE - Error running javac.exe compiler Miller Gonzalez November 23, 2012 7:08 AM
RE: Resolved - Liferay IDE - Error running javac.exe compiler Wilson Silva September 5, 2011 6:39 AM
RE: Resolved - Liferay IDE - Error running javac.exe compiler Ranga Rao Bobbili October 20, 2011 5:40 AM
RE: Resolved - Liferay IDE - Error running javac.exe compiler Diego Pino June 27, 2012 12:12 AM
RE: Resolved - Liferay IDE - Error running javac.exe compiler tran quyet July 31, 2012 12:53 PM
RE: Resolved - Liferay IDE - Error running javac.exe compiler Kiran Kumar Boyini November 21, 2012 10:59 PM
Stan X
Resolved - Liferay IDE - Error running javac.exe compiler
July 31, 2010 1:00 AM
Answer

Stan X

Rank: Regular Member

Posts: 202

Join Date: January 27, 2008

Recent Posts

Hi,

I have followed the installation of LP 6.0.2, SDK 6.0.2, and Eclipse.

http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Installation+Guide

I am able create and deploy a simple portlet. Now I am testing the Liferay Service.

For the service.xml file, I have the following :

 1
 2<?xml version="1.0" encoding="UTF-8"?>
 3<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
 4<service-builder package-path="com.test.test.portlet">
 5    <author>root</author>
 6    <namespace>test</namespace>
 7
 8        <entity name="TestEntry" table="CC_TestEntry" uuid="true" local-service="true" remote-service="false">
 9
10                <!-- PK fields -->
11
12                <column name="entryId" type="long" primary="true" />
13
14                <!-- Group instance -->
15
16                <column name="groupId" type="long" />
17
18        </entity>
19       
20</service-builder>


When I try to build it, I get the following error :


 1
 2
 3[Console output redirected to file:C:\eclipse\workspace\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
 4
 5Buildfile: C:\ide\liferay-plugins-sdk-6.0.2\portlets\test-portlet\build.xml
 6
 7build-service:
 8       [mkdir] Created dir: C:\ide\liferay-plugins-sdk-6.0.2\portlets\test-portlet\docroot\WEB-INF\service
 9       [mkdir] Created dir: C:\ide\liferay-plugins-sdk-6.0.2\portlets\test-portlet\docroot\WEB-INF\sql
10        [java] Loading jar:file:/C:/ide/liferay-portal-6.0.2/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
11        [java] Loading jar:file:/C:/ide/liferay-portal-6.0.2/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
12        [java] Loading jar:file:/C:/ide/liferay-portal-6.0.2/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
13        [java] 17:37:40,109 INFO  [PortalImpl:276] Global lib directory /C:/ide/liferay-portal-6.0.2/tomcat-6.0.26/lib/ext/
14        [java] 17:37:40,109 INFO  [PortalImpl:296] Portal lib directory /C:/ide/liferay-portal-6.0.2/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/
15        [java] Building TestEntry
16        [java] Writing docroot\WEB-INF\src\com\test\test\portlet\service\persistence\TestEntryPersistenceImpl.java
17        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\persistence\TestEntryPersistence.java
18        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\persistence\TestEntryUtil.java
19        [java] Writing docroot\WEB-INF\src\com\test\test\portlet\model\impl\TestEntryModelImpl.java
20        [java] Writing docroot\WEB-INF\src\com\test\test\portlet\model\impl\TestEntryImpl.java
21        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\model\TestEntryModel.java
22        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\model\TestEntry.java
23        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\model\TestEntryClp.java
24        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\model\TestEntryWrapper.java
25        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\model\TestEntrySoap.java
26        [java] Writing docroot\WEB-INF\src\com\test\test\portlet\service\impl\TestEntryLocalServiceImpl.java
27        [java] Writing docroot\WEB-INF\src\com\test\test\portlet\service\base\TestEntryLocalServiceBaseImpl.java
28        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\TestEntryLocalService.java
29        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\TestEntryLocalServiceUtil.java
30        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\TestEntryLocalServiceClp.java
31        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\TestEntryLocalServiceWrapper.java
32        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\messaging\ClpMessageListener.java
33        [java] Writing docroot\WEB-INF\service\com\test\test\portlet\service\ClpSerializer.java
34       [mkdir] Created dir: C:\ide\liferay-plugins-sdk-6.0.2\portlets\test-portlet\docroot\WEB-INF\service-classes
35
36compile-java:
37       [javac] Compiling 14 source files to C:\ide\liferay-plugins-sdk-6.0.2\portlets\test-portlet\docroot\WEB-INF\service-classes
38
39BUILD FAILED
40C:\ide\liferay-plugins-sdk-6.0.2\build-common-plugin.xml:349: The following error occurred while executing this line:
41C:\ide\liferay-plugins-sdk-6.0.2\build-common.xml:90: Error running javac.exe compiler
42
43Total time: 6 seconds


---

Any ideas?
p chandru
RE: Liferay IDE - Error running javac.exe compiler
June 25, 2010 1:57 AM
Answer

p chandru

Rank: New Member

Posts: 7

Join Date: February 19, 2010

Recent Posts

Hi Stan,


Check your build."username".properties file for that problem.
Also check the environment variables you set it.
May the directory or the path is wrong.



Thanks,


Chandru P
Corné Aussems
RE: Liferay IDE - Error running javac.exe compiler
July 29, 2010 6:54 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1258

Join Date: October 3, 2006

Recent Posts

I experience the same problem.
Did you find any solution yet?
Corné Aussems
RE: Liferay IDE - Error running javac.exe compiler
July 29, 2010 6:58 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1258

Join Date: October 3, 2006

Recent Posts

OK i found it myself so for future reference;
1
2##
3## Compiler
4##
5....
6    javac.compiler=modern
7    #javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter


change to
1
2    #javac.compiler=modern
3    javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
Stan X
RE: Liferay IDE - Error running javac.exe compiler
July 31, 2010 12:59 AM
Answer

Stan X

Rank: Regular Member

Posts: 202

Join Date: January 27, 2008

Recent Posts

Thanks for sharing the solution.
Jörg Kuhn
RE: Liferay IDE - Error running javac.exe compiler
December 23, 2010 2:34 AM
Answer

Jörg Kuhn

Rank: New Member

Posts: 1

Join Date: December 23, 2010

Recent Posts

Woderful information. Thankx
Binh Thanh Le
RE: Liferay IDE - Error running javac.exe compiler
December 31, 2010 8:34 PM
Answer

Binh Thanh Le

Rank: New Member

Posts: 14

Join Date: August 1, 2010

Recent Posts

This is really nice, But can anyone explains to me the difference between the two?
I think it would be better if we use the default Sun's Compiler other than the
Eclipse's one ?

Corné Aussems:
OK i found it myself so for future reference;
1
2##
3## Compiler
4##
5....
6    javac.compiler=modern
7    #javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter


change to
1
2    #javac.compiler=modern
3    javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
Jasmin Leung
RE: Liferay IDE - Error running javac.exe compiler
January 13, 2011 2:31 AM
Answer

Jasmin Leung

Rank: New Member

Posts: 1

Join Date: January 2, 2011

Recent Posts

it's very nice of you guys~
Nouran Hafez
RE: Liferay IDE - Error running javac.exe compiler
February 14, 2011 6:32 AM
Answer

Nouran Hafez

Rank: New Member

Posts: 5

Join Date: January 31, 2011

Recent Posts

Can someone kindly tell me where to find the file that contains the lines specified by Corné Aussems?

Thanks,
Nouran
Corné Aussems
RE: Liferay IDE - Error running javac.exe compiler
February 14, 2011 8:10 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1258

Join Date: October 3, 2006

Recent Posts

I have found it in Galileo here
\eclipse\configuration\org.eclipse.osgi\bundles\304\1\.cp\jdtCompilerAdapter.jar
Nouran Hafez
RE: Liferay IDE - Error running javac.exe compiler
February 14, 2011 9:26 AM
Answer

Nouran Hafez

Rank: New Member

Posts: 5

Join Date: January 31, 2011

Recent Posts

Thank you Corné for your prompt reply. I found the jdt jar and I placed it in the build class path, but my problem still presists. Now it says

BUILD FAILED
C:\Sources\Liferay Plugins SDK\liferay-plugins-sdk-6.0.2\build-common-plugin.xml:216: The following error occurred while executing this line:
C:\Sources\Liferay Plugins SDK\liferay-plugins-sdk-6.0.2\build-common.xml:90: Class not found: ${org.eclipse.jdt.core.jdtCompilerAdapter}

I created an org.eclipse.jdt.core folder and added the jar file to it. And in the build-common.xml file I changed it to the following,

 1<target name="compile-java">
 2        <if>
 3            <equals arg1="${javac.compiler}" arg2="modern" />
 4            <then>
 5                <javac
 6                    classpathref="${javac.classpathref}"
 7                         compiler="${org.eclipse.jdt.core.jdtCompilerAdapter}"
 8                    debug="${javac.debug}"
 9                    deprecation="${javac.deprecation}"
10                    destdir="${javac.destdir}"
11                    fork="${javac.fork}"
12                    includeAntRuntime="false"
13                    memoryMaximumSize="${javac.memoryMaximumSize}"
14                    nowarn="${javac.nowarn}"
15                    srcdir="${javac.srcdir}"
16                />
17            </then>


Could you kindly tell me what the problem is? Are there certain steps that need to be done to get it to build successfully without errors?

Thank you in advance for your time emoticon
Corné Aussems
RE: Liferay IDE - Error running javac.exe compiler
February 14, 2011 9:35 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1258

Join Date: October 3, 2006

Recent Posts

Why are you using sdk 602?
I need more info?
Did you follow the instrictions from the wiki?
Nouran Hafez
RE: Liferay IDE - Error running javac.exe compiler
February 14, 2011 9:46 AM
Answer

Nouran Hafez

Rank: New Member

Posts: 5

Join Date: January 31, 2011

Recent Posts

Hey

I downloaded Liferay Portal Community Edition 6.0 GA3 bundled with Tomcat. And I downloaded the sdk from within Eclipse itself and this version was the one that automatically downloaded. My normal plugin portlet or hook projects work fine. But when I tried to create a new service.xml file and build it the errors occurred as shown in the previous posts.

Which wiki are you referring to?

Thanks again for your help.
Corné Aussems
RE: Liferay IDE - Error running javac.exe compiler
February 14, 2011 1:02 PM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1258

Join Date: October 3, 2006

Recent Posts

I'm referring to wiki's
http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Installation+Guide
and
http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial

But i always download the sdk from sourceforge.

FYI information there is a new IDE 1.2 out

Liferay IDE Wiki's
Liferay IDE Webinar

Please use the latest IDE and state your Eclipse version and JDK version.
Nouran Hafez
RE: Liferay IDE - Error running javac.exe compiler
February 15, 2011 12:43 AM
Answer

Nouran Hafez

Rank: New Member

Posts: 5

Join Date: January 31, 2011

Recent Posts

Thank you sooo much Corné. I updated to the latest version of Eclipse and the new Liferay IDE and I changed the compiler lines mentioned earlier in the threads and it worked emoticon

Thanks again!
Horst-Günther Barzik
RE: Resolved - Liferay IDE - Error running javac.exe compiler
June 21, 2011 5:48 AM
Answer

Horst-Günther Barzik

Rank: New Member

Posts: 1

Join Date: June 21, 2011

Recent Posts

In my opinion the problem arises because liferay may be downloaded as a bundle with eclipse, which in addition contains a JRE. Running ant javac task requires a connection to a JDK, which isn't available then by default.

In case of that problem, check youre eclipse JAVA settings and set to a JDK. Voila. However, there are some other solutions, but this is THE one.

Have fun.
Corné Aussems
RE: Resolved - Liferay IDE - Error running javac.exe compiler
June 30, 2011 3:21 PM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1258

Join Date: October 3, 2006

Recent Posts

Horst-Gunter is right i forgot to update this;
See images how you could do this
Attachment

Attachment

Attachments: ExternalTools.png (38.4k), ExternalToolsConfig.png (27.9k)
Jay Patel
RE: Liferay IDE - Error running javac.exe compiler
July 7, 2011 3:46 AM
Answer

Jay Patel

Rank: Regular Member

Posts: 116

Join Date: February 23, 2010

Recent Posts

Corné Aussems:
OK i found it myself so for future reference;
1
2##
3## Compiler
4##
5....
6    javac.compiler=modern
7    #javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter


change to
1
2    #javac.compiler=modern
3    javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter



Thanks man..This has resolved my problem..
Wilson Silva
RE: Resolved - Liferay IDE - Error running javac.exe compiler
September 5, 2011 6:39 AM
Answer

Wilson Silva

Rank: New Member

Posts: 19

Join Date: June 9, 2011

Recent Posts

I was having the same problem and I fixed it by updating the Liferay IDE to 1.3
Ranga Rao Bobbili
RE: Resolved - Liferay IDE - Error running javac.exe compiler
October 20, 2011 5:40 AM
Answer

Ranga Rao Bobbili

Rank: Regular Member

Posts: 148

Join Date: July 20, 2007

Recent Posts

Hi All,

I resolved this issue using below steps. i.e. Memorey issue

1. Remove fork attribute from java element
<sdk>\ext\build-common-ext.xml
<java
classname="com.liferay.portal.tools.ExtInfoBuilder"
classpathref="portal.classpath"
fork="true"
maxmemory="256m"
newenvironment="true"
>

2. Remove fork attribute from java element
<sdk>\build-common.xml
<javac
classpathref="${javac.classpathref}"
compiler="${javac.compiler}"
fork="true"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="${javac.destdir}"
includeAntRuntime="false"
memoryMaximumSize="${javac.memoryMaximumSize}" (fork=false eliminates memoryMaximumSize attribute)
nowarn="${javac.nowarn}"
srcdir="${javac.srcdir}"
/>

Regards,
Ranga Rao B
Adaequare Info Pvt Ltd,
Hyderabad,
India
Diego Pino
RE: Resolved - Liferay IDE - Error running javac.exe compiler
June 27, 2012 12:12 AM
Answer

Diego Pino

Rank: New Member

Posts: 1

Join Date: June 27, 2012

Recent Posts

I got the same issue in Fedora16 ("Class not found: org.eclipse.jdt.core.JDTCompilerAdapter"). I had copied ecj.jar to /usr/share/ant/lib but still didn't work. I found out that I needed to define ANT_HOME variable too:

export ANT_HOME="/usr/share/ant/"
tran quyet
RE: Resolved - Liferay IDE - Error running javac.exe compiler
July 31, 2012 12:53 PM
Answer

tran quyet

Rank: New Member

Posts: 2

Join Date: July 31, 2012

Recent Posts

Hello!
I can help you! I solved this problem! Please follow these step:
1. in eclipse, Window -> Preferences -> Java -> Installed JREs -> Add
2. browse to jdk directory, instead of jre directory!
3. ok, tick in the check box to select your jdk -> ok
Good luck!
Attachment

Attachments: javac_error_solved.png (87.4k)
Kiran Kumar Boyini
RE: Liferay IDE - Error running javac.exe compiler
November 21, 2012 10:08 PM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 274

Join Date: June 2, 2011

Recent Posts

Hi,


Me also getting same kind of issue.Could please tell where I can find out the above file.

I mean provide path of the above file. I am using the liferay ide 1.4.0 version and eclipse helios version .

Thanks & Regards,

KiranKumar Boyini.
Kiran Kumar Boyini
RE: Liferay IDE - Error running javac.exe compiler
November 21, 2012 10:10 PM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 274

Join Date: June 2, 2011

Recent Posts

Hi,


Me also getting same kind of issue.Could please tell where I can find out the above file.

I mean provide path of the above file. I am using the liferay ide 1.4.0 version and eclipse helios version

Thanks & Regards,

KiranKumar Boyini.
Kiran Kumar Boyini
RE: Liferay IDE - Error running javac.exe compiler
November 21, 2012 10:22 PM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 274

Join Date: June 2, 2011

Recent Posts

Hi,

I am also getting same error. Could you please tell me the path of the above files to change above settings.

I am using the eclipse helios version.

Thanks & Regards

KiranKumar Boyini.
Kiran Kumar Boyini
RE: Resolved - Liferay IDE - Error running javac.exe compiler
November 21, 2012 10:59 PM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 274

Join Date: June 2, 2011

Recent Posts

Thank you


I solved the issue by following your reply in screenshot .


Regards,

KiranKumar Boyini.
Miller Gonzalez
RE: Liferay IDE - Error running javac.exe compiler
November 22, 2012 7:40 AM
Answer

Miller Gonzalez

Rank: New Member

Posts: 3

Join Date: November 22, 2012

Recent Posts

i'm new in java and liferay, where i can modify this configuration... and why is happen now, in the past i don have that issue
Thanks!
tran quyet
RE: Liferay IDE - Error running javac.exe compiler
November 22, 2012 10:50 AM
Answer

tran quyet

Rank: New Member

Posts: 2

Join Date: July 31, 2012

Recent Posts

Hi!
I dont understand what you say. You get this error again, do you?
Miller Gonzalez
RE: Liferay IDE - Error running javac.exe compiler
November 22, 2012 8:07 PM
Answer

Miller Gonzalez

Rank: New Member

Posts: 3

Join Date: November 22, 2012

Recent Posts

Hello again , my question is where i can modify this configuration:

##
## Compiler
##
....
javac.compiler=modern
#javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
Vishal Panchal
RE: Liferay IDE - Error running javac.exe compiler
November 22, 2012 8:39 PM
Answer

Vishal Panchal

Rank: Expert

Posts: 277

Join Date: May 20, 2012

Recent Posts

Miller Gonzalez:
Hello again , my question is where i can modify this configuration:

##
## Compiler
##
....
javac.compiler=modern
#javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter


Hi ,

You can modify this configuration in build.{userid}.properties file.

Thanks&Regards,
Vishal R. Panchal
Miller Gonzalez
RE: Liferay IDE - Error running javac.exe compiler
November 23, 2012 7:08 AM
Answer

Miller Gonzalez

Rank: New Member

Posts: 3

Join Date: November 22, 2012

Recent Posts

thanks, works for me!