807: does IDEA use a different launching mechanism?
I submitted a defect (http://www.intellij.net/tracker/idea/viewSCR?publicId=10739) about IDEA 807 not showing JFrames when using JDK 1.3.1.
I noticed that the "command line" in the Run window has changed from (in 804):
C:\jdk1.3.1_03\bin\javaw.exe -classpath C:\jdk1.3.1_03\jre\lib\rt.jar;C:\jdk1.3.1_03\lib\tools.jar;C:\My Documents\Temp\Idea\Project Dummy
to (in 807):
C:\jdk1.3.1_03\bin\java -Didea.launcher.port=7532 -Didea.path.bin=C:\IntelliJ-IDEA-807\bin -classpath C:\jdk1.3.1_03\jre\lib\rt.jar;C:\jdk1.3.1_03\lib\tools.jar;C:\My Documents\Temp\Idea\Project;C:\IntelliJ-IDEA-807\lib\idea_rt.jar;C:\IntelliJ-IDEA-807\lib\JNIWrap.jar com.intellij.rt.execution.application.AppMain Dummy
So, it would appear that IDEA has started using a different launching mechanism, whereby it's always an IDEA class which is actually passed to the JVM as the main class, and the user's main class is passed as a parameter.
This is arguably a bit dangerous, because your program (as demonstrated by my program) can execute differently in IDEA to how it would execute directly (e.g. from a batch file).
If IDEA is going to do this, then it must be guaranteed to be identical execution - even if you're doing bizarre things with classloaders, security etc. Or there must be an option to turn this off.
And, of course, this launching mechanism must work with all the target JVMs which IDEA supports...
Calum
Please sign in to leave a comment.
I'd like to have an option to choose between IDEA's "main-class-wrapper"
and the plain old java launcher - these tricks are dangerous ....
Edo
Do you experience any problems with out launcher?
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Calum MacLean" <jiveadmin@jetbrains.com> wrote in message
news:15062474.1048590992642.JavaMail.jrun@is.intellij.net...
(http://www.intellij.net/tracker/idea/viewSCR?publicId=10739) about IDEA 807
not showing JFrames when using JDK 1.3.1.
>
804):
>
C:\jdk1.3.1_03\jre\lib\rt.jar;C:\jdk1.3.1_03\lib\tools.jar;C:\My
Documents\Temp\Idea\Project Dummy
>
>
>
C:\jdk1.3.1_03\bin\java -Didea.launcher.port=7532 -Didea.path.bin=C:\Intelli
J-IDEA-807\bin -classpath
C:\jdk1.3.1_03\jre\lib\rt.jar;C:\jdk1.3.1_03\lib\tools.jar;C:\My
Documents\Temp\Idea\Project;C:\IntelliJ-IDEA-807\lib\idea_rt.jar;C:\IntelliJ
-IDEA-807\lib\JNIWrap.jar com.intellij.rt.execution.application.AppMain
Dummy
>
mechanism, whereby it's always an IDEA class which is actually passed to the
JVM as the main class, and the user's main class is passed as a parameter.
>
my program) can execute differently in IDEA to how it would execute directly
(e.g. from a batch file).
>
execution - even if you're doing bizarre things with classloaders, security
etc. Or there must be an option to turn this off.
>
JVMs which IDEA supports...
>
It worked fine in 804, which didn't use the launcher.
When I first saw the problem, it was launching one of our own applications, which launches fine from 804, 3.0, a batch file etc.
So it was definitely in 807 that it stopped working properly.
Please just submit description of your problem into the tracker. Even though
there is a new launcher in #807, your problem can be unrelated to it.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Calum MacLean" <jiveadmin@jetbrains.com> wrote in message
news:10334566.1048596876835.JavaMail.jrun@is.intellij.net...
>
applications, which launches fine from 804, 3.0, a batch file etc.
>
Already done:
http://www.intellij.net/tracker/idea/viewSCR?publicId=10739
I also just wanted to create a bit of discussion around it, as using a launcher instead of launching directly could be not what everyone wants, as another couple of postings have suggested.
Why should there be a discussion other than concerning
possible bugs in the launcher?
I assume that there will be no launcher bugs in the final
release, and that the launcher is completely transparent to
my app, so why should I care how Idea starts my app?
Stephen
because the launcher has it's own dependencies e.g. on loading kernel32.dll
that cause problems.
see http://www.intellij.net/tracker/idea/viewSCR?publicId=10795
kevin
"Stephen Kelvin" <mail@gremlin.info> wrote in message
news:2135767.1048666317502.JavaMail.jrun@is.intellij.net...
>
That's just a bug and it should be fixed. Thanks for submitting it.
--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Kevin O'Regan" <mailto:koregan@baltimore.com> wrote in message
news:b5ru0k$ppo$1@is.intellij.net...
kernel32.dll
>
>
>
>
>