ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. NeXeN oh i forget, that was a while ago. just the way bytebuddy works. it's like feature detecting or whatever
  2. nimaje feature detection by compiling small test programs and detecting if they fail to compile in the configure phase? yeah, that's an approach you can take for feature detection, but normally you redirect the stderr/stdout of those test compilations then
  3. Para Might be a bad tool but also the only tool to do something complex where that approach is the only reliable one.
  4. Para Fingers to ears, say "la la la"
  5. nmourey I'm working on a program with netbeans-dev with java 25 Fedora 44 I keep getting these errors : Decompress.java:788: error: class, interface, enum, or record expected AND Decompress.java:9: error: compact source file should not have package declaration -- Thanks
  6. cheeser ~show us
  7. javabot Paste the code (and any errors) in a pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
  8. dreamreal and is this limited to netbeans, what happens when you compile outside of netbeans
  9. ptomli NeXeN: it's CDO, with the letters in the correct order, like they're supposed to be
  10. nmourey ~testcase
  11. javabot nmourey, sscce is a minimal independently runnable program, which demonstrates the problem; see http://sscce.org/ for details and a HOWTO
  12. nevet Short, Self Contained, Correct Example
  13. nmourey Compiling failed outside of netbeans with the same errors.
  14. dreamreal so where's the pastebin?
  15. nmourey This is all I have for now : I have the followign error : Decompress.java:9: error: compact source file should not have package declaration - How do I make this use class path instead? Is this something that I can do in Netbeans? I have tried javac * but still got the error.
  16. dreamreal Do you have the source?
  17. dreamreal I mean, we can't see what you're looking at.
  18. dreamreal At all.
  19. nmourey It's not so much is the code correct but why will one .java file use a package name "package org.nmourey;" before my imports and I have no errors. Then I try and using the same package or import and I gives the above errors now. Also, FYI I tried to import that package from another class and It stopped working as an import or package. Whew.. It's that last part that really has me puzzled.
  20. Para we need to see the code
  21. sepult compact source file
  22. sepult when it's a compacting source file it shall have no packages
  23. sepult where is the compaction going on ?
  24. dreamreal ... maybe I'm missing something. "Compact source file?"
  25. sepult right
  26. sepult i think you need to know what that means
  27. sepult i don't know either
  28. dreamreal I feel like this is supposed to be java, and java's pretty simple and straightforward
  29. dreamreal so if it's not, someone's doing soemthing wrong
  30. sepult but it seems to me if something is trying to compact something .... and it contains packages then it's against compaction....
  31. sepult so you have to know where it comes from
  32. dreamreal sepult: in a java context none of that makes any sense whatsoever
  33. sepult what is in your env, what is in your soure what is your flags etc.
  34. sepult https://openjdk.org/jeps/512
  35. javabot sepult's title: "JEP 512: Compact Source Files and Instance Main Methods"
  36. nevet JEP 512: Compact Source Files and Instance Main Methods
  37. dreamreal okay, THAT establishes some context, IF nmourey if talking about that
  38. sepult import module java.base
  39. dreamreal nmourey: ^^^ are you?
  40. sepult hah
  41. sepult seems this is all early stuff, which hasn't made into the real stuff yet
  42. sepult proposals
  43. dreamreal I think jep512 is out
  44. sepult another time where that pops up is when the right path for the jdk can't be found for some reason....
  45. dreamreal but I don't know why NETBEANS would care about it all that much
  46. sepult what is your jdk version ?
  47. dreamreal Mine? 17, 21, 25, with temurin, graalvm, azul as a matrix
  48. sepult it's basically morphing java to a new language with new syntax.....
  49. sepult wth
  50. dmlloyd it's not *mandatory*
  51. sepult so where does it get imposed on you then ?
  52. sepult or how rather
  53. sepult I have 26 on win11s even in VMs and 21 on the linux VMs afaik
  54. dreamreal You use "you" very indiscriminately, sepult :D
  55. sepult didn't meddle yet with the new one either
  56. dreamreal nmourey: so here's the thing: you need to show us more of your project, because it sounds like you have a build that's expecting package structures where you don't have one
  57. leppard he said netbeans ide, so he probably didn't configure it properly
  58. dreamreal sure. But we're not going to know that without more information.
  59. dreamreal Although seeing "netbeans" kinda made me smile a little
  60. sepult I only use eclipse and bluej4 and bluej5 so far
  61. nmourey I've started looking around netbeans to see if I may have missed something in the configuration. Still can't find anything.
  62. nmourey It's gotta be something to due with using package or import for my custom library that I have.
  63. nmourey I have included it from several classes and all but one work as packages.
  64. jbosmans if it doesn't show errors in netbeans, but can't run, probably your runtime env is different/wrong/..
  65. jbosmans also, having used netbeans & eclipse & bunch of others, unless it's required to use netbeans and/or a temporary thing, i'd suggest looking into intellij community edition (at least)
  66. dmlloyd ~jep 531
  67. javabot 'JEP 531: Lazy Constants (Third Preview)' can be found at http://openjdk.java.net/jeps/531
  68. nevet JEP 531: Lazy Constants (Third Preview)
  69. jbosmans will be nice ^
  70. nmourey Still end up back here with this error : Decompress.java:9: error: compact source file should not have package declaration
  71. leppard heh
  72. jbosmans nmourey, where should the Decompress class come from?
  73. jbosmans as in, how/why should it be loaded?
  74. jbosmans or rather, how+why
  75. nmourey This java class has worked in the past, until I changed an include from "package" to "import" and back again. It only gives errors from that one file. All other includes work fine.
  76. nmourey jbosmans - Decompress is a custom class.
  77. nmourey The User Interface includes Decompress / Compress / etc.
  78. jbosmans right
  79. jbosmans so are you sure you are running with java 25+ (iirc) ?
  80. nmourey Yeah.
  81. jbosmans do you have the source shared at like pastebin.com or anything?
  82. jbosmans ~pastebin
  83. javabot Please paste your code and any errors online. For runnable classes, try https://ideone.com/ . For general code and errors, use https://gist.github.com or https://dpaste.org/
  84. nevet https://gist.github.com "Discover gists" || https://dpaste.org/ "dpaste - RED ALERT"
  85. dreamreal nmourey: so does your compact source file have a package statement?
  86. jbosmans well, i made (i think) my first javabot request
  87. dreamreal Is there any reason you haven't been able or willing to show it in a pastebin? It's source, after all.
  88. dreamreal I mean, in context of what we know of your magical mystery file, you have a package declaration and shouldn't