• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running a Java app on Windows XP

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can run a java app on a SUN, but I need to run it on my windows box.

I downloaded Java 5 and I am using VIM for windows as my editor.

How do I compile and run it

Thanks
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the process should be the same. if it's a simple application with one or two .java files, from the command line type

javac class1.java

this should build you a class1.class file. then, run

java class1

and it should run. now, there are potential path isssues, and classpath issues, but they may or may not show up depending on how you have things set up. what happens when you try to compile?

note: if you have it working on your SUN box, you don't really need to re-compile for windows. just move over the .class files, and run the

java class1

command.
[ November 03, 2006: Message edited by: fred rosenberger ]
 
David Lucero
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I must have an enviroment issue. I type javac from the command prompt and Windows does not recongnize it
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javac.exe will need to be in your path. Check to see the bin directory of your JDK is in the path via Settings>Control Panels>System>Advanced: Environment Variables, ro by typing set PATH in a command prompt.
[ November 03, 2006: Message edited by: Paul Sturrock ]
 
David Lucero
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. That worked
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Lucero:
I must have an enviroment issue. I type javac from the command prompt and Windows does not recongnize it



ah, see, that bit of info would have been helpful in your original post.

seriously, glad we could help.
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic