JaroslavTulach: /* Jan 30, 2014 update */ - 2014-03-18 12:59:00

Jan 30, 2014 update

←Older revision Revision as of 12:59, 18 March 2014
Line 38: Line 38:
==== Jan 30, 2014 update ====
==== Jan 30, 2014 update ====
-
I've run into the same problem again after switching to new [[CentOS]] 6. This time it is amd64 bit [[Virtualization|virtualized]] environment and to make things worse, the 64-bit [[Java]] does not have the ''client'' mode anymore! Luckily the old ''i386'' version runs as well, so I had to install 32-bit [[Java]] and do the above trick with renaming server/client dirs. Now my [[hudson]] runs OK and whenever it spawns new processes they use the correct configured (by renaming directories) [[JDK]].
+
I've run into the same problem again after switching to new [[CentOS]] 6. This time it is amd64 bit [[Virtualization|virtualized]] environment and to make things worse, the 64-bit [[Java]] does not have the ''client'' mode anymore!
 +
 
 +
After a lot of work and reading through sources we found out there is an [[environment]] variable that [[Java]] honors:
 +
 
 +
Well, it is not documented, but there is:
 +
 
 +
<source lang="bash">
 +
_JAVA_OPTIONS="-Xmx64M -XX:MaxPermSize=32M"
 +
export _JAVA_OPTIONS
 +
</source>
Still I wonder. Am I really the only person on a planet to run into such issues?
Still I wonder. Am I really the only person on a planet to run into such issues?

JaroslavTulach: /* Jan 30, 2014 update */ - 2014-01-30 08:06:12

Jan 30, 2014 update

←Older revision Revision as of 08:06, 30 January 2014
Line 38: Line 38:
==== Jan 30, 2014 update ====
==== Jan 30, 2014 update ====
-
I've run into the same problem again after switching to new [[CentOS]] 6. This time it is amd64 bit [[Virtualization|virtualized]] environment and to make things worse, the 64-bit [[Java]] does not have the ''client'' mode anymore! Luckily the old ''i386'' version runs as well, so I had to install 32-bit [[Java]] and do the above trick with renaming server/client dirs. Now my [[hudson]] runs OK. Am I really the only person on a planet to run into such issues?
+
I've run into the same problem again after switching to new [[CentOS]] 6. This time it is amd64 bit [[Virtualization|virtualized]] environment and to make things worse, the 64-bit [[Java]] does not have the ''client'' mode anymore! Luckily the old ''i386'' version runs as well, so I had to install 32-bit [[Java]] and do the above trick with renaming server/client dirs. Now my [[hudson]] runs OK and whenever it spawns new processes they use the correct configured (by renaming directories) [[JDK]].
 +
 
 +
Still I wonder. Am I really the only person on a planet to run into such issues?

JaroslavTulach at 08:04, 30 January 2014 - 2014-01-30 08:04:23

←Older revision Revision as of 08:04, 30 January 2014
Line 1: Line 1:
[[wikipedia::OpenJDK|OpenJDK]] is a version of [[JDK]] released under [[GPL]] (with [[GNU Classpath]] exception) [[open source]] license. [[OpenJDK]] comes with various ''improvements'' over the classical [[Oracle]]'s [[JDK]] which often makes the [[OpenJDK]] much less usable than the original. One of the problems is the modified launcher parameters as described in [[Virtualization]] page. Instead of being helpful, it just makes the whole system unusable. However, at least the system starts.
[[wikipedia::OpenJDK|OpenJDK]] is a version of [[JDK]] released under [[GPL]] (with [[GNU Classpath]] exception) [[open source]] license. [[OpenJDK]] comes with various ''improvements'' over the classical [[Oracle]]'s [[JDK]] which often makes the [[OpenJDK]] much less usable than the original. One of the problems is the modified launcher parameters as described in [[Virtualization]] page. Instead of being helpful, it just makes the whole system unusable. However, at least the system starts.
-
For a while I've been struggling with [[Java]] on my hosted [[Linux]] (Cent OS). Whenever I tried:
+
For a while I've been struggling with [[Java]] on my hosted [[Linux]] (running [[CentOS]]). Whenever I tried:
<source lang="bash">
<source lang="bash">
Line 19: Line 19:
(to execute a jar file)
(to execute a jar file)
</source>
</source>
 +
 +
==== Global Configuration ====
The question however is: How to modify each [[JDK]] utility ('''jar''', '''javac''', '''javadoc''', etc.) to use this changed setting? Usual [[Unix]] style is to locate ''/etc/java.conf'' and tweak it. But of course [[Java]] has multiplatform, not [[Unix]] roots, so no such configuration file exists, as far as I can tell. I thought configuring the default options for all [[Java]] processes is impossible. However today I realized that
The question however is: How to modify each [[JDK]] utility ('''jar''', '''javac''', '''javadoc''', etc.) to use this changed setting? Usual [[Unix]] style is to locate ''/etc/java.conf'' and tweak it. But of course [[Java]] has multiplatform, not [[Unix]] roots, so no such configuration file exists, as far as I can tell. I thought configuring the default options for all [[Java]] processes is impossible. However today I realized that

JaroslavTulach: /* Jan 30, 2014 update */ - 2014-01-30 07:56:56

Jan 30, 2014 update

←Older revision Revision as of 07:56, 30 January 2014
Line 36: Line 36:
==== Jan 30, 2014 update ====
==== Jan 30, 2014 update ====
-
I've run into the same problem again after switching to new [[CentOS]] 6. This time it is amd64 bit [[Virtualization|virtualized]] environment and to make things worse, the 64-bit [[Java]] does not have the ''client'' mode anymore! Luckily the old ''i386'' version runs as well, so I had to install 32-bit [[Java]] and do the above trick with renaming server/client dirs. Now my [[hudson]] runs OK. Am I really the only person on a planet to run into such issues?
+
I've run into the same problem again after switching to new [[CentOS]] 6. This time it is amd64 bit [[Virtualization|virtualized]] environment and to make things worse, the 64-bit [[Java]] does not have the ''client'' mode anymore! Luckily the old ''i386'' version runs as well, so I had to install 32-bit [[Java]] and do the above trick with renaming server/client dirs. Now my [[hudson]] runs OK. Am I really the only person on a planet to run into such issues?

JaroslavTulach at 07:56, 30 January 2014 - 2014-01-30 07:56:44

←Older revision Revision as of 07:56, 30 January 2014
Line 33: Line 33:
Btw. this shows that [[FilesLayout|location of your files on disk]] is an important [[APITypes|type of API]] which can compensate missing presence of a configuration file.
Btw. this shows that [[FilesLayout|location of your files on disk]] is an important [[APITypes|type of API]] which can compensate missing presence of a configuration file.
 +
 +
==== Jan 30, 2014 update ====
 +
 +
I've run into the same problem again after switching to new [[CentOS]] 6. This time it is amd64 bit [[Virtualization|virtualized]] environment and to make things worse, the 64-bit [[Java]] does not have the ''client'' mode anymore! Luckily the old ''i386'' version runs as well, so I had to install 32-bit [[Java]] and do the above trick with renaming server/client dirs. Now my [[hudson]] runs OK. Am I really the only person on a planet to run into such issues?

JaroslavTulach at 18:41, 8 May 2012 - 2012-05-08 18:41:35

←Older revision Revision as of 18:41, 8 May 2012
Line 1: Line 1:
-
[[wikipedia::OpenJDK|OpenJDK]] is a version of [[JDK]] released under [[GPL]] (with exceptions) open source license. [[OpenJDK]] comes with various ''improvements'' over the classical [[Oracle]]'s [[JDK]] which often makes the [[OpenJDK]] much less usable than the original. One of the problems is the modified launcher parameters as described in [[Virtualization]] page. Instead of being helpful, it just makes the whole system unusable. However, at least the system starts.
+
[[wikipedia::OpenJDK|OpenJDK]] is a version of [[JDK]] released under [[GPL]] (with [[GNU Classpath]] exception) [[open source]] license. [[OpenJDK]] comes with various ''improvements'' over the classical [[Oracle]]'s [[JDK]] which often makes the [[OpenJDK]] much less usable than the original. One of the problems is the modified launcher parameters as described in [[Virtualization]] page. Instead of being helpful, it just makes the whole system unusable. However, at least the system starts.
For a while I've been struggling with [[Java]] on my hosted [[Linux]] (Cent OS). Whenever I tried:
For a while I've been struggling with [[Java]] on my hosted [[Linux]] (Cent OS). Whenever I tried:

JaroslavTulach at 06:05, 29 November 2010 - 2010-11-29 06:05:19

←Older revision Revision as of 06:05, 29 November 2010
Line 32: Line 32:
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
-
Btw. this shows that location of your files on disk is an important [[APITypes|type of API]] which can compensate missing presence of a configuration file.
+
Btw. this shows that [[FilesLayout|location of your files on disk]] is an important [[APITypes|type of API]] which can compensate missing presence of a configuration file.

JaroslavTulach at 09:16, 28 November 2010 - 2010-11-28 09:16:11

←Older revision Revision as of 09:16, 28 November 2010
Line 32: Line 32:
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
-
Btw. this shows that location of your files on disk is an important [[APITypes|type of API]] which can compensate the missing existence of a configuration file.
+
Btw. this shows that location of your files on disk is an important [[APITypes|type of API]] which can compensate missing presence of a configuration file.

JaroslavTulach at 09:15, 28 November 2010 - 2010-11-28 09:15:43

←Older revision Revision as of 09:15, 28 November 2010
Line 20: Line 20:
</source>
</source>
-
The question however is: How to modify each [[JDK]] utility ('''jar''', '''javac''', '''javadoc''', etc.) to use this changed setting? Usual [[Unix]] style is to locate ''/etc/java.conf'' and tweak it. But of course [[Java]] is multiplatform, so no such configuration file exists, as far as I can tell. Thus I thought configuring the default options for all [[Java]] processes is impossible. However today I realized that
+
The question however is: How to modify each [[JDK]] utility ('''jar''', '''javac''', '''javadoc''', etc.) to use this changed setting? Usual [[Unix]] style is to locate ''/etc/java.conf'' and tweak it. But of course [[Java]] has multiplatform, not [[Unix]] roots, so no such configuration file exists, as far as I can tell. I thought configuring the default options for all [[Java]] processes is impossible. However today I realized that
<source lang="bash">
<source lang="bash">
$ java -client
$ java -client
Line 32: Line 32:
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
-
Btw. this shows that location of your files on disk is an important [[APITypes|type of API]]!
+
Btw. this shows that location of your files on disk is an important [[APITypes|type of API]] which can compensate the missing existence of a configuration file.

JaroslavTulach at 09:04, 28 November 2010 - 2010-11-28 09:04:23

←Older revision Revision as of 09:04, 28 November 2010
Line 26: Line 26:
works too fine as well. From that moment it was just a small step to symlink the server directory inside the [[JDK]] installation to client:
works too fine as well. From that moment it was just a small step to symlink the server directory inside the [[JDK]] installation to client:
<source lang="bash">
<source lang="bash">
-
# cd jre/lib/i386/
+
$ cd jre/lib/i386/
-
# mv server/ server.bak/
+
$ mv server/ server.bak/
-
# ln -s client server
+
$ ln -s client server
</source>
</source>
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
Now I can use all the [[JDK]] functionality without problems. However it took me a while to get there. No surprise nobody offers [[Java]] in [[Virtualization|virtualized]] environments, when it is so hard to set it up (and [[PHP]] is instantly ready).
Btw. this shows that location of your files on disk is an important [[APITypes|type of API]]!
Btw. this shows that location of your files on disk is an important [[APITypes|type of API]]!