r10061 MarkieB - /branches/MarkieB/javafront/Docs/BUILDING-java

netsurf at semichrome.net netsurf at semichrome.net
Mon Feb 15 13:20:19 GMT 2010


Author: MarkieB
Date: Mon Feb 15 07:20:19 2010
New Revision: 10061

URL: http://source.netsurf-browser.org?rev=10061&view=rev
Log:
build instructions

Added:
    branches/MarkieB/javafront/Docs/BUILDING-java

Added: branches/MarkieB/javafront/Docs/BUILDING-java
URL: http://source.netsurf-browser.org/branches/MarkieB/javafront/Docs/BUILDING-java?rev=10061&view=auto
==============================================================================
--- branches/MarkieB/javafront/Docs/BUILDING-java (added)
+++ branches/MarkieB/javafront/Docs/BUILDING-java Mon Feb 15 07:20:19 2010
@@ -1,0 +1,50 @@
+the java class lib is written in NetBeans to simplify the gui design; so to simplify adaptation of it, simply import it as a NetBeans project
+
+then to build 'manually', simply
+$ cd java/NetSurfJava
+$ ant
+
+[you'll need ant for that obviously :o) ]
+
+an alternative should be javac
+
+$ cd java/NetSurfJava/src
+[$ mkdir ../build && mkdir ../build/classes]
+$ javac -d ../build/classes netsurfjava/Main.java netsurfjava/NetSurf.java netsurfjava/NSView.java
+
+then jar
+[$ mkdir ../dist]
+$ cd ../dist
+$ jar cef netsurfjava.Main NetSurfJava.jar -C ../build/classes netsurfjava
+
+
+
+the ant build should be added to the makefile in the future
+for ant to work you need at least java/NetSurfJava/build.xml, java/NetSurfJava/nbproject/build-impl.xml
+as well as the .java files in java/NetSurfJava/src/netsurfjava
+
+the java jar calls the c lib that the Makefile target 'java' produces
+
+$ cd ../..
+
+to regenerate the java header file
+
+from ./java directory
+
+$ javah -classpath NetSurfJava/dist/NetSurfJava.jar -o netsurfjava.h \
+	netsurfjava.Main netsurfjava.NetSurf
+	
+$ cd ..
+$ make TARGET=java
+$ cd java/NetSurfJava
+
+the include paths - originally from i386 ubuntu - are hard-coded into the Makefile @ll 480 et seq, so although it *may* be possible to compile for different architectures / OS's, at the very least those paths should need looking at; bear in mind several flags in the 'java' target are derived directly from the 'gtk' target, so would need altering for different OS's;
+it may not currently implement properly for [native] 64-bit, as the pointer arithmetic - see particularly netsurfjava.c - may need adapting
+
+so then a normal invocation of NetSurfJava is hence
+
+$ java -jar dist/NetSurfJava.jar [-v] [http://localhost/]
+
+currently the pathnames to resources in the c code are relatively hard-coded relative paths from the NetBeans project folder location, so it may well be necessary to make sure the jar file is in its original location - at least make sure you call it from the java/NetSurfJava/ directory
+
+Eventually the gui design should be rewritten manually - once the final design is happily settled




More information about the netsurf-commits mailing list