Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Running a Swing program.  RSS feed

 
Pete Tyo
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn more about Swing / GUI so I am using the sum.com page going through there tutorial. I compiled there first program then tried to run it using command prompt... c:\java HelloWorldProgram
ofcourse, I got an error... Looked in suns running a swing program section and found the following that will run the program...

java -classpath ;C:\java\1nfdir\new1nf.jar HelloWorldSwing

the above works... the question is can I somehow set this classpath so I don't have to type that in all the time... just use java HelloWorldApplication etc...

Thankyou,

Pete
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what C:\java\1nfdir\new1nf.jar refers to. I'd say the problem lies in your error message that you didn't show us. If you are running a java program that just uses the standard Java API then there is no need to specify the classpath.

Why don't you start by showing us the error message you received and then we can go from there.
 
Pete Tyo
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,should have posted the error. Needless, to say I typed
C:\java HelloWorldProgram

and the dang thing worked.. Not really sure what happened, but for now I suppose there is no problem anymore..

Thanks anyway,

Pete
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!