Issue
I just get started to use a MacBook Pro Mid 2012 Release
and trying to develop with IntelliJ
. I use Tomcat 8
server for the deployment.
src="https://i.stack.imgur.com/TT9rQ.png" alt="enter image description here">
While I run the Tomcat
, I get the following,
This 1099 comes from the JMX port
in Run -> Edit Configurations
. However, if I changed it to other port (say, 1098)
doesn't help either.
I had this info as the output
,
/Applications/Tomcat-8.5.15/bin/catalina.sh run
/Applications/Tomcat-8.5.15/bin/catalina.sh: line 366: /Applications/IntelliJ IDEA.app/Contents/bin/java: No such file or directory
Disconnected from server
/Applications/Tomcat-8.5.15/bin/catalina.sh: line 366: exec: /Applications/IntelliJ IDEA.app/Contents/bin/java: cannot execute: No such file or directory
Java related info,
$ which java
/usr/bin/java
$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
Project SDK
was provided IntelliJ IDEA IU-171.4694.23
, but, tried with the 1.8
as well. No success with both of the SDK
s.
I TOOK TO FOLLOWING STEPS SO FAR WITH NO SUCCESS, —————————————————————————————
- Provided the permission to run
catalina.sh
,
Initially, I didn't have the permission to run the Tomcat
and compiled the catalina.sh
after entering the /bin
folder inside the Tomcat
directory with the command,
$ chmod a+x catalina.sh
- Appended the
hostname
in the/etc/hosts
file,
I get the hostname from the terminal
,
$ hostname
macbook-pro
/etc/hosts
returns the following (Sublime)
,
$ subl /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
Inserted the macbook-pro
information with the localhost,
127.0.0.1 localhost macbook-pro
Tried to kill the process (which I had success with
MacBook Air
earlier),$ ps -A | grep intellij
$ ps -A | grep 1099
Every time get the different process info and could not kill
the process.
What to do to solve the issue?
Update
I created a new project with the IntelliJ
and now it runs fine with Tomcat
. The previous project along with the IdeaProjects
directory was imported from the other MacBook Air
and pasted in the base
directory. Though, I'm still unable to understand why that would be an issue.
My project is so far small (LOC < 1000 with 7 sources .java
file). So, I'm manually creating the files and pasting the code inside from the main project. I will up for the REAL
solution though.
Solution
I was also facing similar issue, For me the issue was related to invalid VM Options configuration in Intellij In Intellij Click on Run > Edit Configuration Server Tab You will notice VM Options My VM Options were -Dflyway.enabled=false -Dquratz.cron=0 0 2 1/1 * ?
When I removed -Dquratz.cron=0 0 2 1/1 * ? Intellij started the server again and the above issue was resolved , Looks like you cannot pass special characthers in VM Options
Answered By - Datta
Answer Checked By - Robin (JavaFixing Admin)