Author Topic: Supported VMs?  (Read 3524 times)

Offline Fencer

  • byte
  • *
  • Posts: 21
    • View Profile
    • http://BrainKing.com
Supported VMs?
« on: September 24, 2006, 01:58:51 pm »
Hello,
I have downloaded the latest jPCT version yesterday and developed a simple applet to try it out. It works great with the Sun's Java plugin but when I try to use Internet Explorer with Microsoft VM (Java 1.1), it throws this exception:

java.lang.NoSuchMethodError: java/lang/Runtime: method availableProcessors()I not found
at com/threed/jpct/FrameBuffer.<init>

Does it mean that jPCT is not compatible with Java 1.1? Or is the problem in the FrameBuffer class?

Thank you.
Filip

http://BrainKing.com

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Supported VMs?
« Reply #1 on: September 24, 2006, 04:18:35 pm »
Damn...the Javadocs don't state that this method isn't available in 1.1. jPCT should work in 1.1 (the OpenGL renderer won't, but the software one will). I've removed the call to this method as it wasn't really needed. The fixed jar can be downloaded here: http://www.jpct.net/download/beta/jpct_112pl2.jar. Please give it a try.

Offline Fencer

  • byte
  • *
  • Posts: 21
    • View Profile
    • http://BrainKing.com
Supported VMs?
« Reply #2 on: September 25, 2006, 12:25:01 pm »
Quote from: "EgonOlsen"
Damn...the Javadocs don't state that this method isn't available in 1.1. jPCT should work in 1.1 (the OpenGL renderer won't, but the software one will). I've removed the call to this method as it wasn't really needed. The fixed jar can be downloaded here: http://www.jpct.net/download/beta/jpct_112pl2.jar. Please give it a try.


Thank you Egon, this issue is solved.  :)
There is one more:

java.lang.NoSuchMethodError: java/util/Vector: method add(Ljava/lang/Object;)Z not found
   at com/threed/jpct/FrameBuffer.register

I guess Vector.add() methods were added at Java 1.2. Java 1.1 uses addElement() method instead.

Filip

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Supported VMs?
« Reply #3 on: September 25, 2006, 06:00:18 pm »
ARGH! The problem is, that i don't have a 1.1 compatible VM installed anymore, so such things remain unnoticed. I've updated the jar to fix this problem. Can't wait to spot the next part where i've broken 1.1 compatibility again... :oops:

Offline Fencer

  • byte
  • *
  • Posts: 21
    • View Profile
    • http://BrainKing.com
Supported VMs?
« Reply #4 on: September 25, 2006, 06:20:10 pm »
Quote from: "EgonOlsen"
ARGH! The problem is, that i don't have a 1.1 compatible VM installed anymore, so such things remain unnoticed. I've updated the jar to fix this problem. Can't wait to spot the next part where i've broken 1.1 compatibility again... :oops:


I think if you try to build jPCT with the "-target 1.1" switch, it should throw all incompatible lines of code. I'd like to check it myself but since jPCT is not open source, I cannot.
The updated version of the jar can be downloaded from http://www.jpct.net/download/beta/jpct_112pl2.jar again?

Filip

Offline Fencer

  • byte
  • *
  • Posts: 21
    • View Profile
    • http://BrainKing.com
Supported VMs?
« Reply #5 on: September 25, 2006, 06:50:43 pm »
Quote from: "EgonOlsen"
ARGH! The problem is, that i don't have a 1.1 compatible VM installed anymore, so such things remain unnoticed. I've updated the jar to fix this problem. Can't wait to spot the next part where i've broken 1.1 compatibility again... :oops:


Okay, I've tried the newest update and now everything works great even with Java 1.1. Thanks again Egon.  8)
Now I'll try to use some textures and more advanced functions to check them for the compatibility as well.

Filip

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Supported VMs?
« Reply #6 on: September 25, 2006, 07:08:48 pm »
Quote from: "Fencer"
I think if you try to build jPCT with the "-target 1.1" switch, it should throw all incompatible lines of code.
No, it doesn't. This switch only forces the compiler to produce 1.1 compatible byte code. It doesn't care about methods and/or classes. jPCT is compiled with -target 1.1 already.

Offline Fencer

  • byte
  • *
  • Posts: 21
    • View Profile
    • http://BrainKing.com
Supported VMs?
« Reply #7 on: September 25, 2006, 07:52:27 pm »
Quote from: "EgonOlsen"
Quote from: "Fencer"
I think if you try to build jPCT with the "-target 1.1" switch, it should throw all incompatible lines of code.
No, it doesn't. This switch only forces the compiler to produce 1.1 compatible byte code. It doesn't care about methods and/or classes. jPCT is compiled with -target 1.1 already.


Of course you are right. My fault.
Well, perhaps a JDK 1.1.8 could be downloaded from http://java.sun.com/products/archive/jdk/1.1.8_010/index.html and used for the backward compatibility test?

Filip