|
long-rear end nips Diane posted:I'm updating 30 year old logistics software that's been converted from like COBOL and Power-something(I can't remember the actual name) to Java using some proprietary tool. I know it interfaces with Weblogic and Oracle DB stuff but from the conversation I had with my manager I'd be working in pure Java 99% of the time. Well, Weblogic is an application server so look at Web applications and databases. Depending how deep in the JavaEE hole they went, you will probably need to look into ORMs (JPA and hibernate probably), maybe JSF/JSP . Other than that ... application converted from COBOL to Java: good luck. On the other hand, i wouldn't worry to much about it. They'll train you on-site on the specific things they'll need. Therefore, some Java familiarity is all you need, at which point the Oracle tutorial is fine.
|
# ? May 12, 2017 18:42 |
|
|
# ? Jun 1, 2024 18:48 |
|
long-rear end nips Diane posted:I just got my first programming job out of college, and they're using Java & the Eclipse IDE. I have literally zero experience with either, since all my undergrad work was either in C++ or Python. I'm going through the Java w/ Eclipse tutorial that's linked in the first post, but does anyone have a good recommendation for where to go after that? I've got a little under a month before I start, and while there will be training at work I'd like to be at least a bit familiar with all of this stuff before I start, just so I'm not totally useless. Where did you go to school that undergrad was all C++?? Just read all the official Java tutorial tracks, they're good.
|
# ? May 12, 2017 20:40 |
|
Zaphod42 posted:Where did you go to school that undergrad was all C++?? A mix of Austin Community College and University of Houston. Everything up through Data Structures & Algorithms was in C++, and then once I got into more advanced and elective stuff it was either theory and no coding or choose your own language, so I ended up working a bunch with python. I've spent about an hour on the Eclipse tutorials linked in the OP and they're good, moving a little slowly so I'm probably just going to skim the rest of the videos and go into the official tutorials. Thanks for the help, both of y'all.
|
# ? May 12, 2017 21:08 |
|
long-rear end nips Diane posted:A mix of Austin Community College and University of Houston. Everything up through Data Structures & Algorithms was in C++, and then once I got into more advanced and elective stuff it was either theory and no coding or choose your own language, so I ended up working a bunch with python. Huh, I graduated from UT Dallas 7 years ago and we were using mostly Java with a little bit of C++ and Python here and there, and even back in high school in Austin we were using mostly Java. My Data Structures & Algorithms was in java. C++ is good poo poo but Java's definitely very marketable right now. Probably the two best languages to know. (After that, javascript and objective-c? )
|
# ? May 12, 2017 23:07 |
|
I got hired because I know Java Swift and Python, which seems to be the big three corps care about here in Detroit (there's also a fuckton of embedded c++ stuff)
|
# ? May 12, 2017 23:35 |
|
long-rear end nips Diane posted:I'm updating 30 year old logistics software that's been converted from like COBOL and Power-something(I can't remember the actual name) to Java using some proprietary tool. I know it interfaces with Weblogic and Oracle DB stuff but from the conversation I had with my manager I'd be working in pure Java 99% of the time. You're going to see some seriously hideous poo poo in this codebase, I guarantee it. Just bear in mind that the Developers thread is here and please feel free to post any questionable design (anti-)patterns and development practices so that we can
|
# ? May 12, 2017 23:44 |
|
long-rear end nips Diane posted:I'm updating 30 year old logistics software that's been converted from like COBOL and Power-something(I can't remember the actual name) to Java using some proprietary tool. I know it interfaces with Weblogic and Oracle DB stuff but from the conversation I had with my manager I'd be working in pure Java 99% of the time. Power Systems? You will be maintaining the generated output of the COBOL-to-Java conversion? I've seen that stuff before. It's "pure Java" in the sense that it's syntactically valid Java code (or in my experience, not quite valid).
|
# ? May 13, 2017 00:11 |
|
I'm learning Java now. This compiles, runs, and prints horse: code:
Or, is ternary in Java just syntatic sugar for an if statement, and it actually translates into two code paths, with their own copy of System.out.println?
|
# ? May 13, 2017 19:20 |
|
The primitive is autoboxed to a Long object during compilation, so both will be references.
|
# ? May 13, 2017 19:30 |
|
long-rear end nips Diane posted:I just got my first programming job out of college, and they're using Java & the Eclipse IDE. I have literally zero experience with either, since all my undergrad work was either in C++ or Python. I'm going through the Java w/ Eclipse tutorial that's linked in the first post, but does anyone have a good recommendation for where to go after that? I've got a little under a month before I start, and while there will be training at work I'd like to be at least a bit familiar with all of this stuff before I start, just so I'm not totally useless. Uninstall eclipse and install intellij idea
|
# ? May 13, 2017 19:33 |
|
MercurialOne posted:I'm learning Java now. You can use the javap command to see what the bytecode looks like. In this case, it looks like this: code:
|
# ? May 13, 2017 19:44 |
|
MercurialOne posted:I understand why/how it works, but what I don't get is how it translates into bytecode. A long and an object reference are different sizes, does it not matter which one you're talking about when setting up the call stack? Well, let's look at how it ends up in bytecode. Starting with this Horse.java: code:
code:
So then iconst_1 pushes 1 onto the stack and istore_1 saves that 1 into the local variable indexed by 1; that's your boolean x = true. Then ldc pushes an item from the reference pool, in this case "Horse", and astore_2 saves that reference into the local variable indexed by 2; that's String s = "Horse". getstatic pushes an item from the static reference pool, in this case System.out. iload_1 loads the value from variable 1, which is 1 (from iconst_1 originally). This is going to be the boolean x. ifeq tests the current stack (1) against 0, which will fail. If it had succeeded it would have branched to line 16. Since the test failed (1 was not 0), next up is aload_2, loading the reference in variable 2 onto the stack, which is "Horse" (from astore_2). Then an unconditional goto to line 20 to skip over the 1L code. On 20, continuing execution, invokevirtual #5, calls whatever method the Horse class has in its constant pool at index 5, which is PrintStream.println(Object), which will print "Horse" since Horse is on the stack. And then 23 will return out of main. On 16, lconst_1 will load the long constant 1L onto the stack, and then on 17 invokestatic #4 does basically the same thing as invoke virtual to convert the Long to a String through valueOf. EDIT: refresh before posting.
|
# ? May 13, 2017 19:59 |
|
M31 posted:The primitive is autoboxed to a Long object during compilation, so both will be references. Would it have given an error before autoboxing existed?
|
# ? May 13, 2017 22:39 |
|
I've been asked to mess with an API that's giving me a hell of a time getting started. I downloaded the source and built it in Maven just fine, but the resulting .jar is apparently missing a ton of dependencies and tracking them all down is a pain. The pom defines the build as jar-with-dependencies but the resulting jar doesn't have them. I'm not terribly experienced with Maven and dependency management, so it's highly possible I'm loving something up. Anyone have any experience with FetchApp? The compiled jar is only 43kb and seems to have all the API classes/methods but fails to compile due to a mountain of ClassDefNotFound errors, mostly from apache commons and jetty. Edit: finally tracked down all the libraries independent of the product. Good lord if they're going to leave them off at least let us know which ones we need. drat thing doesn't have any documentation either. PierreTheMime fucked around with this message at 00:04 on May 14, 2017 |
# ? May 13, 2017 23:03 |
|
smackfu posted:Would it have given an error before autoboxing existed? It wouldn't compile before autoboxing existed. code:
|
# ? May 13, 2017 23:12 |
|
Dare I ask why you have a copy of Java 1.4 laying around?
|
# ? May 13, 2017 23:44 |
|
Volmarias posted:Dare I ask why you have a copy of Java 1.4 laying around? You can still download 1.4, which is what I just did.
|
# ? May 13, 2017 23:48 |
|
Zaphod42 posted:Huh, I graduated from UT Dallas 7 years ago and we were using mostly Java with a little bit of C++ and Python here and there, and even back in high school in Austin we were using mostly Java. My Data Structures & Algorithms was in java. My first class at Stanford was some sort of fake Java with custom libraries (to teach OOP), second class was C++11 (to teach file systems, threads, processes, and... mapreduce? I don't remember), and then I used nothing but C until I graduated. Now I use only Java and some python scripts at work hah. I'm 9 months in, and will be mentoring a new hire from UT Dallas. Good to know that he's actually has way more experience with the language.
|
# ? May 16, 2017 17:04 |
|
I am writing a plug-in for a tool called burp suite. In it, there is an class called ScanIssue which has an interface in am implementing a new classcalled CustomScanIssue Here is a link to a java file that uses the same class I have implemented before. The CustomScanIssue is near the bottom of that file. In that same project are the interfaces for everything burp related. https://github.com/nVisium/xssValidator/blob/master/burp-extender/src/burp/BurpExtender.java Now the issue is something changed in my environment (started with 1.8 and what I have been using all this time) that is now causing an error that is yelling at me to create the three methods for the httpinterface class. I do the bare min (port method returns an integer, return a 0 ) but it is saying it is still wrong. I forgot what it says exactly, but the three methods from httpinterface (getport, gethost, and getprotocol ) that I create in CustomScanIssue are are highlighted as being wrong. Is this where I use the "super.getPort()"? Any guesses what was the setting that changed that allowed this code to exist before that is now preventing it from working? I thought it could be compliance but I don't think its that.
|
# ? May 17, 2017 03:35 |
|
When you say "httpinterface," do you mean the "IHttpService" interface? If so, the problem would be that CustomScanIssue doesn't implement IHttpService, so the @Override annotations are incorrect. That doesn't quite gel with what you're asking about, though. Can you provide more information about the errors you're seeing?
|
# ? May 17, 2017 04:29 |
|
I've decided to start learning how to use Maven, but when I start up a new Maven project in IDEA with the org.apache.maven.archetypes:maven-architype-j2ee-simple archetype, the generated/downloaded project already has errors. For example, IDEA can't find the plugin org.apache.mavin.plugins:maven-javadoc-plugin and the POM has two errors: there's a <module>site</module> tag that IDEA says can't be resolved (I think that might be because I don't have a site project yet, maybe?). The other is in this tree:XML code:
|
# ? Jun 12, 2017 01:31 |
|
Which tools are you guys using for memory profiling. Our customers are reporting slowing down after a couple of days :-(
|
# ? Jun 12, 2017 08:37 |
|
hooah posted:IDEA says that the unzipCommand element is not allowed there. Should I just have not used an archetype in the first place? It seems silly to have something provided for use that doesn't work out-of-the-box. IDEA errors on pom files are not "real" errors, more like warnings. Running it with Maven will show you whether it's an actual problem.
|
# ? Jun 12, 2017 13:12 |
|
I've got a Java EE application with GWT. I'd like to add Doom or something as an easter egg. What's the easiest way to embed it in a page?
|
# ? Jun 14, 2017 12:10 |
|
I've been working on a java app to learn more about the language (mostly been doing C and Python), and I'd like to make a GUI for it. What framework would you guys recommend for this? Would SWING be alright? Also if that might influence the choice of this, I might turn it into a web app later on.
|
# ? Jun 19, 2017 14:32 |
|
If you use JavaFX, you can use css to style the gui. This could save time if you're going to make it a webapp later.
|
# ? Jun 19, 2017 16:43 |
|
I would definitely choose JavaFX over Swing if you're looking to create a desktop app. But I don't know about running them on the web, is such a thing even possible? If you're just looking for a web framework and want to keep it lightweight, I've been hearing good things about Sparkjava or Spring Boot.
|
# ? Jun 20, 2017 19:55 |
|
I just meant if you went to make a web app, you could use the same css to make it look the same.
|
# ? Jun 20, 2017 20:06 |
|
Snak posted:I just meant if you went to make a web app, you could use the same css to make it look the same. I am not that familiar with the JavaFX CSS, but aren't the web (browser understood) one and JavaFX one quite different? They have similarities, but very few to even hope that one could translate into the other easily. For desktop, just go with JavaFX since Oracle abandoned Swing. On another hand, they kinda abandoned java altogether so ... yeah, that's that.
|
# ? Jun 20, 2017 20:10 |
|
I did not know that. I have used JavaFX quite a bit, but never actually styled it with CSS, I was just told when I was learning it that it could be styled with CSS. That's my mistake.
|
# ? Jun 20, 2017 20:20 |
|
JavaFX is the only reason I still use Netbeans, because of the ease of using Scenebuilder with it. Or have things changed in the meantime regarding Scenebuilder and other IDE's?
|
# ? Jun 20, 2017 20:45 |
|
Snak posted:I did not know that. I have used JavaFX quite a bit, but never actually styled it with CSS, I was just told when I was learning it that it could be styled with CSS. That's my mistake. Oh, it can. It certainly can. And you have common directives like background and color and stuff like that. But compared to what a browser can do and knows, the Java CSS is quite ... primitive. And, not to mention, if you move to the web, just do the styling for the web, don't even look at the desktop application. After all, these are 2 very different mediums to present to the user. Or, go full retard and use the browser like a desktop application (Electron).
|
# ? Jun 20, 2017 20:47 |
|
Snak posted:I just meant if you went to make a web app, you could use the same css to make it look the same. The reason they support CSS in JavaFX is not to enable portability from JavaFX to web applications. It's to enable web designers who should already be familiar with CSS (but not necessarily Java) to style themes for JavaFX programs without having to learn too many new things. Either way, if you're using JavaFX, you should be using JavaFX CSS to separate concerns if you need to do any sort of styling. JavaFX CSS is based on a subset of the W3C CSS 2.1 with some things in 3. There are, however, many differences between JavaFX CSS and HTML CSS. You use JavaFX CSS properties to manipulate class variables, and the property names all use the vendor extension "-fx-". In other words, JavaFX CSS properties and HTML CSS properties are different. For example, you use -fx-font-family instead of font-family, which have similar purposes but are entirely different properties. Unlike its HTML CSS counterpart, -fx-font-family does not support comma-separated font family names. Pseudo-classes in HTML CSS are not really supported, for example ":active" and ":focus". JavaFX Nodes do support ":pressed" and ":focused" which are similar. ":link" and ":visited" are not supported, with the exception of ":visited" for Hyperlink objects. The color model is HSB, not HSL. To learn more about JavaFX CSS, read Oracle's reference for it. Le0 posted:I've been working on a java app to learn more about the language (mostly been doing C and Python), and I'd like to make a GUI for it. What framework would you guys recommend for this? Would SWING be alright? If your intention is to make a web application while teaching yourself the Java language, there's always GWT, assuming you can figure out how to get your existing code to work with it. If you want to make a desktop application first and with the intention of making a web application later on, use JavaFX and do your user interface in FXML. This will enable you to separate your application and presentation layers, and in the long run, you'll find working with FXML for desktop applications similar to working with web application technologies like GWT UiBinder. JavaFX is okay for desktop applications in general, but it does take up a lot of memory when you're doing certain things with it. I still use Swing widgets instead of JavaFX controls for some things, for example displaying logs.
|
# ? Jun 21, 2017 11:39 |
|
Isn't GWT dead by now? I remember using it back in 2008-2009 but that's pretty much it. It was terrible back then, the applications one would create with that were pretty much desktop applications in the browser, which is an extremely dumb idea in the first place.
|
# ? Jun 21, 2017 13:21 |
|
Super basic and silly question, but it's not come up for me before and I was curious: is there a way to apply a String.format() to additional lines of a String variable that contains return characters? I checked around for the usual sources and didn't really come up with anything.
|
# ? Jun 24, 2017 00:40 |
|
How do you mean? Return characters shouldn't matter, it just fills out the placeholders with the arguments you pass
|
# ? Jun 24, 2017 00:47 |
|
baka kaba posted:How do you mean? Return characters shouldn't matter, it just fills out the placeholders with the arguments you pass It applies the format to the first line only, putting additional lines at the first position. I can just split it by the return and loop through the result but I was curious if there was a solution to apply it without that step.
|
# ? Jun 24, 2017 01:04 |
|
Java code:
(Also you can use %n as a platform-specific line break character)
|
# ? Jun 24, 2017 01:29 |
|
baka kaba posted:(Also you can use %n as a platform-specific line break character) I've spent so much time cursing line.separator and never even considered there could be a better way.
|
# ? Jun 24, 2017 08:35 |
|
|
# ? Jun 1, 2024 18:48 |
|
baka kaba posted:(Also you can use %n as a platform-specific line break character) I wish I knew this long ago
|
# ? Jun 24, 2017 16:57 |