Help!! Java/J++ Question for you folks

NFS4

No Lifer
Oct 9, 1999
72,636
46
91
Ok all you Java experts out there can help out this relative newbie in the area;). I'm working on a project due Tuesday for my Java class. I'm working using Visual J++ 6.0 Professional (yes I bought it;)), and I'm trying to working implementing the import javax.swing.*; command.

J++ keeps on bitching to me about "undefined package 'javax' (J0051)". Does J++ just no support this operation? I went to MS's website and was looking up the "swing" and "javax" to see if there was an class add-on or something that I needed to be able to use this?

What do I do?? My other imports are:

import java.awt.*;
import java.awt.event.*;
 

GL

Diamond Member
Oct 9, 1999
4,547
0
0
Time to use a REAL implementation of Java from Sun. From what I know, javax.swing is a Sun package..not sure if the one by the same name is available in J++...I'd presume if it is not by the same name, there is one that is named slightly differently. Just download JDK, code the program up in your choice of a text editor and compile it to bytecode with JDK.

I did Java in first year CS, and one thing that I was told over and over again was "stay away from J++". I'm no expert on J++ but I believe that it is not as portable as a true Java implementation such as the one from Sun or some of the copies of Java like Kawa.

-GL
 

NFS4

No Lifer
Oct 9, 1999
72,636
46
91
Well I can do that here on campus. I can just upload the file to my campus account and compile it from there. But I would like to use J++ so that I can compile it and view my resultant application within Windows. I can't view windows and applications from a Telnet box.

Besides, it's a waste of my $$$ not to use J++ anyway, and it is a great program :)
 

DAM

Diamond Member
Jan 10, 2000
6,102
1
76
use jdk or Jbuilder, they are both great progs specially jbuilder.





dam()
 

GL

Diamond Member
Oct 9, 1999
4,547
0
0
Woah...just download JDK and you can view your app from within Windows and compile it. When it comes to Java, you want portability which means you want everybody to be able to use the code. J++ I presume (not an expert) uses similar but slightly differing classes. That completely breaks portability...something that might not be a good thing if your profs aren't using J++ compatible JVMs when they're marking your project;)

If you don't like the free JDK from Sun, IBM has an incredibly fast JDK as well and it is free also (free as in monetary...not open source). If you want an open source JDK, get Kawa which is a reverse-engineering of Sun's JDK I believe.

-GL
 

GL

Diamond Member
Oct 9, 1999
4,547
0
0
NFS4,

Actually, I didn't think about this, but if the J++ IDE lets you specify which Java compiler to use, you should really point it to the Sun JDK after you have downloaded it and installed it. That way you can still use the J++ program (I guess you really like it!) but get the benefits of a true Sun JDK.

-GL
 

DAM

Diamond Member
Jan 10, 2000
6,102
1
76
works for me,


go to sun.com, go to software, and java



and youll see it there




dam()
 

zippy

Diamond Member
Nov 10, 1999
9,998
1
0
Check my sig.

If have a question that isn't in an article (or it is, but its an emergency and you don't have time to look through them), just email freejavahelp@freejavahelp.com. He'll be more than happy to help you.