Can someone explain how I figure out what 'compiler' I'm using. I have Netbeans 3.6 installed on XP(default install), and also what JRE the output classes would be compatible with. I've been told you can specify this but I can't figure out where.
I'm compiling simple applets but they don't run under default installs of win2K. However, other applets I have do, and I don't know how to figure out what the problem is.
Also, is there any way to tell what version of JRE an applet if compatible with?
If anyone can give me any other pointers for sorting this out then pls do so.
Not familiar with the IDE(?) you mention.
The java.exe command has an option -version. (java.exe comes with jre)
The javac.exe command has an option -target to specify what version to compile to.
Don't know of any/easy way to test class files compatibility with the jre java plugin.
Other than trying it.
The class file has version info in the first few bytes. Use a hex editor to view. Look at the Language Specification for details.
Could you copy and post the error messages you get on the Java plugin console for further info? The java console will also show what version the plugin is.
I assume that you have newer versions of class files that don't work on older versions of the java plugin. Or what is the case?
Last edited by Norm; 08-14-2005 at 03:11 PM.
Reason: Add more ideas
When I run java -version I get ...
C:\Documents and Settings\Admin>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
So this tells me the JRE version (NetBeans is a freebie java compiler at www.netbeans.org)
I don't have any error messages as I don't have a java console. I checked this out and it appears that pre-XP, all systems had a version of MS Java installed. This is no longer the case so SUN java has to be used (which has the console).
I don't know whether my class files are too 'new' for the older java JRE on win2K systems and I don't know how to find out if they are !!! And i don't know how to get any diagnostics.
How do you "execute" the java programs? If in a browser, it can display the Java console. Look at the toolbar menu items. One of them will display the console.
jre version 1.4.2 certainly is not too old.
Do you have a hex editor? Look at the first few bytes of the class files. The start with
CAFEBABE and then 2 bytes of minor version and 2 of major. Most of my class files have: 0003 002D = 45.3
Netbeans uses the java compiler. It should complain to you if you try to build a program and you don't have the compiler installed on your computer. It should prompt you to download and install the Java Development Kit.
By Shaitan00 in forum Java
Last Post: 04-08-2005, 06:49 AM
Last Post: 10-14-2002, 03:46 PM
By Alika Larsen in forum VB Classic
Last Post: 08-20-2002, 09:05 PM
By Ian Hossie in forum VB Classic
Last Post: 12-11-2001, 09:38 AM
By Stefan in forum VB Classic
Last Post: 06-22-2000, 01:27 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL