Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  jre 1.4.2 and msvm co-existing?  (Read 1409 times)
0 Members and 1 Guest are viewing this topic.
Offline nonnus29

JGO Ninja
***

Posts: 687


Giving Java a second chance after ludumdare fiasco


« on: 2003-11-06 17:58:31 »

I've run into an odd problem.  I wanted to run a simple walkaround demo for a console style rpg using the ms vm, so I popped open the java control panel and unselected internet explorer from the browser list.  I use Mozilla exclusively.   After restarting my comp I was unable to run any applets compiled with 1.4.2 from IE with the ms vm.  However when I recompile with 1.3.x it runs in ie with the ms vm no problem.

I'm sure there's an explanation for this (maybe the result of some legal proceedings)... Can anyone shed some light on whats going on here?

Oh, and here is the demo;

http://www.geocities.com/nonnus29/javademo/demo.htm
Offline William Denniss

JGO Kernel
*****

Posts: 1837
Medals: 5


Fire at will


« Reply #1 on: 2003-11-06 22:47:39 »

The reason is that 1.4.2 by default targets version 1.2 and above.  Where as 1.3 and all ones before it defaulted to 1.1.

Point 9:
http://java.sun.com/j2se/1.4/compatibility.html#incompatibilities1.4
Quote

As of J2SE 1.4.0, the javac bytecode compiler uses "-target 1.2" by default as opposed to the previous "-target 1.1" behavior. See the reference page for the javac compiler for descriptions of these behaviors. One of the changes involved in targeting 1.2 is that the compiler no longer generates and inserts method declarations into class files when the class inherits unimplemented methods from interfaces. These inserted methods, like all other non-private methods, are included in the default serialVersionUID computation. As a result, if you define an abstract serializable class which directly implements an interface but does not implement one or more of its methods, then its default serialVersionUID value will vary depending on whether it is compiled with the J2SE 1.4 version of javac or a previous javac.

For background information on these methods inserted by earlier versions of javac, see bug
4043008.


Quote

By default, version 1.4 of the development kit generates class files for version 1.2 of the Java Virtual Machine, while earlier versions of the development kit generated class files for JVM version 1.1. As of this writing, the preverify utility expects version 1.1 class files, so it fails when you give it version 1.2 files generated by the newer development kit. To solve this problem, simply use javac's -target flag to have it generate version 1.1 class files:

http://wireless.java.sun.com/midp/questions/jdk1_04/

Will.

Offline nonnus29

JGO Ninja
***

Posts: 687


Giving Java a second chance after ludumdare fiasco


« Reply #2 on: 2003-11-07 15:43:47 »

Thanks!
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.105 seconds with 20 queries.