Failed to execute goal ...:jira-maven-plugin:8.1.2:create

Please help me!
I’m trying to get started
https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-helloworld-plugin-project/
But after the command atlas-create-jira-plugin
i get
oem@oem-GL72-6QD:~/pro$ atlas-create-jira-plugin
Executing: /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4/bin/mvn com.atlassian.maven.plugins:jira-maven-plugin:8.1.2:create -gs /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4/conf/settings.xml
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] — jira-maven-plugin:8.1.2:create (default-cli) @ standalone-pom —
[INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics.
[INFO] Although no personal information is sent, you may disable tracking by adding false to the amps plugin configuration in your pom.xml
[INFO] Sending event to Google Analytics: AMPS:jira - Create Plugin
[INFO] using stable product version: 7.13.0
[INFO] using stable data version: 7.13.0
Define value for groupId: : com.atlassian.tutorial
Define value for artifactId: : myPlugin
Define value for version: 1.0.0-SNAPSHOT: : 1.0.0-SNAPSHOT
Define value for package: com.atlassian.tutorial: : com.atlassian.tutorial.myPlugin
Use OSGi Java Config: (Y/N/y/n) N: : y
Confirm properties configuration:
groupId: com.atlassian.tutorial
artifactId: myPlugin
version: 1.0.0-SNAPSHOT
package: com.atlassian.tutorial.myPlugin
use OSGi Java Config: y
Y: : y
[INFO] Generating project in Batch mode
[INFO] Archetype repository not defined. Using the one from [com.atlassian.maven.archetypes:jira-plugin-archetype:5.0.18] found in catalog remote
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: jira-plugin-archetype:8.1.2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.atlassian.tutorial
[INFO] Parameter: artifactId, Value: myPlugin
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: com.atlassian.tutorial.myPlugin
[INFO] Parameter: packageInPathFormat, Value: com/atlassian/tutorial/myPlugin
[INFO] Parameter: jiraVersion, Value: 7.13.0
[INFO] Parameter: bitbucketDataVersion, Value: 5.16.0
[INFO] Parameter: package, Value: com.atlassian.tutorial.myPlugin
[INFO] Parameter: bitbucketVersion, Value: 5.16.0
[INFO] Parameter: confluenceDataVersion, Value: 6.14.0
[INFO] Parameter: refappDataVersion, Value: 5.0.0
[INFO] Parameter: groupId, Value: com.atlassian.tutorial
[INFO] Parameter: fecruVersion, Value: 4.6.1-20181008080545
[INFO] Parameter: crowdDataVersion, Value: 3.3.3
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: refappVersion, Value: 3.3.6
[INFO] Parameter: jiraDataVersion, Value: 7.13.0
[INFO] Parameter: confluenceVersion, Value: 6.14.0
[INFO] Parameter: bambooDataVersion, Value: 6.8.0
[INFO] Parameter: useOsgiJavaConfig, Value: Y
[INFO] Parameter: fecruDataVersion, Value: 4.6.1-20181008080545
[INFO] Parameter: bambooVersion, Value: 6.8.0
[INFO] Parameter: platformVersion, Value: 5.0.0
[INFO] Parameter: artifactId, Value: myPlugin
[INFO] Parameter: crowdVersion, Value: 3.3.3
[WARNING] CP Don’t override file /home/oem/pro/myPlugin/src/main/resources/META-INF
[WARNING] CP Don’t override file /home/oem/pro/myPlugin/src/main/resources/META-INF/spring
[INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not “opens java.lang” to unnamed module @1753475d
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:130)
at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:86)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:116)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:116)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at org.codehaus.groovy.reflection.stdclasses.CachedClosureClass.(CachedClosureClass.java:29)
at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:259)
at org.codehaus.groovy.reflection.ClassInfo.access$400(ClassInfo.java:36)
at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:425)
at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:416)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.ClassInfo.getCachedClass(ClassInfo.java:89)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:161)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:83)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:61)
at groovy.lang.GroovySystem.(GroovySystem.java:29)
at org.codehaus.groovy.runtime.InvokerHelper.(InvokerHelper.java:49)
at groovy.lang.GroovyObjectSupport.(GroovyObjectSupport.java:32)
at groovy.lang.Binding.(Binding.java:34)
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:217)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:135)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:106)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:149)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:175)
at org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype(DefaultArchetypeManager.java:73)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:119)
at com.atlassian.maven.plugins.amps.util.MojoUtils.execute(MojoUtils.java:36)
at com.atlassian.maven.plugins.amps.util.MojoUtils.executeWithMergedConfig(MojoUtils.java:66)
at com.atlassian.maven.plugins.amps.MavenGoals.createPlugin(MavenGoals.java:270)
at com.atlassian.maven.plugins.amps.CreateMojo.doExecute(CreateMojo.java:76)
at com.atlassian.maven.plugins.amps.AbstractProductHandlerMojo.execute(AbstractProductHandlerMojo.java:801)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:46 min
[INFO] Finished at: 2022-02-01T11:07:06+06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:jira-maven-plugin:8.1.2:create (default-cli) on project standalone-pom: Unable to execute mojo: Execution null of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate: java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-archetype-plugin:3.0.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/oem/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/3.0.1/maven-archetype-plugin-3.0.1.jar
[ERROR] urls[1] = file:/home/oem/.m2/repository/org/apache/maven/archetype/archetype-catalog/3.0.1/archetype-catalog-3.0.1.jar
[ERROR] urls[2] = file:/home/oem/.m2/repository/org/apache/maven/archetype/archetype-descriptor/3.0.1/archetype-descriptor-3.0.1.jar
[ERROR] urls[3] = file:/home/oem/.m2/repository/org/apache/maven/archetype/archetype-common/3.0.1/archetype-common-3.0.1.jar
[ERROR] urls[4] = file:/home/oem/.m2/repository/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.jar
[ERROR] urls[5] = file:/home/oem/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.6/plexus-component-annotations-1.6.jar
[ERROR] urls[6] = file:/home/oem/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
[ERROR] urls[7] = file:/home/oem/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[ERROR] urls[8] = file:/home/oem/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar
[ERROR] urls[9] = file:/home/oem/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
[ERROR] urls[10] = file:/home/oem/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
[ERROR] urls[11] = file:/home/oem/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
[ERROR] urls[12] = file:/home/oem/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] urls[13] = file:/home/oem/.m2/repository/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
[ERROR] urls[14] = file:/home/oem/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar
[ERROR] urls[15] = file:/home/oem/.m2/repository/asm/asm/3.2/asm-3.2.jar
[ERROR] urls[16] = file:/home/oem/.m2/repository/asm/asm-commons/3.2/asm-commons-3.2.jar
[ERROR] urls[17] = file:/home/oem/.m2/repository/asm/asm-util/3.2/asm-util-3.2.jar
[ERROR] urls[18] = file:/home/oem/.m2/repository/asm/asm-analysis/3.2/asm-analysis-3.2.jar
[ERROR] urls[19] = file:/home/oem/.m2/repository/asm/asm-tree/3.2/asm-tree-3.2.jar
[ERROR] urls[20] = file:/home/oem/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar
[ERROR] urls[21] = file:/home/oem/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-6/plexus-interactivity-api-1.0-alpha-6.jar
[ERROR] urls[22] = file:/home/oem/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[23] = file:/home/oem/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[24] = file:/home/oem/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[25] = file:/home/oem/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[26] = file:/home/oem/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[27] = file:/home/oem/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[28] = file:/home/oem/.m2/repository/org/apache/maven/shared/maven-invoker/2.2/maven-invoker-2.2.jar
[ERROR] urls[29] = file:/home/oem/.m2/repository/org/apache/maven/shared/maven-artifact-transfer/0.9.0/maven-artifact-transfer-0.9.0.jar
[ERROR] urls[30] = file:/home/oem/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/3.0.0/maven-common-artifact-filters-3.0.0.jar
[ERROR] urls[31] = file:/home/oem/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.0.0/maven-shared-utils-3.0.0.jar
[ERROR] urls[32] = file:/home/oem/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[33] = file:/home/oem/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
[ERROR] urls[34] = file:/home/oem/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[35] = file:/home/oem/.m2/repository/org/apache/maven/shared/maven-script-interpreter/1.0/maven-script-interpreter-1.0.jar
[ERROR] urls[36] = file:/home/oem/.m2/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar
[ERROR] urls[37] = file:/home/oem/.m2/repository/org/apache/ant/ant/1.8.1/ant-1.8.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not “opens java.lang” to unnamed module @1753475d
[ERROR] → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoExecutionException - Apache Maven - Apache Software Foundation
oem@oem-GL72-6QD:~/pro$ java -version
java version “1.8.0_321”
Java™ SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot™ 64-Bit Server VM (build 25.321-b07, mixed mode)
oem@oem-GL72-6QD:~/pro$ mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 17.0.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-17-oracle
Default locale: en_US, platform encoding: UTF-8
OS name: “linux”, version: “5.11.0-43-generic”, arch: “amd64”, family: “unix”
oem@oem-GL72-6QD:~/pro$ atlas-mvn -version
Executing: /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4/bin/mvn -gs /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4/conf/settings.xml -version
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T00:33:14+06:00)
Maven home: /usr/share/atlassian-plugin-sdk-8.2.8/apache-maven-3.5.4
Java version: 17.0.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-17-oracle
Default locale: en_US, platform encoding: UTF-8
OS name: “linux”, version: “5.11.0-43-generic”, arch: “amd64”, family: “unix”
I’m bad at linux and I don’t know why
java version “1.8.0_321”
Java version: 17.0.1, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-17-oracle
but java 8 was installed later, initially there was only java 17, and there were the same errors.
Thank you for participating.

Hi @OlegOleg,

Can you post the output from the start of using atlas-create-jira-plugin? And also the output of

  • java -version
  • mvn -version
  • atlas-mvn -version

So we can try and reproduce this and see what’s happening?

Thanks,
James.

Hi, I changed my post to your request. Than you.

Hi @OlegOleg,

I have Java 1.8 and Java 11 and I can’t reproduce the issue. Looking at the first error

java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not “opens java.lang” to unnamed module @1753475d

I’d say the java 17 is enforcing the illegal access setting. Usually it’s just a warning in Java 11. You’re going to have to remove the Java 17 install to make things work. If this is your machine and you have root access there are a few options. I’m more familiar with Ubuntu, so you can try

update-java-alternatives --list

to see what is installed, and then set the default with the 1.8 version. For example, on my machine it’s

sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64

You will also need to check if you have JAVA_HOME set

echo $JAVA_HOME

and see if that’s set to Java 1.8 home, which is the same as the update-java-alternatives --list provided. If it’s different, it’s probably set in .bash_profile or similar.

After all this, it still doesn’t work, you could remove Java 17.

Regards,
James.

  • yes.

oem@oem-GL72-6QD:~$ update-java-alternatives --list
awk: cannot open /usr/lib/jvm/*.jinfo (No such file or directory)
jdk1.8.0_321 /usr/lib/jvm/jdk1.8.0_321

oem@oem-GL72-6QD:~$ echo $JAVA_HOME
/usr/lib/jvm/java-17-oracle

oem@oem-GL72-6QD:~$ sudo vi /etc/environment

PATH=“/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin”
JAVA_HOME=“/usr/lib/jvm/jdk1.8.0_321/bin/”
J2SDKDIR=“/usr/lib/jvm/jdk1.8.0_321”
J2REDIR=“/usr/lib/jvm/jdk1.8.0_321/jre”
DERBY_HOME=“/usr/lib/jvm/jdk1.8.0_321/db”

and i don’t have .bash_profile

For reasons unknown to me, the /etc/profile file lacked these lines at the end

    JAVA_HOME=/usr/lib/jvm/jdk1.7.0
    PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
    export JAVA_HOME
    export JRE_HOME
    export PATH

Hi @OlegOleg,

Okay, let’s clean some of this up so it’s more stable. I’d say you haven’t installed Java using apt so the environment is a little discombobulated.

I recommend restoring your /etc/profile back to the default to avoid issues on upgrade. You don’t have Java 1.7 installed, and shouldn’t be using it so please remove it and the other lines you added.

Same for /etc/environment. Remove the JAVA_HOME setting there as well.

Then create in your home directory the file .bash_aliases and into that have

JAVA_HOME=/usr/lib/jvm/jdk1.8.0_321 ; export JAVA_HOME

However …

If you want a really clean environment, and don’t require using Oracle Java and OpenJDK is good enough, then remove both Java 1.8 and Java 17, install open JDK with

sudo apt install openjdk-8-jdk

You’ll need to update the JAVA_HOME entry to the new location . update-java-alternatives --list should work correctly now and then provide the correct jvm to use.

James.

Hi James.
1.8 installed because it is indicated here Set up the Atlassian Plugin SDK and build a project.
Returned the /etc/profile to its original state and create .bash_aliases as you advised, thank you.

Hi @OlegOleg,

Okay, good to hear. Let me know if you come across any more issues.

Regards,
James.

I fell into the same black hole as newbie Atlassian developer. Solved the Java problem:
:/etc$ whereis jvm
jvm: /usr/lib/jvm
:/etc$ JAVA_HOME=/usr/lib/jvm
:/etc$ export JAVA_HOME
:/etc$ PATH=$JAVA_HOME/bin:$PATH
:/etc$ export PATH
:/etc$ echo $JAVA_HOME
/usr/lib/jvm
:/etc$

but now I can’t download Atlassian SDK on Ubuntu using this method:
https://developer.atlassian.com/server/framework/atlassian-sdk/downloads/

update:
Success! just make sure to type sudo su before download