So initially my goal is to modify MY copy of a network monitoring tool to add to its html an EXTRA option in the navigation menu so I can relocate to html.net for example when someone clicks that menu item. The tool is written in Java using struts and it took me 1 week fo searching throguh the files and folder to finally find the .class for one of the menu items named Dashboard
From the struts.config.xml I found that Dashboard.jsp is one of the menu's files....I am probably confusing you so please ignore anything that DOES confuse you...
Long story short its all in something called servlet which I am not familiar with...
So to modify the html thats in the .jsp file I have to change the .class because in the files or folders the source code isnt there so its all precompiled...I decompiled the class for Dashboard_jsp.class and got this: http://pastebin.com/UkspReDu
Now I just need help figuring out what this is because I have never worked with this before...I need to add an extra menu item or make it so when a user clicks on the Dashboard tab it relocates to html.net I dont know what line to modify here...I need help with that. Then I can recompile and replace old .class with new.
Related
I am trying to edit an existing java transformation in a mapping. I'm getting a compilation error.
org.json does not exit.
How can I fix this?
Note: This is occurring in existing code. I just changed the output column length in output port.
I have found that sometimes when I edit an existing Java transformation, I lose any jar files I've added to the classpath. In this case you need to go back to the Java transformation, click the Settings link underneath the code tabs. This will bring up a list of jar files that are being used. If the one that contains the org.json package (org.json.jar) isn't listed then you need to re-add it. Click Browse, navigate to the location of the missing jar file, then click the Add button. Compile and save and the error should go away.
I'm new to Java/Eclipese. I'm following this tutorial on youtube. I'm trying just to delete some empty packages and some files that I don't need anymore. However, Eclipse is not letting me do so. I've also selected files that I want to delete --> go to Edit menu --> Delete. The Delete option is grayed out.
How to delete a file/package in Eclipse?
Thanks for helping
Just delete the root folder from your code base. Suppose your code is in C:\Mycode and you package folder start from C:\Mycode\myproject\src\com\mypackge\bla\in\etc just delete folder mypackage manually and refresh the project in eclipse.
I at least remove package like that once created.
Deleting shouldn't be a problem most of the times. I generally use the context menu by right-clicking on the resource to be deleted and select delete from it. Maybe one of the resources you selected (it sounds like you mulit-selected items) can't be deleted for some reason leading to the inactivation of the menu-item. Doing it one-by-one should give you an idea which item is the culprit.
If that doesn't help you should tell a bit more, e.g. showing the hierarchy of your actual eclipse-project where you try to delete resources from and error-messages that might show up in the process of trying to delete stuff.
I might be using the wrong term when talking about "sync" but that's the best way to descrie it I think. I'm trying to debug a project that I've been working on for a couple of days now but for some reason the .java class and the .class file aren't syncing (.class file isn't updating to any of the changes that I make to the .java class that I'm editing). Let me start from the beginning I guess, when I do add break points to my .java file (sometimes the breakpoints are skipped) that I'm debugging and run the debugger when the breakpoint is reached the .class file is opened in instead of the .java file.
I searched around and found the solution to that with the help of some topics on here, which was "Edit source lookup". So the part about .class opening instead of .java file instead was solved. The main problem now is when I do edit the .java file with anything and run the debugger it completely ignores my changes. For example, if I implement a System.out.println("Test: 1") before a breakpoint or even after it's not printing to the console. Another example is if I comment out a line of code and run the debugger, the debugger still executes that line of code that I just commented out.
I searched for some solutions but they didn't help much. Some things I've tried were but did'n work:
Why isn't Eclipse updating the classes?
1.) Make sure the Build automatically is checked
2.) Cleaning the project
3.) Refreshing the project, F5
4.) Go to Wwindows->Preferences->General->Workspace and making sure the first 2 checkboxes are checked.
5.) Saving
6.) Restarting ecslipse
If anyone knows how to maybe solve my propblem I will be indebted to you. By the way I'm using java 1.7
What you describe indicates problems in you project definition.
Make sure that your project (main runnable class) specifies correct dependencies - that it does not specify dependencies on other jar files but includes dependencies from your related projects
I am using JFormDesigner to develop a Swing application. However I can't seem to get the package to generate java code. I tried saving the form and also pressing the "Generate Java Code" button, but it is not working. Is there some setting that I need to put in place for this to work?
Here is an uppdate. The generated code file is in my workspace directory, but Eclipse is not refreshing the file. Also, I note that the icon next to the file name in the navigator view looks different than normal java files. So really, this seems to be a problem with Eclipse refreshing. And yes, I've tried manually refreshing. But it is not doing this. Why would that be?
Thanks,
Elliott
The code is there. But is collapsed. You need to click on the + sign next to the position in the module where the generated code should be and it appears.
Currently I am trying to embed a Java applet onto a webpage, and the only result I get is the java logo spinning and an empty loading bar.
example
I can't tell if its an error in my Java code or if I did something wrong with the HTML file.
Here is what I have for HTML.
<applet>
archive="game.jar"
code="BRANDON.GameApplet.class"
width=800
height=600
</applet>
BRANDON is the package I created with the rest of my files and GameApplet is the class which has the applet necessary methods. The game.jar is located in the same location as my HTML file, and the GameApplet class file is located in the jar within the BRANDON folder. The applet runs just fine in eclipse when told to run as an applet so I can't imagine it being a problem with the Java code.
My suspension is that it is a problem with file placement but every variation I try comes up with similar results. Anyone know what the mysterious loader means, and what I am doing to cause it?
Thanks to anyone who might answer.
EDIT: Just enabled the developer console and the only output it gives me is:
APPLET tag missing CODE parameter.
I don't know how much this helps.
Enable the Java Console so you can see the error messages and take appropriate action.
edit: You need it inside the applet tag
<apple code="..." ...>
now it is just some text inside the tag.
My suspicion is that your class files are simply not being found, though I don't have enough info to know for sure. Some thoughts:
double-check the file structure inside of game.jar. e.g. GameApplet.class should appear in the BRANDON/GameApplet.class folder relative to the root of your jar file.
check that your folder names and class names are correct
check that when you jar'd your applet, you didn't forget to include class files. I have jar'd all of my source files before, forgetting to compile them before creating the jar