After adding <item>170,000</items> to string.xml. It becomes so slow in building workspace, I increase my heap space and jvm memory, but is still slow I had to wait 4 hours after every edit to save on eclipse before i think of running the program.
Any solution please? (Am using gnome 3.0 on ubuntu 11.10).
Instead of placing strings in string.xml, why don't you try placing a file inside /res/raw and when the app starts for the first time you insert it into a db?
It's not clear to me exactly what you are doing. How are you building this XML file? Perhaps you are using Java string concatenation? That will certainly be extremely slow. I would do it using something like an XMLStreamWriter. But you need to describe your scenario in more detail, for example I don't see where Eclipse comes into it.
Related
I wrote a java program, which manipulates Word documents (docx) with Apache POI. It runs fine within Eclipse, and it runs fine as a runnable JAR on my computer (Windows 10).
I copied that JAR to another computer, and it is starting up normally. The GUI behaves like expected.
The problem is the Word document I write out (docx).
I am performing two types of changes. The first one is the addition of new paragraphs or concatenation of content to the runs. If I stay with this, the document gets written into the file system correctly. The second type is the simple replacement of content within the runs (changes of words and some grammatical changes). I would see that part as the "simpler" one, but if I stay with this or if I combine both change types, no document is written out at all. It does look like there is a bug, but there isn't one because it worked fine on my system.
I wrote myself a function to write out an error log (txt) to get information about that issue. This one worked on both systems. But the log didn't get any information, why the document was not written out.
I suppose there are some Windows security settings which interfer with my program or something like that. The computer that does not like to run my program has Win 7 installed on it, and there are some security domain settings, which affect all other computers in the local network.
Does anyone experienced something similar yet? Any suggestions what to check? Suggestions how to find out if an error happened are appreciated as well.
OK, the problem got solved by simply updating the Java version. I saw that update icon in the system tray, which didn't open update the update dialog. So I wanted to update the Java-version at least.
When I wanted to de-install the current Java version first, I noticed that the Win7-machine hadn't a Java-update for three years now. It was just installed in 2014. As soon as the recent version was installed, everything worked like expected again.
The strange behavior that some parts of my program worked and some not, confused me. I hoped that the Java update would fix this, but I doubted that. I didn't knew that old versions make programs run unpredictably.
I am currently trying to have Logstash work on Solaris with the File Input method. But I am encountering some bugs (see LOGSTASH-665). After digging a lot, it appears that native support for File.stat on my system (SunOS 5.10, JDK 1.6.0_21, 32 bit) is totally deficient, so I am looking for a way to properly handle it.
Specifically I want to access the inode information. Based on the metadata I can gather about the file (like its path and whatever is available on solaris), I want to calculate a number which is unique for that file, and which changes when the file is replaced by another file which has the same name. At first I thought about simply using a hash of the file path and used this function as a replacement, but indeed, when the file is rolled over the number does not change, so I need to also access the ctime information...
..Or make a system call to get the ls -li result to get the real inode number by another way.
Problem is that I never used ruby before, I am more used to java, so I am struggling to find a solution. Every suggestion will be appreciated.
The best solution I know of is to wrap the native call using JNI or JNA.
There do appear to be a couple of projects that have done this, although I haven't used either of them. See this question: Is there a Java library of Unix functions?
Is there a library or way to have a live command line that instead of printing out each line works like a graphics library where you can just update one element if it has changed?
Example of usage would be to display current time. Instead of refreshing the cmd and appending more things to it, you just update the current time object and reprint or something.
Yes, there is, although it is not 100% pure Java (despite of what the web page says):
http://code.google.com/p/lanterna/
It works very well and it is easy to use. Development is a bit slow but the developer does answer questions. I recommend checking the Terminal Layer, which is perhaps what you need.
I tried to reimport my android project on eclipse to solve a problem but I accidently overwrote all my files in the project. All of them had been corrupted which means their size is now 0B...
I tried to use Local History but it's useless since my project is no longer in my workspace, same for .metadata.
I also tried to use Recuva (Software for recovering files) which see my files with their real size but when I try recover them, their size is always 0B...
I lost about 7 days of work and I don't really want to rewrite my code using Java Decompiler...
So my question is, is there any solution to recover that files ?
I wrote 200 lines of code and suddenly system restarted. I lost all code. But I recovered data from eclipse's local history. Right click on the file -->replace with-->previous from Local History
Eclipse has a local history, although by default it's set very low - one of my first tasks when setting up a new development machine is to up the values (in addition to my other version control)
If you do have a history you can right click on your class, and select compare with local history.
You could try decompiling with something like JD-GUI. It might not be as onerous as you think. Obfuscators exist for a reason.
It is not really programming question, but i had similar situation and "Mini Tool Power Data Recovery" tool helped me (it is paid tool, free version exists, but maybe you can search in this direction and find something open source). I tried some another tools then, but with no results.
I'm working on a project on Eclipse, more specific RAD build. The EAR file exported is around 40 mb, last week it was taking 1 minute, today its taking more than 10 minutes.
I didnt change much code, nor changed any config related to the JVM.
I export directly from RAD, right click on the project and export EAR.
So whats going wrong?
Thoughts:
Clearly something is different. What could it be?
Your app: Could you now have lots more little graphics files or some such?
Your app: could you be referencing some external resource eg. XSDs from somewhere remote, is it generating code at this point with some such reference?
Environment: Disk drive. Are you exporting to some nearly full disk? Or a network drive that's suddenly really slow, or somehow a revision control system is trying to adopt what you are exporting.
Environment: Memory. I've seen Eclipse get stupidly slow when paging is happening. Could you just have increased your memory usage a tad or now be running something new in the background?
As none of those apply (you really sure?) then I would do this:
take the app to another workspace
take the app to another machine
Break the app down to pieces, binary chop until you find what the expensive bit
The problem is fixed, im not sure which of these fixed it, but one of them did:
The output folder was shared on the network, stopped the sharing
Defragmented the disk
Emptied the Recycle Bin (it had almost 5 GB)
I made them all together, so i not sure which solved the problem, but i suspect one of the first two.
It was a an OS problem, nothing to do with Eclipse.