File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes  A fatal error has been detected by the Java Runtime Environment: ADT Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark " A fatal error has been detected by the Java Runtime Environment: ADT Eclipse" Watch " A fatal error has been detected by the Java Runtime Environment: ADT Eclipse" New topic
Author

A fatal error has been detected by the Java Runtime Environment: ADT Eclipse

Rohit Savant
Greenhorn

Joined: Oct 30, 2012
Posts: 21

I am getting the following error whenever i am compiling the class with ADT eclipse.
This class running fine with the normal version of eclipse.

# # A fatal error has been detected by the Java Runtime Environment: #
# Internal Error (classFileParser.cpp:3470), pid=3172, tid=3816 # Error: ShouldNotReachHere() #
# JRE version: 7.0-b147 # Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows #
# An error report file with more information is saved as:
# C:\Users\Rohit\ ANDROID workspace\NASADailyImage\hs_err_pid3172.log # # If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp #


I dont know whats going on. I need to use SAX in my android app.This being my first app,i dont know whats the problem.
please help guys.




Thank you for you help in advance.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Are you trying to run the application as a normal Java app? You can't do that - I believe the files are further compiled whenever they are part of an Android project and the resulting byte code can not be run in a normal JRE. For testing purposes (before bringing it to the emulator) it is best to get the Android Unit Test framework and run the tests from there.


Steve
Rohit Savant
Greenhorn

Joined: Oct 30, 2012
Posts: 21

Yes i was trying to run it as normal java program for testing purposes. I didnt knew the code will get converted to dex code even without emulator.
I have never used Android Unit Test framework. I will try to learn how to use it. If anybody has good sources from where to learn test framework please tell me.And a good android book if possible.

Thankyou
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Rohit Savant wrote:Yes i was trying to run it as normal java program for testing purposes. I didnt knew the code will get converted to dex code even without emulator.
I have never used Android Unit Test framework. I will try to learn how to use it. If anybody has good sources from where to learn test framework please tell me.And a good android book if possible.

Thankyou


I have been using Android In Action (on Amazon) to learn. It does not cover unit testing, though.

See the android network for instructions on how to use Android UnitTest framework with eclipse. It isn't hard. It basically comes down to:

* Write the code you want as part of the application in your main Android project
* Create an Android UnitTest project (make sure you add reference to the main Android project)
* Create a Test class that extends one of the Android TestCase classes. See the API for TestCase for some examples
** For POJO-type testing, I use the base TestCase class.
** For testing Activity or Service life cycles I use the appropriate extensions
* Methods that you want to run as tests should start with the name test.
* Methods should be short, test one aspect of the program.
* You should include tests which will break the code to make sure you handle them
* TestCase has a series of Assert functions you use to make sure you get the expected results.

edit:
I forgot - you run the Android Test project, not the main Android project.
Rohit Savant
Greenhorn

Joined: Oct 30, 2012
Posts: 21

Thank you Steve.!
 
Consider Paul's rocket mass heater.
 
subject: A fatal error has been detected by the Java Runtime Environment: ADT Eclipse