• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

different Javas in parallel on my computer

 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good morning from Germany,

I'm having differnt Javas (some JDKs, one JRE) on my computer and am having problems adressing the right one.

I have a JRE at c:/programs/java, and a JDK at d:/java. My JAVA_HOME and PATH variables are set to d:/java/bin. I double checked that. The JRE is properly installed and as such in the list under system/software.

I'm using RMI, and suddenly discovered that it's pretty important to know which java.policy file is used ;-) I want to use the JDK specified in my JAVA_HOME.

In the -verbose mode, I discovered that RMIC uses classes from the JRE. I don't want this to happen, obviously. Additionaly, I renamed c/programs/java, and RMIC came up with "cannot find vm.cfg under c:/...). Then I explicitly started the RMIC in my JAVA_HOME, with the same error.

My interpretation: Even the correct RMIC.exe tries to get it's vm.cfg LOCATION from a place which is not configurated in the way I need it...

Does anyone have an idea to help me? De-installing the JRE doesn't seem appropriate to me, as IMHO different JRE and JDK versions should be able to exist on the same machine.

Many thanks,
Jan

ps: Even though I discovered this problem in an RMI context, I think that it's a general Java problem, and therefor posted it in Java in General (intermediate).
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
after having discussed this issue with some colleagues, I decided to re-install the JDK.

It seems that the JRE on my machine was the last one installed, so that some registry entries point on it, no matter what JAVA_HOME is set...

If this did not help, I'll be back here :-)

Jan
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I know, JAVA_HOME is supposed to point to the directory where Java is installed, not the bin directory under that. Perhaps changing Java home to "d:\java" will also fix the problem. PATH on the other hand needs to include "d:\java\bin" because that is where all the .exe files are located that you need for development from the command-line.

HTH

Layne
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello Layne,

you were right, java_home is not supposed to point to a /bin directory. however, it did not change very much ;-)

right now i'm installing a fresh jdk...

jan
 
reply
    Bookmark Topic Watch Topic
  • New Topic