compiler/jre issues


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: compiler/jre issues

  1. #1
    Join Date
    Aug 2005
    Posts
    2

    compiler/jre issues

    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.

    Thanks.
    John.

  2. #2
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    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 02:11 PM. Reason: Add more ideas

  3. #3
    Join Date
    Aug 2005
    Posts
    2
    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.

  4. #4
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    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

  5. #5
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    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.

Similar Threads

  1. Replies: 3
    Last Post: 04-08-2005, 05:49 AM
  2. WebService Issues
    By maze in forum .NET
    Replies: 3
    Last Post: 10-14-2002, 02:46 PM
  3. VB6 DCOM Issues
    By Alika Larsen in forum VB Classic
    Replies: 0
    Last Post: 08-20-2002, 08:05 PM
  4. Oracle and Ado Issues
    By Ian Hossie in forum VB Classic
    Replies: 1
    Last Post: 12-11-2001, 08:38 AM
  5. controls threading issues ?!?!
    By Stefan in forum VB Classic
    Replies: 0
    Last Post: 06-22-2000, 12:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center