• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compiling with the -source flag

 
Joe Lemmer
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

My web server runs Java 1.5, so I'm getting an exception because I am using JDK 1.6 to compile my classes. Running two different versions of the JDK is just confusing me. I can't work out if it's even possible. I read that I can compile using the following:



Can anyone confirm for me that this will produce the same class file as if I had been compiling with the JDK 1.5? I just want to make sure that I have everything right before I try to put things up on the web again.

Thank you guys

Joe
 
Campbell Ritchie
Sheriff
Pie
Posts: 48940
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure not to use any "since 6" classes or methods. I suspect you actually want the -target flag. The -source flag might be useful for avoiding any "since 6" material, however.
 
Joe Lemmer
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great. Thanks very much Campbell.

I've had a look on this page about compiling and you're right, I do want to use -target. Cheers for pointing that out.



Joe
 
Campbell Ritchie
Sheriff
Pie
Posts: 48940
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic