How to execute JMXterm with inline script using -cp? - jboss

In a batch file I want to use jmxterm to access jboss mbeans.
Therefore I need to include jboss-eap-6.1\bin\client\jboss-client.jar to the classpath.
So I need to call jmxterm that way to get it to work:
java -cp
.;%JBOSSDIR%/bin/client/jboss-client.jar;jmxterm-1.0-alpha-4-uber.jar
org.codehaus.classworlds.uberjar.boot.Bootstrapper --url
service:jmx:remoting-jmx://localhost:9999
The problem: I need to pass an argument to the MBean method I want to call. So I only see the option to pass the script inline but don't know how to do that.
I found that it should work by piping the jmxterm command to the jmxterm call. Adapted to my case (using -cp instead of -jar) it doesn't work:
echo "bean run " | java -cp
.;%JBOSSDIR%/bin/client/jboss-client.jar;jmxterm-1.0-alpha-4-uber.jar
org.codehaus.classworlds.uberjar.boot.Bootstrapper --url
service:jmx:remoting-jmx://localhost:9999 -n
I get the following output:
Feb 04, 2015 3:26:00 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA-redhat-1
Feb 04, 2015 3:26:00 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA-redhat-1
Feb 04, 2015 3:26:00 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.16.GA-redhat-1
Welcome to JMX terminal. Type "help" for available commands.
#IllegalArgumentException: Command "bean isn't valid, run help to see available commands
Passing the script as file works but I need to pass the script inline to pass parameters to the mbean method calls.
Any ideas?

I'm not sure if this is what you mean with pass the script as file, but you can give all the execution information as a file in the call:
java -cp .;%JBOSSDIR%/bin/client/jboss-client.jar;jmxterm-1.0-alpha-4-uber.jar
org.codehaus.classworlds.uberjar.boot.Bootstrapper -v silent -n < commands.txt
And then having a commands.txt as this:
open -u service:jmx:remoting-jmx://localhost:9999
run -b com.your.package:type=BeanName methodName parameter1
close

Related

Converting .osm.pbf to .osm

I am trying to convert a .osm.pbf file to a .osm file.
https://wiki.openstreetmap.org/wiki/Osmosis/Quick_Install_(Windows)
I followed the instructions here:
Installed Java Runtime
Downloaded osmosis and extracted it to a directory
Created a bat file containing "C:\Users\paul\Desktop\osmosis\bin\osmosis.bat"
In a dos command prompt when im in the directory of where the batch file I created is located I try:
osmosis --read-pbf c:\dir\somefile.osm.pbf --write-xml c:\dir\somefile.osm
It just runs really quickly and doesnt convert the file and gives this output:
Nov 24, 2021 4:40:20 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.48.3
Nov 24, 2021 4:40:22 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Nov 24, 2021 4:40:22 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Nov 24, 2021 4:40:22 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Nov 24, 2021 4:40:22 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
Nov 24, 2021 4:40:22 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 2297 milliseconds.
Some sources provide a .osm.bz2 or .osm.zip format which uses standard compression. You can use a program like 7zip to covert those files to a raw .osm file. This format is the easiest to convert to a raw .osm.
However if you need to convert a binary .pbf to a raw .osm I would recommend the tool OSM Convert. Download the large file support version. Unfortunately Osmosis has been unmaintained since September 2018, so try to use newer tools. There is a list of them kept here on the OpenStreetMap Wiki.
With OSM Convert I've used this command with success on Windows 10: osmconvert us-latest.osm.pbf --out-osm -o=us-latest.osm_01.osm to convert us-latest.osm.pbf to us-latest.osm_01.osm

Perl 5.26 on RHEL 7 error - cgi-error - libperl.so.rh-perl526-5.26: cannot open shared object file

I am attempting to run perl CGI script on RHEL 7, i've used yum installer and it's successfully installed 5.26, i can run perl programs from terminal without problem, but when i run a simple CGI script it writes error to httpd/error.log. I've posted the exact error below.
enabled software collection
$scl enable rh-perl526 bash
perl -v
This is perl 5, version 26, subversion 3 (v5.26.3) built for x86_64-linux-thread-multi
(with 27 registered patches, see perl -V for more detail)
$which perl
/opt/rh/rh-perl526/root/usr/bin/perl
$perl -e 'print "Hello Perl\n"'
Hello Perl
When i run a simple CGI script from browser or curl -XGET, i got 500 internal server for
http://serverip/cgi-bin/test-cgi.pl
apache error
[Wed Mar 24 21:24:38.308033 2021] [cgi:error] [pid 9437] [client x.x.x.x:35220] AH01215: /opt/rh/rh-perl526/root/usr/bin/perl: error while loading shared libraries: libperl.so.rh-perl526-5.26: cannot open shared object file: No such file or directory
[Wed Mar 24 21:24:38.308245 2021] [cgi:error] [pid 9437] [client x.x.x.x:35220] End of script output before headers: test.cgi.pl
I've added libperl.so path to LD_LIBRARY_PATH variable in .bashrc and i've rh-perl526-perl-libs.x86_64 package installed.
While installing rh-perl526, i noticed it also installed default perl on system as well due to YUM dependency
any idea how to fix this issue ?
LD_LIBRARY_PATH needs to set in apache http.conf file
i have added below line in httpd.conf and it worked
SetEnv LD_LIBRARY_PATH /path/to/libperl
I also removed perl 5.16 from system using yum.

Installanywhere Openjdk 1.7.0_111

i have a problem.
i'm using installanywhere for some product. (installanywhere 2014 SP1)
setting installanywhere option,
Product > JVM Settings > VM valid List : JDK_1.7+, IBM_JDK_1.7+
this option installer choose openjdk.
i'm success install in openjdk 1.7.0_65, redhat 6.x 64bit os.
but install failed in openjdk 1.7.0_111, redbat 6.x 64bit os.
error message -
===============================================================================
This Test installer (created with InstallAnywhere)
-------------------------------------------------------------------------------
Preparing CONSOLE Mode Installation...
This installer was created with an unlicensed version
of InstallAnywhere. The evaluation period has expired.
Please contact sales#flexerasoftware.com about licensing.
so, commanding [export LAX_DEBUG=true] and install.
under line debug message.
Preparing to install...
Checking for POSIX df.
Found POSIX df.
Checking tail options...
Using tail -n 1.
True location of the self extractor: /opt/Test/Test_Setup_RedHat.bin
Forcing install base (including tmp dir) to: /opt/Test/tmp
Creating installer data directory: /opt/Test/tmp/install.dir.27084
Creating installer data directory: /opt/Test/tmp/install.dir.27084/InstallerData
Gathering free-space information...
Space needed to complete the self-extraction: 16376 blocks
Available space: 242730896 blocks
Available blocks: 242730896 Needed blocks: 16376 (block = 512 bytes)
This installation does not contain a VM.
Extracting the installation resources from the installer archive...
Extracting install.zip from ./Test_Setup_RedHat.bin to /opt/Test/tmp/install.dir.27084/InstallerData/installer.zip ...
Extracting to padded done, exit code = 0
Extracting from padded to zip done, exit code = 0
Creating disk1 data directory: /opt/Test/tmp/install.dir.27084/InstallerData/Disk1
Creating instdata data directory: /opt/Test/tmp/install.dir.27084/InstallerData/Disk1/InstData
Extracting resources from ./Test_Setup_RedHat.bin to /opt/Test/tmp/install.dir.27084/InstallerData/Disk1/InstData/Resource1.zip ...
Extracting done, exit code = 0
Configuring the installer for this system's environment...
[7m========= Analyzing UNIX Environment =================================[0m
Setting UNIX (linux) flavor specifics.
Importing UNIX environment into LAX properties.
Checking for POSIX awk.
[7m========= Analyzing LAX ==============================================[0m
LAX found............................ OK.
LAX properties read.................. OK.
[7m========= Finding VM =================================================[0m
[1mValid VM types.......................... JDK_1.7+, IBM_JDK_1.7+[0m
[1mExpanded Valid VM types................. JDK_1.7+, IBM_JDK_1.7+ [0m
Found jvmspecs.properties
JVM Spec Build Option Specified Without VM
Searching without JVM specs
Searching without JVM specs
[1mWARNING! No valid lax.nl.current.vm available.[0m
/usr/xpg4/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/cfengine/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
[1mSearching for VMs in PATH:[0m
Looking in:............................. /usr/xpg4/bin
Looking in:............................. /usr/local/bin
Looking in:............................. /bin
Looking in:............................. /usr/bin
Found VM:............................. /usr/bin/java
Version:............................. 1.7.0_111
Looking in:............................. /usr/local/sbin
Looking in:............................. /usr/sbin
Looking in:............................. /sbin
Looking in:............................. /var/cfengine/bin
Looking in:............................. /bin
Looking in:............................. /usr/bin
Found VM:............................. /usr/bin/java
Version:............................. 1.7.0_111
Looking in:............................. /sbin
Looking in:............................. /usr/sbin
Looking in:............................. /usr/local/bin
checking: "1.7.0_111" against "JDK_1.7+,": failed (wrong version)
checking: "1.7.0_111" against "JDK_1.7+,": failed (wrong version)
checking: "1.7.0_111" against "IBM_JDK_1.7+": passed
[1m Using VM:............................. /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java[0m
[7m========= Virtual Machine Options ====================================[0m
LAX properties incorporated............. OK.
classpath............................... "/opt/Test/tmp/install.dir.27084/InstallerData:/opt/Test/tmp/install.dir.27084/InstallerData/installer.zip"
main class.............................. "com.zerog.ia.installer.Main"
.lax file path.......................... "/opt/Test/tmp/install.dir.27084/temp.lax"
user directory.......................... "/opt/Test/tmp/install.dir.27084"
stdout to............................... "console"
sterr to................................ "console"
install directory....................... ""
JIT..................................... none
option (verify)......................... off
option (verbosity)...................... none
option (garbage collection extent)...... none
option (garbage collection thread)...... none
option (native stack max size).......... none
option (java stack max size)............ none
option (java heap max size)............. 50331648
option (java heap initial size)......... 16777216
option (lax.nl.java.option.additional).. none
[7m========= Display settings ===========================================[0m
X display............................... not set
[1mWARNING: This shell's DISPLAY variable has not been set.
This installer is configured to run in GUI and will probably
fail. Try running this installer in console or silent mode,
or on another UNIX host which has the DISPLAY variable set,
if the installer unexpectedly fails.[0m
UI mode................................. gui
Launching installer...
[7m========= VM Command Line ============================================[0m
[1moptions:[0m
[7mCLASSPATH:[0m/opt/Test/tmp/install.dir.27084/InstallerData:/opt/Test/tmp/install.dir.27084/InstallerData/installer.zip:
[7m========= Forking JAVA =============================================[0m
OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:
27084
Try using the -Djava.io.tmpdir= option to select an alternate temp location.
===============================================================================
This Test installer (created with InstallAnywhere)
-------------------------------------------------------------------------------
Preparing CONSOLE Mode Installation...
This installer was created with an unlicensed version
of InstallAnywhere. The evaluation period has expired.
Please contact sales#flexerasoftware.com about licensing.
what should i do? success running open jdk 1.7.0_65, but open jdk 1.7.0_111 failed.
CentOS 6.2 and OpenJDK1.7.0_111 running success.

JMeter Command Line Output

I'm running a JMeter test plan from command line and it's currently outputting something along the lines of:
Created the tree successfully using C:\*****\TestPlan.jmx
Starting the test # Thu Oct 11 10:20:43 EDT 2012 (1349965243947)
Waiting for possible shutdown message on port 4445
Tidying up ... # Thu Oct 11 10:20:46 EDT 2012 (1349965246384)
... end of run
Is there any way to turn off this output and have the plan execute 'silently'?
Found a way to do this, by following this article http://www.robvanderwoude.com/battech_redirection.php
and appending > NUL to the command
jmeter -n -t C:\***\TestPlan.jmx -Jhostname=%1 > NUL

Garbage in Eclipse console log

I have a problem with logs display in my eclipse console. The japanese characters displayed in starting and stopping the weblogic server are garbage. There is no problem however with the logs written by the application. I am using log4j.
Log4j.properties
# Log4JLogger\u521d\u671f\u5316\u30d1\u30e9\u30e1\u30bf\u8a2d\u5b9a
# \u30ed\u30b0\u30ec\u30d9\u30eb\u3001\u30a2\u30da\u30f3\u30c0\u540d\u8a2d\u5b9a
log4j.rootCategory=INFO, consoleLog, consolefileLog
# \u30ed\u30b0\u30ec\u30d9\u30eb\u306e\u8a73\u7d30\u8a2d\u5b9a
log4j.category.jp.terasoluna=DEBUG
log4j.category.org.springframework=INFO
log4j.category.org.apache.struts=INFO
log4j.category.com.ibatis=DEBUG
log4j.category.java.sql=DEBUG
# This is the category for operations Logger class
# Do not change unless you know exactly what you are doing
#log4j.category.jp.co.anicom.fw.common.log.Logger=DEBUG, fileLog
log4j.category.opLog=DEBUG, fileLog
# \u30b3\u30f3\u30bd\u30fc\u30eb\u30a2\u30da\u30f3\u30c0\u8a2d\u5b9a
log4j.appender.consoleLog=org.apache.log4j.ConsoleAppender
log4j.appender.consoleLog.Target = System.out
log4j.appender.consoleLog.layout = org.apache.log4j.PatternLayout
log4j.appender.consoleLog.layout.ConversionPattern=[%d{yyyy/MM/dd HH:mm:ss}][%p][%C{1}] %m%n
#log4j.appender.consoleLog.encoding=UTF-8
log4j.appender.consolefileLog=org.apache.log4j.FileAppender
log4j.appender.consolefileLog.File = anicomConsole.log
log4j.appender.consolefileLog.layout = org.apache.log4j.PatternLayout
log4j.appender.consolefileLog.layout.ConversionPattern=[%d] %m%n
log4j.appender.consolefileLog.encoding=UTF-8
# \u30d5\u30a1\u30a4\u30eb\u30a2\u30da\u30f3\u30c0\u8a2d\u5b9a
log4j.appender.fileLog=org.apache.log4j.FileAppender
log4j.appender.fileLog.File = anicomOp.log
log4j.appender.fileLog.layout = org.apache.log4j.PatternLayout
log4j.appender.fileLog.layout.ConversionPattern=[%d] %m%n
log4j.appender.fileLog.encoding=UTF-8
# Global logging configuration
log4j.logger.com.ibatis=DEBUG
# shows SQL of prepared statements
log4j.logger.java.sql=DEBUG
log4j.logger.java.sql.Connection=DEBUG
# shows parameters inserted into prepared statements
log4j.logger.java.sql.PreparedStatement=DEBUG
# shows query results
log4j.logger.java.sql.ResultSet=DEBUG
log4j.logger.java.sql.Statement=DEBUG
=================================================================================
I also have these in my eclipse console. As you can see it displays garbage
CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;C:\Oracle\MIDDLE~1\utils\config\10.3.1.0\config-launch.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar
.
PATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;C:\Oracle\MIDDLE~1\JDK160~1\jre\bin;C:\Oracle\MIDDLE~1\JDK160~1\bin;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\app\em.alcuizar\product\11.1.0\client_2\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\app\em.alcuizar\product\11.1.0\db_1\bin;C:\product\11.1.0\client_1;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jre6\bin;D:\Data\Installers\Java\oepe-ganymede-all-in-one-11.1.1.3.0.200910091510-win32\eclipse\plugins\org.apache.ant_1.7.0.v200803061910\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
.
To start WebLogic Server, use a username and *
password assigned to an admin-level user. For *
server administration, use the WebLogic Server *
console at http:\hostname:port\console *
starting weblogic with Java version:
Listening for transport dt_socket at address: 8453
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode)
Starting WLS with line:
C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Xverify:none -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sysext_manifest_classpath weblogic.Server
Listening for transport dt_socket at address: 8453
<2010/11/03 15��12��30�b SGT> <���̊g���q�f�B���N�g���̓��e���N���X�p�X�̌��ɒlj�����܂��� :
C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_TW.jar>
<2010/11/03 15��12��30�b SGT>
<2010/11/03 15��12��31�b SGT> <�o�[�W����: WebLogic Server 10.3.1.0 Wed Jun 10 22:24:41 MDT 2009 1227385 >
<2010/11/03 15��12��33�b SGT> <�T�[�o��Ԃ� STARTING �ɕω����܂����B>
<2010/11/03 15��12��33�b SGT> <�����`���[�j���O �X���b�h �v�[���������Ă��܂��B>
<2010/11/03 15��12��33�b SGT> <���O �t�#�C�� C:\Oracle\Middleware\user_projects\domains\teraproto\servers\AdminServer\logs\AdminServer.log �̓��[�e�[�V��������܂��B��������~�����ꍇ�́A���O �t�#�C�����ăI�[�v�����Ă��������B����́AWindows �ȂLjꕔ�̃v���b�g�t�H�[���ŋN����\��������܂��B>
<2010/11/03 15��12��33�b SGT> <���O �t�#�C���� C:\Oracle\Middleware\user_projects\domains\teraproto\servers\AdminServer\logs\AdminServer.log01940 �܂Ń��[�e�[�V��������܂����B���O ���b�Z�[�W�͈��� C:\Oracle\Middleware\user_projects\domains\teraproto\servers\AdminServer\logs\AdminServer.log �ɋL�^����܂��B>
<2010/11/03 15��12��33�b SGT> <�T�[�o ���O �t�#�C�� C:\Oracle\Middleware\user_projects\domains\teraproto\servers\AdminServer\logs\AdminServer.log ���J���܂����B���ׂẴT�[�o�T�C�h ���O �C�x���g�͂��̃t�#�C���ɏ������܂�܂��B>
<2010/11/03 15��12��38�b SGT> <�Z�L�����e�B�̓Z�L�����e�B ������ myrealm ���g�p���ď����Ă��܂��B>
<2010/11/03 15��12��40�b SGT> <���O �t�#�C�� C:\Oracle\Middleware\user_projects\domains\teraproto\servers\AdminServer\logs\access.log �̓��[�e�[�V��������܂��B��������~�����ꍇ�́A���O �t�#�C�����ăI�[�v�����Ă��������B����́AWindows �ȂLjꕔ�̃v���b�g�t�H�[���ŋN����\��������܂��B>
<2010/11/03 15��12��40�b SGT> <���O �t�#�C���� C:\Oracle\Middleware\user_projects\domains\teraproto\servers\AdminServer\logs\access.log01446 �܂Ń��[�e�[�V��������܂����B���O ���b�Z�[�W�͈��� C:\Oracle\Middleware\user_projects\domains\teraproto\servers\AdminServer\logs\access.log �ɋL�^����܂��B>
Unless the Console view of Eclipse utilizes an appropriate font with the necessary glyphs, it is possible that the Japanese characters appear mangled, for that is the behavior of most applications - any glyph for a Unicode character that is absent in the font, will appear as a question mark.
One of the possible solutions is to change the font utilized in the debug console, to one that supports display of most Unicode characters, especially characters in the ISO-8859-1 and the Hiragana or Katagana character sets. In Eclipse, this can be configured from Window -> Preferences -> General -> Apperance -> Colors and Fonts, and by changing the font of the Debug Console (or the Terminal console, I'm not sure which).
Go to Window -> Preferences -> General -> Workspace and change at the bottom "Text file encoding" section to Other: "UTF-8" and "New text file line delimiter" to Other: "Unix"