嗨,
我使用的是java语言.在这里我必须使用一些中文,日文字符作为字符串并使用System.out.println()进行打印.
我怎样才能做到这一点?
谢谢
我在Windows上启动Tomcat时在Catalina日志文件中收到以下错误:
Sep 3, 2010 3:22:53 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted.
at org.apache.catalina.connector.Connector.start(Connector.java:1138)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 3, 2010 3:22:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 67604 ms
Run Code Online (Sandbox Code Playgroud)
但是当我将端口号更改8080为9000然后没有错误,但是对http:// localhost:9000 /的请求给出了404错误 …
我有一个有效的ArrayList对象形式java.lang.Object.我必须再次转换Object为ArrayList.我试过这个:
Object obj2 = from some source . . ;
ArrayList al1 = new ArrayList();
al1 = (ArrayList) obj2;
System.out.println("List2 Value: "+al1);
但它是印刷品null.我怎样才能做到这一点?
server01:/# ps -ax | grep java
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
7342 pts/3 Z 0:00 [java] <defunct>
7404 pts/3 S+ 0:00 grep java
server01:/# kill 7342
server01:/# ps -ax | grep java
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
7342 pts/3 Z 0:00 [java] <defunct>
7406 pts/3 S+ 0:00 grep java
server01:/#
Run Code Online (Sandbox Code Playgroud)
在上面我使用ps命令来知道java进程的pid,在上面的例子中是7342.
然后我使用kill命令杀死了那个进程.但是这并没有被杀死,因为ps命令再次显示带有pid 7342的java进程.
我应该使用其他命令来杀死进程,为什么kill无法杀死进程
感谢名单
我正在使用Netbeans6.9.1 IDE并希望使用java在输出控制台中显示中文字符.我从网页上复制了中文字符并在""之间复制.但它不受支持.
String char1="????";
System.out.println(char1);
我是否需要在IDE中进行一些设置或在我的Java代码中使用某些设置?
嗨
我正在使用Bonita5.2和Tomcat6.0.19我导出了应用程序(它提供了一个war文件和一些配置文件和库)并部署在tomcat中.当我运行应用程序时,在登录页面之后,我收到错误
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.SecurityException: Unable to locate a login configuration
com.sun.security.auth.login.ConfigFile.(Unknown Source)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
.
.
.
.
在启动tomcat之前,我运行一个包含以下内容的bat文件:
set BONITA_OPTS="-Dorg.ow2.bonita.environment=d:\Tomcat6.0\conf\bonita-environment.xml" set LOG_OPTS="-Djava.util.logging.config.file=d:\Tomcat6.0\conf\logging.properties" set SECURITY_OPTS="-Djava.security.auth.login.config=d:\Tomcat6.0\conf\jaas-standard.cfg" set JAVA_OPTS=%JAVA_OPTS% %LOG_OPTS% %SECURITY_OPTS% %BONITA_OPTS%
我想这个错误是因为找不到jaas配置文件.但我确信我提到的路径.
我还缺少什么来配置jaas?
谢谢
我在MySQL表中有一个VARCHAR列,只存储数字.当我运行查询
SELECT MAX(title_no) as title_no from mytable我得到999但是在表中有更多记录,其中title_no列中的值> 999.
我不允许将列从varchar更改为int.请帮我找到正确的nuber.
谢谢
我在debian 6.0.4中安装mysql-5.5.13.tar.gz.我正在按照这里 的步骤进行操作
scripts/mysql_install_db --user=mysql我得到了例外
bash: scripts/mysql_install_db: No such file or directory
但文件存在于该地方.我也做了那个可执行文件,但它不起作用.我在根终端工作.请帮我解决这个问题.
谢谢
我安装了
mysql-5.5.24-linux2.6-i686.tar.gz现在执行命令后
root@server06:/usr/local/mysql# scripts/mysql_install_db --user=mysql我收到了消息
Installing MySQL system tables... ./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directoryInstallation of system tables failed! Examine the logs in ./data for more information.
You can try to start the mysqld daemon with:
Run Code Online (Sandbox Code Playgroud)shell> ./bin/mysqld --skip-grant &并使用命令行工具./bin/mysql连接到mysql数据库并查看授权表:
Run Code Online (Sandbox Code Playgroud)shell> ./bin/mysql -u root mysql mysql> show tables如果您遇到路径问题,请尝试'mysqld …