I am trying to use Atlassian SDK 6.2.9. on my laptop with Win10, but there is a maven problem.
Java:1.8.0_101
Mvn: 3.3.9 (M2_HOME)
CMD full stack says more:
c:\>atlas-version
ATLAS Version: 6.2.9
ATLAS Home: C:\ProgramData\Atlassian\atlassian-plugin-sdk-6.2.9
ATLAS Scripts: C:\ProgramData\Atlassian\atlassian-plugin-sdk-6.2.9\bin
ATLAS Maven Home: C:\ProgramData\Atlassian\atlassian-plugin-sdk-6.2.9\apache-maven-3.2.1
AMPS Version: 6.2.6
--------
Executing: "C:\ProgramData\Atlassian\atlassian-plugin-sdk-6.2.9\apache-maven-3.2.1\bin\mvn.bat" --version -gs C:\ProgramData\Atlassian\atlassian-plugin-sdk-6.2.9\apache-maven-3.2.1/conf/settings.xml
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.c:\>
My question is how can I figure this mvn problem out?
Thanks a lot
Related
This is my output when I try running my Xcode KMM project
jenv global -> openjdk version "1.8.0_212"
java -version -> {
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
oracle64-11.0.10
}
echo $JAVA_HOME -> ***Nothing comes here***
./gradlew :shared:packForXCode -PXCODE_CONFIGURATION=${CONFIGURATION}
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/ch/AndroidStudioProjects/Test4001/androidApp/build.gradle.kts' line: 1
* What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
----<<<<>>>>-----
Anywhere in my Terminal:
java -version -> {
java version "11.0.10" 2021-01-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)
}
jenv global -> oracle64-11.0.10
echo $JAVA_HOME -> /Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home
I would like to understand how and why Xcode could be picking up the wrong version, obviously besides the fact that it can't find JAVA_HOME
It looks like this happens because xcode can't find the setup java version and gets some sort of default value.
If you would try to run your xcode project right now (I only reproduced this on BigSur) it will not work because the java version will show as outdated.
If you inspect with jenv or java you will find that your innner project folders and general version of java are setup correctly.
To fix this I just add an "export JAVA_HOME=$(/usr/libexec/java_home -v)" or "source ~/.zshrc" or "source ~/.bash_profile" before your run your scripts in Xcode
Of course the global version or your java_home must be in the correct java version you want to use
I'm trying to figure out how to use the GraalVM native image agent with a Quarkus app running via mvn quarkus:dev.
I tried running:
mvn quarkus:dev -Djvm.args="-agentlib:native-image-agent=config-output-dir=native-image-config"
However I get the error:
ERROR: JDWP unable to get necessary JVMTI capabilities.
Any tips?
My version of Java:
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03)
OpenJDK 64-Bit Server VM GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03, mixed mode, sharing)
By default mvn quarkus:dev enables debug with -Xrunjdwp, something like -Xrunjdwp:transport=dt_socket,address=0.0.0.0:5005,server=y,suspend=n
Then you stumble upon an issue described in this answer -- in short JDWP and JVMTI don't seem to work together well.
You can disable debug with passing -Ddebug=false and then it works. Something like this:
mvn quarkus:dev -Ddebug=false -Djvm.args="-agentlib:native-image-agent=config-output-dir=native-image-config"
I'm new to Jasper reports and Mac. I have downloaded iReport-5.6.0.dmg. It got saved in downloads. Later I moved to applications. The .dmg didnt install and when I just open the .dmg and right click to open for Jaspersoft report designer, it didnt open.
I just saw some questions, but nothing helped.
I'm using mac os Sierra 10.12.2
My java version is
Alis-MacBook-Air:~ Shah$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Alis-MacBook-Air:~ Shah$
JDK location
Alis-MacBook-Air:~ Shah$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
1.8.0_101, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
1.7.0_79, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
iReport.conf
# ${HOME} will be replaced by user home directory according to platform
default_userdir="${HOME}/.${APPNAME}/5.6.0"
default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/5.6.0"
# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options="-J-Xms256m -J-Xmx512m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=512m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dnetbeans.exception.report.min.level=99999 "
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea
# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
#jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home"
# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)
#extra_clusters=
You should setup JDK 1.7s as JAVA_HOME otherwise you'll see like this error
"The current path is: C: \ Java \ jdk1.8.0The current path is: C: \ Java \ jdk1.8.0Java HotSpot (TM) 64-Bit Server VM warning: ignoring option MaxPermSize = 512m; support was removed in 8.0" and you can setup jaspersoft studio community its working.
Issue was with the JDK version.
If the JDK version is 1.8, Jasperstudio has to be installed. It worked fine.
It is suppose to be easy, but I'm having great difficulty installing Maven on to my mac 10.11.4.
I have created M2_HOME and PATH for Maven, but when I type in mvn --version, the terminal tell me
/Users/justin/apache-maven-3.3.9/bin/mvn: line 53: uname: command not found
/Users/justin/apache-maven-3.3.9/bin/mvn: line 143: which: command not found
/Users/justin/apache-maven-3.3.9/bin/mvn: line 171: which: command not found
Error: JAVA_HOME is not defined correctly.
We cannot execute
Why is this happening?
You need JAVA_HOME to be defined, as covered in installation guide.
Check out this answer for additional details for MacOS.
For macOs Ventura 13.1
If you installed java openJdk version 11 using Homebrew:
brew install java11
Then, your java is installed on:
/opt/homebrew/Cellar/openjdk#11/11.0.17/libexec/openjdk.jdk/Contents/Home
So, you must understand that this is you JAVA_HOME environment variable.
You need to add the java '/bin' folder to your PATH environment variable in order to have it working on your terminal. Also, you need to create the JAVA_HOME environment variable in order to maven to know about your java.
Therefore, you must open:
/Users/<yourUser>/.zshrc
Add
export JAVA_HOME="/opt/homebrew/Cellar/openjdk#11/11.0.17/libexec/openjdk.jdk/Contents/Home"
export PATH="/opt/homebrew/opt/openjdk#11/bin:$PATH"
Save your changes, close the file. Now you can open your terminal and type:
java -version
and then,
mvn -version
and this is what you should get:
example#example441 ~ % java -version
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 11.0.17+0)
OpenJDK 64-Bit Server VM Homebrew (build 11.0.17+0, mixed mode)
example#example441 ~ % mvn -version
Apache Maven 3.8.7 (xxxxxxxxxxxxxxxxxxxxxxxxxxx)
Maven home: /opt/homebrew/Cellar/maven/3.8.7/libexec
Java version: 11.0.17, vendor: Homebrew, runtime:
opt/homebrew/Cellar/openjdk#11/11.0.17/libexec/openjdk.jdk/Contents/Home
Default locale: pt_BR, platform encoding: UTF-8
OS name: "mac os x", version: "13.1", arch: "aarch64", family: "mac"
I have searched several ways to change JDK version on mac.
$/usr/libexec/java_home
And I got
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
I tried
$export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
also tried
/usr/libexec/java_home 1.8.0_31 --exec javac -version
then I run
$echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
then I re-check java -version
$java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
How I can really change java -version on my mac.
To set Java to 1.8 for your shell environment, put this in your ~/.bash_profile:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Solution without 3rd party tools:
leave all JDKs at their default location, under /Library/Java/JavaVirtualMachines. The system will pick the highest version by default.
To exclude a JDK from being picked by default, rename its Contents/Info.plist to Info.plist.disabled. That JDK can still be used when $JAVA_HOME points to it, or explicitly referenced in a script or configuration. It will simply be ignored by system's java command.
System launcher will use the JDK with highest version among those that have an Info.plist file.
When working in a shell with alternate JDK, pick your method among existing answers (jenv, or custom aliases/scripts around /usr/libexec/java_home, etc).