• Post Reply Bookmark Topic Watch Topic
  • New Topic

Running a Java app on Windows XP  RSS feed

 
David Lucero
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
 
fred rosenberger
lowercase baba
Bartender
Posts: 12542
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I must have an enviroment issue. I type javac from the command prompt and Windows does not recongnize it
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks. That worked
 
fred rosenberger
lowercase baba
Bartender
Posts: 12542
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!