c0d3x
c0d3x

Reputation: 31

Running ant in eclipse (sql2java) - no output to the console

I am configuring sql2java the first time myself. I extracted the zip-archive and imported all files into an eclipse java project. I don't know if this is correct, because when I run the ant build file through the eclipse ant function ("Run as ant build...") there is no output on the console.

I don't know where the problem is located, sql2java, ant, eclipse? Its a fresh and clean install of eclipse galileo.

How can I get sql2java / ant to work? How do I get any information that can help me to locate the problem? Is there a way to use the eclipse's ant installation to run the build file from console?

Any help would be appreciated. Thanks in advance.

Upvotes: 3

Views: 7922

Answers (5)

basin
basin

Reputation: 4190

I can reproduce the problem by using JDK7 as Runtime JRE in "External tools configurations..." Switching to JDK6 or JDK8 solves it.

I have eclipse-jee-luna-SR2-win32-x86_64 and jdk1.8.0_40 in my eclipse.ini

"Run in the same JRE" helps too.

Neither of these three solutions worked for me: "anthome", "Allocate console", "Ant" view

Upvotes: 0

sanjay kushwaha
sanjay kushwaha

Reputation: 1

To show the Ant in Console follow these steps...

Method 1:-- Press Alt+Shift+Q after this only press Q. A window will display choose Ant and "double Click" it will show in console.

Method 2:--

Go to Window Menu in Eclipse Choose Show View Next.. Choose Other Now Choose Ant and double click to show in console

Upvotes: 0

Friederike
Friederike

Reputation: 1282

I had a similar problem and none of the existing answers worked for me. In my case the problem was the launcher.

Open "External Tools Configuration" and select the launcher that starts the Ant script. In the tab "Common" make sure that "Allocate console (necessary for input)" is checked!

Hope it helps others who come to this question. This can also be the reason why there was is no console output from an Ant script.

Upvotes: 2

2010user
2010user

Reputation: 59

to get the output in console. you should change the JRE option in the Edit configuration and launch for Ant run as to Run in same JRE as the workspace.

with this change you can see the output in console.it doesnot matter where the ANT home is.it can be in eclipse plugin or separate ant dir.

Upvotes: 5

acteon
acteon

Reputation: 429

the problem may be related to anthome definitions, generally it should be the same with your eclipse plugin directory.

  1. goto windows/preferences menu
  2. on the left tree-menu choose ant/Runtime
  3. on right screen edit your anthome variable, set to your eclipse installition ant plugin directory forexample : ..\eclipse-jee-galileo win32\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145

hope it works

Upvotes: 5

Related Questions