Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java6 ½Å±¾ÒýÇæ(ÓÃJavaµ÷ÓÃJS½Å±¾)µ÷ÓÃjs

Java6 ½Å±¾ÒýÇæ(ÓÃJavaµ÷ÓÃJS½Å±¾)µ÷ÓÃjs
 import java.io.FileNotFoundException;
 import java.io.FileReader;
 import javax.script.Invocable;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
 import javax.script.ScriptException;
 
 public class JavaScriptEngineTest {
     public static void main(String[] args) {
         try {
             JavaScriptEngineTest test = new JavaScriptEngineTest();
             test.testAdd(5, 6);
         } catch (Exception se) {
             se.printStackTrace();
         }
     }
 
     public String getPath() {
         return this.getClass().getResource("/").getPath();
     }
 
 
     public void testAdd(int a, int b) {
         ScriptEngineManager sem = new ScriptEngineManager();
         ScriptEngine jsEngine = sem.getEngineByName("js");
         try {
             jsEngine.eval(new FileReader(getPath() + "JavaScriptEngineTest.js"));
         } catch (FileNotFoundException e) {
             e.printStackTrace();
         } catch (ScriptException e) {
             e.printStackTrace();
     &nbs


Ïà¹ØÎĵµ£º

javaÎļþ±ÈÀýËõС·Å´ó

1Ê×ÏÈÌí¼ÓÐÞ¸ÄͼƬ¿í¶ÈºÍ¸ß¶ÈµÄ·½·¨
public static void reduceImg(String imgsrc, int widthdist, int heightdist) {
  try {
   File srcfile = new File(imgsrc);
   if (!srcfile.exists()) {
    return;
   }
    ......

C/C++ÓÚJavaÖ®¼äµÄ»¥Ïàµ÷ÓÃ

ÀûÓÃJNI¼¼Êõ£¬¿ÉÒÔ×öµ½C/C++ÓëJavaÖ®¼äµÄÏ໥µ÷Óá£
1¡¢Javaµ÷ÓÃC/C++½Ó¿Ú
Õâ¸öÊÇJNI×î»ù±¾µÄÓ¦Óã¬JNIÓкܶàÕâ·½ÃæµÄÀý×Ó´úÂë¡£Ò»°ã°ÑC/C++д³É¶¯Ì¬Á´½Ó¿â£»ÔÚJava³ÌÐòÔÚLoadLibrary£¬ÀûÓÃnative½Ó¿Ú£¬¼´¿ÉÍê³Éµ÷Óá£
2¡¢C/C++»Øµ÷Java½Ó¿Ú
ÕâÖÖÓ÷¨£¬JNIµÄÀý×ӱȽÏÉÙ¡£Æäʵ£¬Ò²±È½Ï¼òµ¥£¬JNIÒ²ÌṩÁËÕâÑùµÄ½Ó¿Ú¡ ......

flex ºÍ java (web)µÄ×éºÏ¿ª·¢

 1¡¢¿ª·¢»·¾³£ºÔÚmyeclipse7.0ÖÐÕûºÏflex plup3.0, °²×°flex plup3.0ʱ,Ñ¡myeclipse ÖÐeclipseµÄĿ¼£¬È»
      ÕÒµ½flex µÄ°²×°ºÃµÄĿ¼£¬½«pluginsºÍfeatures¶ÔÓ¦µ½¿½µ½myeclipseÀïÃæ eclipseÏàÓ¦µÄĿ¼Ï¡£
2¡¢´´½¨ flexºÍ java (Web)µÄ¹¤³Ì(ͨÐÅ¿ò¼ÜÓÃblazeds.war)£º
  &nb ......

Java ÖÐStringÀàµÄÖÕ¼«×ܽá


Ò»¡¢²»±äģʽ£º
Ò»¸ö×Ö·û´®¶ÔÏó´´½¨ºóËüµÄÖµ²»Äܸı䡣
String str1="hello";//´´½¨Ò»¸ö¶ÔÏóhello£¬²»»á±ä£»
System.out.println(str1);
str1+=" world!";//Á½¸ö×Ö·û´®¶ÔÏóÕ³Õ³£¬ÏµÍ³Æäʵ´´½¨ÁËÒ»¸öеĶÔÏ󣬰ÑStr1µÄÖ¸Ïò¸ÄÁË£¬Ö¸ÏòеĶÔÏó£»hello¾Í          & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ