jdk1.6

java 1.6 SystemTray icon does not appear on windows startup

流过昼夜 提交于 2019-12-19 04:57:08
问题 I have a Java 1.6 desktop application, started with javaw from a batch file on Windows XP. There is a .lnk link to this batch file, which is placed to windows Startup folder in order to start this application on every system boot. The application uses SystemTray class to display an icon on the system tray in case it is running. Starting this application manually there is no problem. If it is started by windows startup process, there is no icon displayed (not even a blank icon), however the

unable to place breakpoints in eclipse

南笙酒味 提交于 2019-12-18 16:29:12
问题 I am using eclipse europa (3.5) on windows vista home premium 64-bit using JDK 1.6.0_18 (32 BIT). Normally, I am able to put breakpoints just fine; However, for a particular class which is NOT part of the project (this class is inside a .JAR file (.JAR file is part of the project) ), although I have attached a source directory to this .JAR file, I am unable to place a breakpoint in this class. If I double-click on the breakpoint pane(left border), I notice that a class breakpoint is placed. I

Why is this method overloading ambiguous?

≡放荡痞女 提交于 2019-12-17 23:16:31
问题 public class Primitive { void m(Number b, Number ... a) {} // widening, autoboxing->widening->varargs void m(byte b, Number ... a) {} // unboxing, autoboxing->widening->varargs public static void main(String[] args) { Byte b = 12; Primitive obj = new Primitive(); obj.m(b, 23); } } I have already searched and found that widening priority is higher than unboxing, so in above method invocation, first method should have been called because second parameter is same for both. But this does not

Why are we getting ClosedByInterruptException from FileChannel.map in Java 1.6?

假如想象 提交于 2019-12-17 16:43:19
问题 A customer of ours complains that, sporadically, calls of ours to FileChannel.map fail with a ClosedByInterruptException . The Javadoc does not list this as a legitimate possibility. Does anyone know what might be going on here? Cause0: java.nio.channels.ClosedByInterruptException Cause0-StackTrace: at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184) at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772) 回答1: Channel operations are bound to

How to tell why a file deletion fails in Java?

让人想犯罪 __ 提交于 2019-12-17 05:07:57
问题 File file = new File(path); if (!file.delete()) { throw new IOException( "Failed to delete the file because: " + getReasonForFileDeletionFailureInPlainEnglish(file)); } Is there a good implementation of getReasonForFileDeletionFailureInPlainEnglish(file) already out there? Or else I'll just have to write it myself. 回答1: In Java 6, there is unfortunately no way to determine why a file cannot be deleted. With Java 7, you can use java.nio.file.Path#delete() instead, which will give you a

How to set classpath when I use javax.tools.JavaCompiler compile the source?

此生再无相见时 提交于 2019-12-17 02:49:09
问题 I use the class javax.tools.JavaCompiler (jdk6) to compile a source file, but the source file depends on some jar file. How to set the classpath of the javax.tools.JavaCompiler ? 回答1: The javax.tools.JavaCompiler#getTask() method takes an options parameter that allows to set compiler options. The following message describes an easy way to set them in order to access the calling program's classpath: You need to configure the standard java file manager to know about the jar files(s) - you use

btrace with JDK5

自闭症网瘾萝莉.ら 提交于 2019-12-14 03:46:34
问题 Can we use bTrace with JDK5 or lesser versions? If not, what is that things which is provided in JDK6 that makes bTrace work? My understanding is that btrace working on Java Byte Code Instrumentation which was there for JDK5 as well. is there some extra features of instrumentation which is being exploit by bTrace? 回答1: Please refer here: http://kenai.com/projects/btrace/forums/forum/topics/13112-running-BTrace-on-JRE Here is what have they answered: this scenario is not tested. In theory, it

JAXB unmarshal won't work with JDK 1.6

蹲街弑〆低调 提交于 2019-12-13 08:14:01
问题 Yes, this is a long boring posted question which is maybe very simple at the same time. :( I just calling a SOAP WebService interface implemented with .NET platform from Java. After the data received, converting it to java objects using JAXB.Everything works well with JDK1.8, but failed with JDK1.6 I noticed that the unmarshalling process stopped at the GetBjxsDataResponse level. Namely I could successfully got an instance of GetBjxsDataResponse from the envelop body, but the

SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/myproject,J2EEApplication=none,J2EEServer=none

自古美人都是妖i 提交于 2019-12-12 18:09:20
问题 I have the following problem. I used jdk1.6.0_23 to compile my project with eclipse. but in the server enviroment, tomcat is running with jre1.6.0_31 . What might the cause of SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/myproject,J2EEApplication=none,J2EEServer=none May 18, 2012 3:40:41 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not

how do I use different version of java

牧云@^-^@ 提交于 2019-12-12 15:54:23
问题 I've installed both java 6 and 7 and using eclipse to write a simple jdbc application. I have both sqljdbc4.jar and sqljdbc.jar in the lib folder. I'm getting this message... Dec 18, 2013 9:29:51 AM com.microsoft.sqlserver.jdbc.SQLServerConnection SEVERE: Java Runtime Environment (JRE) version 1.7 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0. Exception in thread "main" java.lang.UnsupportedOperationException: Java Runtime Environment