1818import org .eclipse .core .resources .IWorkspaceDescription ;
1919import org .eclipse .core .resources .ResourcesPlugin ;
2020import org .eclipse .core .runtime .CoreException ;
21+ import org .eclipse .core .runtime .FileLocator ;
2122import org .eclipse .core .runtime .IPath ;
2223import org .eclipse .core .runtime .IProgressMonitor ;
24+ import org .eclipse .core .runtime .IStatus ;
2325import org .eclipse .core .runtime .NullProgressMonitor ;
2426import org .eclipse .core .runtime .Path ;
25- import org .eclipse .core .runtime .Platform ;
27+ import org .eclipse .core .runtime .Status ;
2628import org .eclipse .jdt .core .ClasspathVariableInitializer ;
2729import org .eclipse .jdt .core .JavaCore ;
28- import org .eclipse .jdt .internal .launching .LaunchingPlugin ;
2930
3031/**
3132 * @author zhou renjian
@@ -49,7 +50,7 @@ public void initialize(String variable) {
4950URL starterURL =AjaxPlugin .getDefault ().getBundle ().getEntry (File .separator );
5051String root ="." ;//$NON-NLS-1$
5152try {
52- root =Platform . asLocalURL (starterURL ).getFile ();
53+ root =FileLocator . toFileURL (starterURL ).getFile ();
5354}catch (IOException e1 ) {
5455e1 .printStackTrace ();
5556}
@@ -61,6 +62,8 @@ public void initialize(String variable) {
6162newPath =Path .fromPortableString (root +"/ajaxrpc.jar" );
6263}else if ("AJAX_PIPE" .equals (variable )) {
6364newPath =Path .fromPortableString (root +"/ajaxpipe.jar" );
65+ }else if ("AJAX_STORE" .equals (variable )) {
66+ newPath =Path .fromPortableString (root +"/ajaxstore.jar" );
6467}else if ("J2S_ANNOTATION" .equals (variable )) {
6568newPath =Path .fromPortableString (root +"/j2stag.jar" );
6669}else if ("AJAX_CORE_SRC" .equals (variable )) {
@@ -71,6 +74,8 @@ public void initialize(String variable) {
7174newPath =Path .fromPortableString (root +"/ajaxrpcsrc.zip" );
7275}else if ("AJAX_PIPE_SRC" .equals (variable )) {
7376newPath =Path .fromPortableString (root +"/ajaxpipesrc.zip" );
77+ }else if ("AJAX_STORE_SRC" .equals (variable )) {
78+ newPath =Path .fromPortableString (root +"/ajaxstoresrc.zip" );
7479}else if ("J2S_ANNOTATION_SRC" .equals (variable )) {
7580newPath =Path .fromPortableString (root +"/j2stagsrc.zip" );
7681}
@@ -87,13 +92,15 @@ public void initialize(String variable) {
8792setAutobuild (workspace ,false );
8893setJREVariable (newPath ,variable );
8994}catch (CoreException ce ) {
90- LaunchingPlugin .log (ce );
95+ AjaxPlugin .getDefault ().getLog ().log (new Status (IStatus .ERROR ,
96+ "net.sf.j2s.ajax" ,IStatus .ERROR ,ce .getMessage (),ce ));
9197return ;
9298}finally {
9399try {
94100setAutobuild (workspace ,wasAutobuild );
95101}catch (CoreException ce ) {
96- LaunchingPlugin .log (ce );
102+ AjaxPlugin .getDefault ().getLog ().log (new Status (IStatus .ERROR ,
103+ "net.sf.j2s.ajax" ,IStatus .ERROR ,ce .getMessage (),ce ));
97104}
98105}
99106//}