Apache ANT Version issues during Netbeans Building - java

I'm trying to build a java project using netbeans ide,but i keep getting
Please build using Ant 1.8.0 or higher
error,i think this is due some version difference in the netbeans IDEs,
How can i resolve this issue

In NetBeans options, you can set Ant home. Point this to the other installation.
Mine is:
/usr/local/netbeans-7.2.1/java/ant
the default installed with netbeans.

It doesn't work for me...
I got ant version 1.9.10 and java openjdk 11.0.6 (on linux LEAP 15.1)
I want to build without launching Netbeans 10 in order to automate the copy/build process of my application stored on a distant server (lock down style ^^).
each time I use the command ant -buildfile build.xml I got this error message :{
After seeking and observing, I find out that netbeans uses its "own" ant version but either the command, outputed to Outout tab,
ant -f /netbeans/java/MagicArena -Dnb.internal.action.name=rebuild clean jar
nore
/usr/local/netbeans/extide/ant/bin/ant -f /netbeans/java/MagicArena -Dnb.internal.action.name=rebuild clean
...are giving (BIG) satisfaction :{
I got the same message at command line:
/netbeans/java/MagicArena/nbproject/build-impl.xml:111: Java 9 support requires Ant 1.10.0 or higher
:{

Related

Can't specify SDK in Intellij on Linux

I am running IntelliJ IDEA 2017.1.6 Pro on a Linux (Ubuntu) machine and, it will not let me select an SDK for any Java project.
Whenever I start up the program and go to "Create a New Project" Java has no SDKs available. If go to new and try to specify where my JDKs are installed (I have a few) it always fails with the same error:
I've tried specifying the locations:
/usr/lib/jvm/
/usr/lib/jvm/java-11-openjdk-amd64/
/usr/lib/jvm/java-8-openjdk-amd64/
/usr/lib/jvm/openjdk-11/
/usr/lib/jvm/jdk-14.0.2/
/usr/lib/jvm/default-java
/usr/lib/jvm/java-1.11.0-openjdk-amd64
/usr/lib/jvm/java-1.8.0-openjdk-amd64
(these last three are all just symlinks)
I know I have a JDK installed for my default Java version. I can compile and run code via command line:
justin#stephanie:~/temp$ ls
HelloWorld.java
justin#stephanie:~/temp$ javac HelloWorld.java
justin#stephanie:~/temp$ ls
HelloWorld.class HelloWorld.java
justin#stephanie:~/temp$ java HelloWorld
Hello, World!
The output of readlink -f $(which java) is /usr/lib/jvm/java-11-openjdk-amd64/bin/java (same location for javac exectuable).
Everything I've looked at online suggest that I should just be able to select /usr/lib/jvm/java-11-openjdk-amd64 as my Java SDK but it is failing. I feel like I must be misunderstanding something essential here as I don't know why this isn't working.
Any help would be useful, I've never used IntelliJ before (I've always been an Eclipse user) and it is very frustrating I can't even create a project in it after a couple hours of trying to mess around with it.
1. Please try first with a newer version of IntelliJ, preferably the most current one (currently this is 2020.2)
2. I had the same problem (with version 2020.2 on my Kubuntu system) and fixed it by simply downloading and installing the SDK via IntelliJ.
The /usr directory is mounted at /var/run/host.
You should find your jdk under /var/run/host/usr/lib/jvm.

Java swing on eclipse oxygen 4.7.3a?

I am trying to use windowbuilder on eclipse oxygen 4.7.3a on macOS highSierra. it installed fine but every time I try to open the design part it displays this error
Eclipse is running under 0, but this Java project has a 1.8 Java
compliance level, so WindowBuilder will not be able to load classes
from this project. Use a lower level of Java for the project, or run
Eclipse using a newer Java version.
I tried everything. like changing the running enviroment, .jre files, try different JDE. nothing working. any suggestions?
Your only short term solution is to use a Java version <= 9.
Initially WindowBuilder did not work with Java 9 for several reasons. See
Bug 526098 - WindowBuilder fails to work on Java 9.
One of those issues was that the the System Property java.version was unexpectedly just "9":
Please check that you have exactly 9.0 JDK, it worked for me with
9.0.1 until I downgraded target JRE to 9.0, which has unusual System.getProperty("java.version").equals("9")
The fixes to get WindowsBuilder working on Java 9 were only completed on 2/21/18, and based on your error it looks like a similar issue exists when running WindowsBuilder using Java 10. I suggest you create a Bug Report with Eclipse.
See also:
SO Post Eclipse Oxygen Window Builder Error with Java SE 10.0.1 where the solution/workaround was to regress to Java 9.
This Eclipse Forum post where a user is reporting a similar problem to yours.
Uninstall Java Version and Install lower version of Java(8).Support for WindowBuilder is not provided anymore.
How to uninstall current version?(Mac)
Go to /Library/Java/JavaVirtualMachines/ to see current version of java and replace jdk1.8.0_131.jdk with yours.
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf ~/Library/Application\ Support/Oracle/Java
Install Java 8:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Then:
Right click on your project and go to Properties
Make sure your configuration look like this,
At the top of picture Configure Workspace settings click on it (Uncheck project specification settings) and then see image below
Apply same as in picture Then enable "project specification settings"
Restart Your Eclipse
Done!!

SocketTimeoutException when Ant building in Eclipse

I had been having problems getting Eclipse to build some of my Ant scripts (some built fine, others didn't). Basically, I would get no output in the Eclipse Mars.1 Release (4.5.1) console. My build.xml works fine with ant when I run it on the command line. I was able to find some output in workspace/.metadata/.log where I found the following error message:
!ENTRY org.eclipse.ant.launching 4 120 2016-03-03 09:58:38.197
!MESSAGE Error logged from Ant UI:
!STACK 0
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:89)
which other people have asked about on Stackoverflow.
The other odd thing I noticed was that there's a line of text right above the console showing which java which shows the version of java being used, and working scripts were different than non-working. Working ant build scripts were using jdk1.7.0_79 whereas failed ones were using the /System installed 1.6.
I don't know why java 1.6 wasn't working for me, but eventually I found where I could change Java for ant builds. It's in Run/External Tools/External Tools Configuration.../<select failing build>/JRE. Oddly, after getting it to work and then trying to switch back to 1.6, it gives me the following message when running ant:
JRE version less than 1.7 is not supported.
so who knows why 1.6 was picked in the first place (maybe the project itself is 1.6) or why it didn't give me a warning!
Anyway, there seems to be several causes of the error I posted above, but here's something you can try.
Have had almost the same problem on Eclipse Oxygen, Java 1.8 and Ant to deploy to tomcat7.
Eclipse’s Console doesn't output any error message. It just says „terminated“ when I clicked Run Ant on the build.xml file. WTF
To solve this I had to set everything to java 1.8 especially ant's runtime JRE . But the „Java Compiler“ -> „Compiler compliance level“ has to be set to java 1.7 only.
Actually it is pretty simple. Well classpath settings can be tricky sometimes ;) especially without any error message.
Do not forget to check your ANT_HOME settings: Eclipse -> Prefs -> Runtime -> „Restore Defaults“ should be sufficient. (Eclipse comes with Ant 1.10.1 as default which requires Java8 at runtime.)
And: If it works for some build.xml-files only you are overriding your workspace settings with your ant-build process. To solve this: Click on „Run As“ -> „Ant Build ... “ (NOT „Ant Build“) and check your classpath (for ant) and the JRE settings here to Java 1.8
Regards
Well simply check your ANT_HOME setting.

Error : Executing command 'ant', make sure you have ant installed and added to your path

I am using Cordova for mobile application development.
I have installed Cordova using npm command and after the installation, I have created a cordova project. Whenever I try to add a platform (android) to the project it throws following error:
Error : Executing command 'ant', make sure you have ant installed and added to your path
I have already installed ant on my system and configured path to %ANT_HOME%\bin and other respective required platforms such as JAVA_HOME, ANDROID_PLATFORM_TOOLS and ANDROID_TOOLS.
Whenever I execute the ant command in cmd, no error's are thrown. For example, after the execution of ant -version command in cmd received output is:
Apache Ant(TM) version 1.9.3 compiled on December 23 2013.
I went through many of the questions at Stack Overflow and solved the issue of tools.jar not being present at JRE's Lib directory. still the platform add is not working.
Please do help me out with this. Any help will be appreciated.
I solved this same problem installing ant with a Windows installer contribution
https://code.google.com/p/winant/
At last I was able to figure out the answer of my question.
After a long day, I tried adding IOS platform for same project and I received an error code 'ENOENT' through cordova.
I did some R&D and finally found a solution at -- Phone Gap [error] cmd: Command failed with exit code ENOENT
Again thank you all for your precious time.

jbpm6 - build.xml:508: jboss did not start within 5 minutes

I am new to jbpm and trying to learn jbpm 6, so i downloaded and following the steps which provided document.I was trying to demo using
ant install.demo its working upto install jbpm modular.
I am set the environment of my System is
Note : i am using windows 7 - 64 bit.
Java -version is 1.7
ANT -Version is 1.9.3
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45
ANT_HOME=D:\ant
PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;
I am Install the demo using command in command prompt is ant install.demo
Then am starting the demo using ant start.demo
Then am getting Error as: BUILD FAILED C:\jbpm-installer\build.xml:508: JBoss application server did not start within 5 minutes
To avoid this i did some things, as i read the things from google, by increasing the time out would help ful in build.xml when JBPM 6 at the line number 504.
I am change the port number in build.xml to avoid the conflicts.
Even though i am following above conditions again it repeating the Same Error.
Can Any One ? For Solutions Under JBPM 6 Version............ Thanks in Advance
I had the same problem. The solution was reinstalling java to another version. Moreover, now I have 2 version installed: 32-bit jre and 64-bit jdk in the same moment.

Categories

Resources