Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (116)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Java 1.1 compatibility: how to go about it (in this case)  (Read 4832 times)
0 Members and 1 Guest are viewing this topic.
Offline keldon85

Senior Member


Medals: 1



« Posted 2007-06-01 19:50:41 »

I'm developing a Tetris java applet clone that I want to be compatible with Java 1.1 however I am still able to use classes that are not available 1.1 in eclipse without any problems (despite setting it to compile in Java 1.1 compatibility). It makes coding a little uncomfortable, especially since I cannot be sure that it is doing what it says on the box (i.e. compiling for java 1.1).

My current setup is:
 - Eclipse 3.2.1 with JRE 1.6.1_01 and the appropriate documentation

Will I have to resort to command line compilation or something when doing the final build.

Offline DzzD
« Reply #1 - Posted 2007-06-01 21:12:03 »

you may not be able to compil if you set -target 1.1 to javac ??! no ?

javac Sample.class -target 1.1

Offline keldon85

Senior Member


Medals: 1



« Reply #2 - Posted 2007-06-01 21:32:49 »

Ahh, I've found what the problem is; though the compiler is compiling for 1.1 byte code compatibility it does not stop you from using newer methods for some reason. The only way to get warnings for that is to use JDK 1.1, which isn't too bad because what I will do is create everything in Eclipse as normal and occasionally compile with JDK 1.1 to make sure there are no incompatible functions, etc.

Also the lowest source compatibility I can get is 1.3; I don't think there is a workaround for that in eclipse although I will restart the computer and see if Eclipse will be compatible with the older runtime and JDK

EDIT: Java 1.1 is completely incompatible with the later versions so I have had to remove the recent version in order to compile with 1.1 and I am starting to get into the flow of it. No eclipse and I will have to install MSys so that I can make use of makefiles.

EDIT: Wait, no freaking way am I getting with of java 6.0; I just realized what's running on that; well at least I got the important parts changed, I think I can continue in Eclipse and revert to 1.1 at the final stage. Although I do remember there being differences in Vector such as no get(n)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ddyer

Senior Member


Medals: 5



« Reply #3 - Posted 2007-06-03 19:23:54 »

The only way to be reasonably sure is to actually compile for delivery with java 1.1.
That's what I do.

Offline keldon85

Senior Member


Medals: 1



« Reply #4 - Posted 2007-06-03 20:44:59 »

The only way to be reasonably sure is to actually compile for delivery with java 1.1.
That's what I do.


Which JRE/JDK are you using? The earliest compatibility I can work with is 1.3 code compatibility with 1.1 class compatibility when compiling with JRE 6 in Eclipse.

What I have done is compile with JDK 1.1 and find out what is compatible, then continue development and will tie back with 1.1 once my engine is secure. But many classes have been changed such as Vector, and plenty of others so I can never be sure when using any API class (including Vectors).

If there is a way to have Eclipse aware of the limitation it would be great! Also I cannot run the 1.1 JRE with the recent JRE installed as they have terrible conflicts. This also means that Eclipse is a no-no!

Offline ddyer

Senior Member


Medals: 5



« Reply #5 - Posted 2007-06-04 22:27:24 »

Which JRE/JDK are you using? The earliest compatibility I can work with is 1.3 code compatibility with 1.1 class compatibility when compiling with JRE 6 in Eclipse.
I do development with eclipse and the latest JDK, but I remain aware of what features
are not available in JDK1.1.  I use JDK1.1 itself to compile for delivery, not any compatibility
mode, and occasionally I actually run with JDK1.1 when looking for an obscure bug in
the deployed applet.

BTW, with all the different JREs, Browsers, and platforms out there, you can be sure that there are bugs
that will only show up in actual use.  It's not just a matter of defined APIs that don't behave exactly the same;
lots of detailed behavior is unspecified, and varies seemingly at random.  I speaking of things such
as if you are guaranteed to get a "mouseenter" message if the mouse enters by the window appearing
under it.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #6 - Posted 2007-06-08 09:10:38 »

The only way to be really sure in Eclipse you're compiling 1.1 compatible code is to set .class file compatibility to 1.1 and to reference a java 1.1 rt.jar instead of the 1.6 rt.jar (In your Project properties, Java Build Path -> Libraries, replace the JRE System Library with the java 1.1 one). Afaik, source compatibility is not really important here.

Offline keldon85

Senior Member


Medals: 1



« Reply #7 - Posted 2007-06-08 10:44:25 »

Oh right, only problem is that I cannot have JRE 1.1 and JRE 6 installed at the same time as it makes java run a little odd; although maybe I could try to work something out.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #8 - Posted 2007-06-08 13:17:51 »

Maybe you could try to install the 1.1 jre, copy the installed directory (or perhaps only the rt.jar file), and uninstall the 1.1 jre.
Then re-install 1.6, and finally make the reference from Eclipse to the 1.1 rt.jar file (in de copied jre 1.1 installation).
A bit messy but I think it should work.

Offline keldon85

Senior Member


Medals: 1



« Reply #9 - Posted 2007-06-08 14:35:10 »

One thing I remember during my time at uni is that you can bundle a JRE with your package in some way. There was a CD with Eclipse going round on campus that allowed you to run Eclipse without installing Java; I doubt I still have it but it was pretty nifty and I could at least be able to demonstrate the project to my manager without being tied to Java 1.1

I will try that method though just so that I can be sure that it works

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline keldon85

Senior Member


Medals: 1



« Reply #10 - Posted 2007-06-08 15:11:42 »

It seems I have a solution; bundling JRE and JSmooth!!! At least I have a viable fall-back and no longer have to worry about that issue in Windows (which most of my clients without a JRE will be running).

Offline Linuxhippy

Senior Member


Medals: 1


Java games rock!


« Reply #11 - Posted 2007-06-14 12:07:07 »

Well bundling a jvm means its application-private which means other java-apps will not able to use it.
This means users end up with having 15 different Java runtimes installed and each applications uses its own.

JSmooth also allows to point users to java's website and download a global-jvm which will also help other java apps and reduces the mess on the client computer.

lg Clemens
Offline keldon85

Senior Member


Medals: 1



« Reply #12 - Posted 2007-06-14 13:01:17 »

Well bundling a jvm means its application-private which means other java-apps will not able to use it.
This means users end up with having 15 different Java runtimes installed and each applications uses its own.

JSmooth also allows to point users to java's website and download a global-jvm which will also help other java apps and reduces the mess on the client computer.

lg Clemens
I think you missed the whole, "they don't have the option of installing" part.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

radar3301 (12 views)
2014-09-21 23:33:17

BurntPizza (30 views)
2014-09-21 02:42:18

BurntPizza (20 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (28 views)
2014-09-20 20:14:06

BurntPizza (32 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!