This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I can't compile swings...!!  RSS feed

 
Ayman Jaffar
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I've recently downloaded sun's free "just in time compiler" for jdk 1.3 . But when I put "import javax.swing.*" in my programm there's still a compile error, complaining that there's no such package. The same problem use to happen to me when I used jdk1.2 . By the way...after I downloaded JDK1.3 I still see "Just in time compiler jdk1.1.2" after I type javac javaexample.java
Lots of questions ha....am I missing someting here ?!!
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your classpath variable. Is it pointing to the location of the swing classes? 99.9% of the time, when you can't find a class during compile it is either 1) you misspelled the class name or 2) the class isn't on your classpath.
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought with recent JDK 1.2 and higher that it automatically knows where the core packages are. For instance when doing a fresh install of JDK 1.3 you don't have to set you classpath to point to the core java packages it just works. This has been my experience with it. Of course it does make it better if you do set it, that is if you plan on using Jikes.
Frank
 
Ayman Jaffar
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thomas Paul,
how do I set the classpath variable ? any refrences on the net that I can read on how to do so...just incase there are more complications...!!
Thanks
Originally posted by Thomas Paul:
Check your classpath variable. Is it pointing to the location of the swing classes? 99.9% of the time, when you can't find a class during compile it is either 1) you misspelled the class name or 2) the class isn't on your classpath.

 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on the OS you are using. If it's Win98 then update your autoexec.bat. If it's NT then it's Control Panel->System->Environment Variables.
 
Ayman Jaffar
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using win98, so how shall I update my autoexec.bat ? Also my java compiler still thinks I have jkd 1.1 and not jdk 1.3, so may be the problem is also there, becuase I don't thing jdk 1.1 had swings !!
Thanks
Originally posted by Thomas Paul:
Depends on the OS you are using. If it's Win98 then update your autoexec.bat. If it's NT then it's Control Panel->System->Environment Variables.


[This message has been edited by Ayman Jaffar (edited October 11, 2000).]
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try uninstalling the JDK and installing it again. Maybe that will clear up the problem with it thinking you still have 1.1 installed. You can run sysedit to edit your autoexec.bat file.
Frank
 
Paul Caudle
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ayman,
right click on your autoexec.bat file and choose edit. At this point you should see a line that looks like this:
set classpath = %classpath%;jdk1.1.2\jre\lib\rt.jar
and one that looks like this:
path = %path%;jdk1.1.2\bin\
or something to that effect. You need to change these lines so that they point to the folder which stores 1.3 (the most likely scenario is that you'll just have to change jdk1.1.2 to something like jdk1.3.1 or whatever the folder name is in which 1.3 is located).
This might sound confusing but I hope it helps.
have a good one,
Paul
 
Ayman Jaffar
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot Paul,
I finally got it.....somehow !!!

[This message has been edited by Ayman Jaffar (edited October 13, 2000).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!