I am a self learning Java bigginner.
Reference an similar earlier question I posed:
Earlier Question regarding error loading Android VD from Eclipse
After posing the previous similar question It was recommended by a @alextsc that I change my installed jdk version from JDK1.7.0_03 to version jdk 6 as the Android tools only work with version jdk 6 (1.6)
This I have done and then changed the project settings: I checked that the default compliance setting was 1.6 in the Java compiler under project settings and I changed the Run configuration for the project - making sure that the jre was set to version jre6 Plus I changed the windows environment variables to ...java\jdk1.6.0_04
hoping this would allow my project to compile - but it has not!
Now my questions are:
how do I get the project to compile with jdk 1.6?
and what else do I need to configure?
- at the end of the day I just want to install a HelloWorld test program on to Android 1.6 Emulator - run from Eclipse IDE environment.
I did try again to run the default code as follows:
package com.leigh.namespace;
import android.app.Activity;
import android.os.Bundle;
public class HelloWorldActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
I have successfully started Android 1.6 VM from the AVD manager so the VM software appears to be O.K.
and the source code appears to be o.k - and is the default code that should initialize the VM: and this time I received a different error message back, as follows:
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (classFileParser.cpp:3494), pid=5904, tid=3496
# Error: ShouldNotReachHere()
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) Client VM (20.2-b06 mixed mode windows-x86 )
# An error report file with more information is saved as:
# C:\Users\leighman\workspace\HelloWorld\hs_err_pid5904.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
and the log file is here:
--------------- T H R E A D ---------------
Current thread (0x018a9c00): JavaThread "Unknown thread" [_thread_in_vm, id=3516, stack(0x00350000,0x003a0000)]
Stack: [0x00350000,0x003a0000], sp=0x0039f86c, free space=318k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0x1335ba] V [jvm.dll+0x12e56b] V [jvm.dll+0x1639e] V [jvm.dll+0x17bdf] V [jvm.dll+0x26cc5] V [jvm.dll+0x27506] V [jvm.dll+0x278b5] V [jvm.dll+0x27949] V [jvm.dll+0x27a0c] V [jvm.dll+0x27a8a] V [jvm.dll+0x27b6d] V [jvm.dll+0x27e39] V [jvm.dll+0x6c383] V [jvm.dll+0x6c75c] V [jvm.dll+0xf9b4c] V [jvm.dll+0x11848b] V [jvm.dll+0x9eb60] C [javaw.exe+0x1657] C [javaw.exe+0x1e2c] C [javaw.exe+0x8614] C [kernel32.dll+0x4ed6c] BaseThreadInitThunk+0x12 C [ntdll.dll+0x6377b] RtlInitializeExceptionChain+0xef C [ntdll.dll+0x6374e] RtlInitializeExceptionChain+0xc2
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
Other Threads:
=>0x018a9c00 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=3516, stack(0x00350000,0x003a0000)]
VM state:not at safepoint (not fully initialized)
VM Mutex/Monitor currently owned by a thread: None
Dynamic libraries: 0x00400000 - 0x00424000 C:\Program Files\Java\jre6\bin\javaw.exe 0x77bf0000 - 0x77d2c000 C:\windows\SYSTEM32\ntdll.dll 0x77410000 - 0x774e4000 C:\windows\system32\kernel32.dll 0x75f20000 - 0x75f6a000 C:\windows\system32\KERNELBASE.dll 0x76220000 - 0x762c0000 C:\windows\system32\ADVAPI32.dll 0x776c0000 - 0x7776c000 C:\windows\system32\msvcrt.dll 0x76370000 - 0x76389000 C:\windows\SYSTEM32\sechost.dll 0x760a0000 - 0x76141000 C:\windows\system32\RPCRT4.dll 0x775f0000 - 0x776b9000 C:\windows\system32\USER32.dll 0x77340000 - 0x7738e000 C:\windows\system32\GDI32.dll 0x77d80000 - 0x77d8a000 C:\windows\system32\LPK.dll 0x774f0000 - 0x7758d000 C:\windows\system32\USP10.dll 0x77390000 - 0x773af000 C:\windows\system32\IMM32.DLL 0x76150000 - 0x7621c000 C:\windows\system32\MSCTF.dll 0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll 0x6d7f0000 - 0x6da9f000 C:\Program Files\Java\jre6\bin\client\jvm.dll 0x73fb0000 - 0x73fe2000 C:\windows\system32\WINMM.dll 0x75c80000 - 0x75ccc000 C:\windows\system32\apphelp.dll 0x6d7a0000 - 0x6d7ac000 C:\Program Files\Java\jre6\bin\verify.dll 0x6d320000 - 0x6d33f000 C:\Program Files\Java\jre6\bin\java.dll 0x6d370000 - 0x6d399000 C:\Program Files\Java\jre6\bin\jdwp.dll 0x6d690000 - 0x6d696000 C:\Program Files\Java\jre6\bin\npt.dll 0x6d7e0000 - 0x6d7ef000 C:\Program Files\Java\jre6\bin\zip.dll 0x76090000 - 0x76095000 C:\windows\system32\PSAPI.DLL
VM Arguments: jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1554 -Dfile.encoding=Cp1252 -Xbootclasspath:C:\Program Files\Android\android-sdk\platforms\android-4\android.jar java_command: com.leigh.namespace.HelloWorldActivity Launcher Type: SUN_STANDARD
Environment Variables: CLASSPATH=.;.. PATH=C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter\Driver;C:\Program Files\Windows Live\Shared;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Profram Files\Java\jdk1.7.0_03\bin;C:\Eclipse\eclipse; USERNAME=leighman OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 6 Model 28 Stepping 10, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 Build 7601 Service Pack 1
CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 28 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, ht
Memory: 4k page, physical 1037616k(107780k free), swap 2086192k(357112k free)
vm_info: Java HotSpot(TM) Client VM (20.2-b06) for windows-x86 JRE (1.6.0_27-b07), built on Jul 19 2011 01:04:42 by "java_re" with MS VC++ 7.1 (VS2003)
time: Sun Jun 17 12:41:45 2012 elapsed time: 0 seconds
Any Help would be appreciated.