Skip to main content
added 167 characters in body
Source Link
Ingo Bürk
  • 1k
  • 7
  • 12
  • Give your method a proper name. These auto-generated names are pure terror!
  • You can import ActionEvent directly, no need to reference it with the entire package name.
  • Your formatting is unusual at best, I'd call it bad. I know this is, for some reason, the preferred way to set braces in the Linux kernel code, but this is Java, not C.
  • You are using hard-coded file paths. Absolute no-go. What if the user named his main partition D or installed xampp somewhere else – or is using Mac or Linux?
  • Why are you storing the result in Process p if you never use that variable?
  • " // Prints error in red" is a comment that is both completely useless (why do I need to know this right then and there?) and will rot faster than you can imagine.
  • Give your method a proper name. These auto-generated names are pure terror!
  • You can import ActionEvent directly, no need to reference it with the entire package name.
  • Your formatting is unusual at best, I'd call it bad. I know this is, for some reason, the preferred way to set braces in the Linux kernel code, but this is Java, not C.
  • You are using hard-coded file paths. Absolute no-go. What if the user named his main partition D or installed xampp somewhere else – or is using Mac or Linux?
  • Why are you storing the result in Process p if you never use that variable?
  • Give your method a proper name. These auto-generated names are pure terror!
  • You can import ActionEvent directly, no need to reference it with the entire package name.
  • Your formatting is unusual at best, I'd call it bad. I know this is, for some reason, the preferred way to set braces in the Linux kernel code, but this is Java, not C.
  • You are using hard-coded file paths. Absolute no-go. What if the user named his main partition D or installed xampp somewhere else – or is using Mac or Linux?
  • Why are you storing the result in Process p if you never use that variable?
  • " // Prints error in red" is a comment that is both completely useless (why do I need to know this right then and there?) and will rot faster than you can imagine.
Source Link
Ingo Bürk
  • 1k
  • 7
  • 12

  • Give your method a proper name. These auto-generated names are pure terror!
  • You can import ActionEvent directly, no need to reference it with the entire package name.
  • Your formatting is unusual at best, I'd call it bad. I know this is, for some reason, the preferred way to set braces in the Linux kernel code, but this is Java, not C.
  • You are using hard-coded file paths. Absolute no-go. What if the user named his main partition D or installed xampp somewhere else – or is using Mac or Linux?
  • Why are you storing the result in Process p if you never use that variable?