This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I just downloaded and installed sdk 1.4.0. I am trying to complile my first swing code, but I get the following error: No variable EXIT_ON_CLOSE defined in class javax.swing.JFrame From reading the docs, I belive that this was a new addition to 1.4 from 1.3. However I belive that I am currently running 1.4 on my system. I can type java -version at the dos command line and I see that I do in fact have Standard Edition (1.4.0) running. My File: -------- c:\code\java\application\firstswing\HelloWorld.swing CLASSPATH --------- CLASSPATH=.;c:\j2sdk1.4.0;c:\code\java\application\firstswing
My Code: --------
Can someone please tell me what I am doing wrong?
Joined: Apr 03, 2001
Sorry I made a typo in my post. My file is actually c:\code\java\application\firstswing\HelloWorld.java not of type .swing
Your code worked just fine for me, and I use jdk 1.3.1
CLASSPATH is for running. You are having problems compiling. What is your PATH? [ March 01, 2002: Message edited by: Marilyn deQueiroz ]
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Apr 03, 2001
Marylin, Thank you for taking the time to look at my problem. I can see that there are a million posts in the Saloon that touch on the subjects PATH and CLASSPATH. You pointed me in the right direction and I fixed my problem. I have several applications that have values posted in my PATH, pvcs, oracle, ms sql server 7.0, other business software, and even Java 2 version 1.2, and Java 2 version 1.4. I cleared out my path completely and just added Java 1.4 and my first swing application ran fine. I am wondering if there was a problem with having both Java 1.2 and Java 1.4 in my PATH at the same time. I did some reading up on this issue and from my understanding it sounded like this was possible. Anyway.... The whole PATH and CLASSPATH issues have always been a tough one for me to tackle. Thanks again.