{"id":4539,"date":"2014-03-30T13:27:15","date_gmt":"2014-03-30T13:27:15","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-java-5-collection-of-common-programming-errors\/"},"modified":"2014-03-30T13:27:15","modified_gmt":"2014-03-30T13:27:15","slug":"problem-about-java-5-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-java-5-collection-of-common-programming-errors\/","title":{"rendered":"problem about java-5-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3296d341f3f705ec6d449d06d0bb39a6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnotfed<br \/>\njava java-6 java-5<br \/>\nUsing a Java 1.5 compiler, when I try to compile a java class that depends on a class that was compiled with Java 1.6, I get this error:in\/javac Java15.java Java15.java:5: cannot access Java16 bad class file: .\/Java16.class class file has wrong version 50.0, should be 49.0 Please remove or make sure it appears in the correct subdirectory of the classpath.String java16result = Java16.test();^ 1 errorThe reverse works (Using a Java 1.6 compiler, I can link with a Java 1.5 class.)Is there any sort<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fcecdc7b32cb34e69ebd04dbf2d4e4f8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nsblundy<br \/>\njava generics gwt gxt java-5<br \/>\nI&#8217;m looking at some GXT code for GWT and I ran across this use of Generics that I can&#8217;t find another example of in the Java tutorials. The class name is com.extjs.gxt.ui.client.data.BaseModelData if you want to look at all of the code. Here are the important parts:private RpcMap map;public &lt;X&gt; X get(String property) {if (allowNestedValues &amp;&amp; NestedModelUtil.isNestedProperty(property)) {return (X)NestedModelUtil.getNestedValue(this, property);}return map == null ? null : (X) map.ge<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/56ecbe7ccdf5bb2aa386f56de6dc9238?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTheLQ<br \/>\njava java-7 java-5<br \/>\nI&#8217;ve recently moved to Java 7 in one of my projects. I claim that it can run on Java 1.5 simply because there&#8217;s nothing I depend on that is in Java 6 or 7. However when compiling today I noticed this:bootstrap class path not set in conjunction with -source 1.5Google has found little information on this warning. Does this mean that you can&#8217;t compile to Java 1.5 from Java 1.7?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f3cb44640c234ef08ace17e962911a1a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nReddy<br \/>\njava java-ee java-6 java-5<br \/>\nJust out of curiosity. Can we compile &amp; run a java file from another java program? If so, can you send a reference to that knowledge source?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f8bd1c472fe5832e125fd4008578608a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\njWeaver<br \/>\nconsole java-util-scanner bufferedreader java-6 java-5<br \/>\nI was reading about Console class, and in the very first line, it was written New to Java 6 and when we are running Java SE 6 from command line, then we are typically using console class objectSo, which means we are implicitly using console class through the command line ??Then, start searching about the console class, i found Input from console class in java and Console link. I conclude some pointsConsole class are only usable outside the IDE using System.console().readLine();Console class read<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ec23f7cf0263a623bea6aca36a77a58b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMichael Petrotta<br \/>\ngenerics java-5<br \/>\nI get confused when I come across a generic method of this sort.public static &lt;T&gt; T addAndReturn(T element, Collection&lt;T&gt; collection){collection.add(element);return element; }I cannot understand why &lt;T&gt; is required in this method.Also, what is the difference between generic methods and the methods that use generics syntax?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e80b8f01a82ab596e1e9f2c5dcfe4bf5?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nFrank Bruch<br \/>\njava jvm backwards-compatibility java-6 java-5<br \/>\nPlease consider the following scenario: A Java Framework and a bunch of application-plugins are deployed as a Java SE Client Application. The Client Runtime is Java SE 6, whereas the framework as well as the application-plugins is compiled with Java SE 5.Now the framework is recompiled with Java SE 6, the application-plugins remain unchanged (compiled with Java SE 5). Assuming the framework &#8220;interface&#8221; (classes\/interfaces directly used by the application-plugins) remains compilable with Java SE<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/147c5a9cc1feec049c50da791ac7d144?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\n22 revs, 3 users 98%MRalwasser<br \/>\njava upgrade java-6 java-5<br \/>\nI&#8217;d like to upgrade from Java 5 to Java 6. We all know about the technical advantages and benefits, but:I have the problem that a major client refuses to upgrade from java 5 to java 6 because of &#8220;the risks&#8221; and &#8220;no\/too few benefits for us&#8221; (banking sector).What can be answered to a non-technical decider at the client what benefits he&#8217;ll get from an upgrade &#8211; or otherwise which problems\/consequences may arise if he&#8217;ll stay with java 5?It&#8217;s not a &#8220;fire and forget&#8221;-product, it&#8217;s activly extended wi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/71828e3594c57e13f477c0db81b36e25?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nbluish<br \/>\njava programming-languages java-5 java1.4<br \/>\nI&#8217;m about to jump into Java development again after a number of years. The language revision I worked with was 1.4.2. I know there have been significant changes to the language since then, and I&#8217;m looking for a site or a book that covers these in some detail. At the very least, I&#8217;m looking for a resource that indicates which language features were added in which revision, so I can at a glance skip the sections I&#8217;m already familiar with. Any suggestions ?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/16bb79357c1e950f9422c74f8e570123?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnewbieguy<br \/>\naix java-5<br \/>\nI have a problem with Java 1.5.0 for AIX. The error happens just when I log on with specific user on AIX (myuser). When I log on with other user java works ok.The error come up even when I executed just &#8220;java -version&#8221; or simply &#8220;java&#8221; (of course, without quoting). I&#8217;ve tried executing it with the full path: \/usr\/java5\/jre\/bin\/java but still fails.There was installed the version 1.4 of java on system too. So the $PATH variable for the user contained \/usr\/java14\/jre\/bin, but I removed that value,<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/205570abc6efaae330400594432f3a9a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nCodingMonkey<br \/>\nssl apache-httpclient-4.x websphere-6.1 java-5 jks<br \/>\nI&#8217;m having this big problem and I can&#8217;t find any answer on google, so I try to write here.I&#8217;m developing a web service client. To connect to the web service, I have to create an ssl channel with client authentication and use a proxy (the call must be done from a whitelisted IP). To do this, I&#8217;m using the HttpClient 4.2.3 library with Java 1.5 (compatibility mode with 1.4), under WebSphere 6.1 environment.Being work-related, I&#8217;m deleting all references to the actual web service I&#8217;m calling so you<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>notfed java java-6 java-5 Using a Java 1.5 compiler, when I try to compile a java class that depends on a class that was compiled with Java 1.6, I get this error:in\/javac Java15.java Java15.java:5: cannot access Java16 bad class file: .\/Java16.class class file has wrong version 50.0, should be 49.0 Please remove or make sure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4539","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4539"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4539\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}