- 164 名前:159 mailto:sage [05/03/13 22:54:48 ]
- >>163
えっと、 createImgeのようにプログラムの入っているjarから データを読み出したいのです 流れは makeで jar fu test.jar game.datとしてpng同様に格納し プログラム側で InputConnection con = (InputConnection)Connector.open( "jar://test.jar/game.dat",Connector.READ, true ); //InputConnection con = (InputConnection)Connector.open( "/game.dat",Connector.READ, true );//←だとjava.lang.IllegalArgumentException: no ':' in URLとなる InputStream in = con.openInputStream(); //←ここでjava.io.IOException: Fail to open RecordStore. test.jarが起きる byte[] buf = new byte[1024]; in.read( buf); }catch(Exception e){ System.out.println( e ); }finally{ if( con != null ){ try { con.close(); } catch (Exception e) {} } } こんな風になってます
|

|