Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Source code |
|
1 |
System.setProperty ("http.agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); |
Source code |
|
1 2 3 4 5 |
URL urlObject = new URL(urlString); URLConnection conn = urlObject.openConnection(); conn.setRequestProperty ( "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" ); MyInputStream = conn.getInputStream(); |
Source code |
|
1 2 3 |
(start with java -d*http.agent*="myAgent" ....) >java "-Dhttp.agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" MyClass |
Source code |
|
1 2 3 4 |
You can try to set the default java useragent: http://docs.oracle.com/javase/1.4.2/docs/guide/net/properties.html (start with java -d*http.agent*="myAgent" ....) alternativly cou can provide a cstom URL sceme. |
Source code |
|
1 |
>java "-Dhttp.agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" MyClass |
Currently not. At the moment I haven't looked deep at it.Also theuserbl,
since you are probably the only one left around here who has considerably knowledge about the Jabaco framework,
did you happen to look at my post:
http://www.jabaco.org/board/770-jbdialog…uplocation.html
Do you have any thoughts or even solution for that?
And then you have to replace your Jabaco.jar in your Jabaco-directory with this one.Quoted
I know you have provided many hints on how to compile the framework.
Would you mind to give me a rough scetch on how to do that again?
This is what I fetched from the forum so far:
1. Compile with the Java compiler Javac all in the directory VBA Framework\src
go to the directory "Framework\src" of the Framework-> tell javac VBA\*.java
That compiles all files there
2. Delete all *.java files in VBA, because you need for the jar-file only the just compiled binaries
3. Copy the complete VBA directory in a new directory and copy all in "framework\lib" in the same directory
4. After that the directories and files in your new directory have to look like:
\META-INF
\com
\eaio
NativeCall.dll
\net
\VBA
5. Now input it completly in a Zip archive rename it to Jabaco.jar
When you have compiled it, you have for example a file called "FrameworkTest.jar".Quoted
6. Load the file "FrameworkTest.jba" in the directory VB of the Jabaco-Framework in your Jabaco-IDE
7. Compile it with Jabaco
Important: Don't compile direct after loading FrameworkTest.jba in the IDE.Quoted
6. Load the file "FrameworkTest.jba" in the directory VB of the Jabaco-Framework in your Jabaco-IDE
7. Compile it with Jabaco
Jabaco Source |
|
1 |
.BorderStyle = vbBSNone |
Jabaco Source |
|
1 2 3 |
JFrame f = new JFrame("My Window"); f.setSize(400,300); f.setVisible(true); |
Jabaco Source |
|
1 2 3 4 5 |
JFrame f = new JFrame("My Window"); p = new JPanel(); p.setPreferredSize(new Dimension(400,300)); f.add(p); f.setVisible(true); |
Source code |
|
1 2 3 4 5 |
@echo off start /B javaw -Dhttp.agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" -jar -Xms16m -Xmx512m my.jar @echo on |
Source code |
|
1 |
System.setProperty ("http.agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)") |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
* Listing1604.java */ import java.util.*; public class Listing1604 { public static void main(String[] args) { System.setProperty ("http.agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); Properties sysprops = System.getProperties(); Enumeration propnames = sysprops.propertyNames(); while (propnames.hasMoreElements()) { String propname = (String)propnames.nextElement(); System.out.println( propname + "=" + System.getProperty(propname) ); } } } |
Jabaco Source |
|
1 2 |
http.agent2=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) http.agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) |
Jabaco Source |
|
1 |
http.agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) |
Jabaco Source |
|
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 |
Option Explicit Public Sub Command1_Click() java#lang#Class.forName("org.h2.Driver") Dim conn As Connection Dim qry As String Dim st As java#sql#Statement Dim rs As ResultSet Dim UserAgent As Boolean = True conn = DriverManager.getConnection("jdbc:h2:C:\test", "xy", "xyz") st = conn.createStatement() If UserAgent = True Then System.setProperty("http.agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)") System.setProperty("http.agent2", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)") Else System.setProperty("http.agent", "") System.setProperty("http.agent2", "") 'java.io.IOException: Server returned HTTP response code: 403 End If Debug.Print System.getProperty("http.agent") Debug.Print System.getProperty("http.agent2") st.executeUpdate("DROP TABLE IF EXISTS RAWDATA;") qry = "CREATE MEMORY TABLE RAWDATA (HTML CLOB);" st.executeUpdate(qry) qry = "INSERT INTO RAWDATA (HTML) VALUES " & _ "(SELECT FILE_READ('http://www.onvista.de/aktien/realtime.html?WKN=840400', NULL));" ' "(SELECT FILE_READ('http://www.google.de/search?q=H2+database', NULL));" ' "(SELECT FILE_READ('http://www.jabaco.org', NULL));" st.executeUpdate(qry) rs = st.executeQuery("SELECT * FROM RAWDATA;") Do While rs.next() Me.Caption = "success " & Left(rs.getString("HTML"),10) & "..." Loop End Sub |
Quoted
java.io.IOException: Server returned HTTP response code: 403