OSX + intellij + 1.4.1 compile issue. Works in command line

When trying to compile using intellij and 1.4.1 as a target i get

HotSpot not at correct Virtual address. Sharing disabled
Exception in thread "main" java.lang.ClassNotFoundException -verbose
at java.lang.Class.forName0(Native Method)
at java.lang.Class.ForName(Class.java:140)
at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:24)
Error:The compiler did not terminate normall. Exit code is 1

The code will compile and run outside of intellij using 1.4.1 or using intellij at jdk 1.3.1


anyone know how to fix this

0
Avatar
Permanently deleted user

Here is what the command line looks like


/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home/bin/javac Test.java
HotSpot not at correct virtual address. Sharing disabled.


then back to command prompt

0
Avatar
Permanently deleted user

In article <1716667.1042514807556.JavaMail.jrun@is.intellij.net>,
charles decroes <spam@decroes.com> wrote:

When trying to compile using intellij and 1.4.1 as a target i get

HotSpot not at correct Virtual address. Sharing disabled
Exception in thread "main" java.lang.ClassNotFoundException -verbose

>...

anyone know how to fix this


I had exactly this problem when I first tried IDEA 3.0. I wish I could
say what fixed it, but I can't. I re-installed a couple times, and
tried different ways of telling it about my 1.4.1 JVM, and one of those
things must have worked, because now I'm compiling fine.

dylan

0
Avatar
Permanently deleted user

Yep, we here also cannot reproduce the problem - everything compiles ok on our Mac.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


"Dylan McNamee" <dylan@truedisk.com> wrote in message news:dylan-A7265E.11463214012003@news.intellij.net...

In article <1716667.1042514807556.JavaMail.jrun@is.intellij.net>,
charles decroes <spam@decroes.com> wrote:

>

When trying to compile using intellij and 1.4.1 as a target i get

>

HotSpot not at correct Virtual address. Sharing disabled
Exception in thread "main" java.lang.ClassNotFoundException -verbose

>...

anyone know how to fix this

>

I had exactly this problem when I first tried IDEA 3.0. I wish I could
say what fixed it, but I can't. I re-installed a couple times, and
tried different ways of telling it about my 1.4.1 JVM, and one of those
things must have worked, because now I'm compiling fine.

>

dylan



0
Avatar
Permanently deleted user

well if two of us have had the same problem then there is something wrong. everything compiles fine from the command line so it's definatly an idea problem. it looks like idea is having trouble finding a class that it's using for the compiler

0
Avatar
Permanently deleted user

please post line 24 of file

com.intellij.rt.compiler.JavacRunner.main

that is where the problem is and if i can see what class.forname it's doing it may help me identify the problem

0
Avatar
Permanently deleted user

This is a Class.forName() call: for 1.3.x and 1.4.x the JavacRunner loads "com.sun.tools.javac.Main" and for other jdk versions
"sun.tools.javac.Main".

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


"charles decroes" <spam@decroes.com> wrote in message news:1440923.1042629511001.JavaMail.jrun@is.intellij.net...

please post line 24 of file

>

com.intellij.rt.compiler.JavacRunner.main

>

that is where the problem is and if i can see what class.forname it's doing it may help me identify the problem



0
Avatar
Permanently deleted user

I've had this issue crop up on me as well. I don't really know how it comes about, but I know that when I was using #691, after a few crashes (there was a bug already filed about arrow key movement which always caused a crash), I would get this same error.

The only thing that fixed the problem was re-installing DP8. Not an ideal solution, but it worked.

0
Avatar
Permanently deleted user

i reinstalled dp8 and the developer tools and it still didn't work. I may try again :(

0
Avatar
Permanently deleted user

I added in the classes directory the jar file classes.jar which contains sun.tools.javac.Main since it was looking for that and it was not already added. this did not work

0
Avatar
Permanently deleted user

Could anyone explain what is "Sharing" in the error message and how this feature works?

"System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home/bin/javac Test.java
HotSpot not at correct virtual address. Sharing disabled."

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


"charles decroes" <spam@decroes.com> wrote in message news:7460191.1042689879322.JavaMail.jrun@is.intellij.net...

I added in the classes directory the jar file classes.jar which contains sun.tools.javac.Main since it was looking for that and it

was not already added. this did not work


0

Yes, the OSX JVM loads certain classes once (bootstrap one), if the default bootstrap path isn't modified. This is so that consecutive JVM launches are much faster since most of the core classes are in a cache of some sort.

The message shows up when running OSX 10.2.3 with DP8 due to 10.2.3 upgrading a library that the JVM uses, so the JVM detects that it's bootpath is altered from what it expects, and so disabled sharing. This is address in the next DP apparently (due out Real Soon Now, I'd imagine).

0
Avatar
Permanently deleted user

Since I run into the issue with 10.2.3/DP8 and #691 I switched to loglevel DEBUG and checked with 1.3.1 and 1.4.1.

Somehow the Hotspot message prohibits a proper javac call. Whenever I add the JDK as target JDK the Hotspot message will be used as JDK name (instead of jdk x.x.x). Also, MacOS X does not have a tools.jar, the compiler classes should be in classes.jar.

2003-01-22 03:20:27,261 DEBUG - ntellij.compiler.impl.Compiler - /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Home/bin/java -Xmx128m -cls.jar:/Applications/IntelliJ-IDEA-3.0.1/lib/idea_rt.jar com.intellij.rt.compiler.JavacRunner "java version "1.3.1"" com.sun.tools.javac.Main -verbose -classpath ...

2003-01-22 03:17:00,894 DEBUG - ntellij.compiler.impl.Compiler - /System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home/bin/java -Xmx128m -classpath /System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home/lib/tools.jar:/Applications/IntelliJ-IDEA-3.0.1/lib/idea_rt.jar com.intellij.rt.compiler.JavacRunner "HotSpot not at correct virtual address. Sharing disabled." -verbose -classpath ...

0
Avatar
Permanently deleted user

I get the error message as my compiler version also, but once I moved the classes.jar as described above everything compiles fine.

0
Avatar
Permanently deleted user

This is solved in DP9

0

请先登录再写评论。