Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8788561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:10:39+00:00 2026-06-13T22:10:39+00:00

For example, i have java class JRXlsExporter, if i instantiated that java from java

  • 0

For example, i have java class JRXlsExporter, if i instantiated that java from java my code is :

    JRXlsExporter myObject= new JRXlsExporter();

and from PHP become:

    $myObject = new Java("net.sf.jasperreports.engine.export.JRXlsExporter");

It works, but if i have java class with parameter, for example :

    JRXlsExporter myObject= new JRXlsExporter(param1,param2);

How to instantiate/call that java class from PHP ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:10:40+00:00Added an answer on June 13, 2026 at 10:10 pm

    Here is an example of how java.util.Date object is instantiated, with some constructor arguments:

    $date = new Java("java.util.Date", 70, 9, 4);
    

    Further, it says:

    The new Java(“java.util.Date”, 70, 9, 4) call creates a new instance of the java.util.Date class using the java.util.Date(int year, int month, int day) constructor.

    So, you could maybe try this:

    $myObject = new Java("net.sf.jasperreports.engine.export.JRXlsExporter", param1, param2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a "simple" 4 class example that reliably shows unexpected behavior from java
Say suppose I have the following Java code. public class Example { public static
For example, I have the java code below: URL u = new URL(http://google.com); URLConnection
For example I have a file name call A.java. Here its structure: public class
I have a simple java project (adapted from the example here ), which is
I have an array, for example (in Java) int[] a = new int[N]; I
I have a HTML file that is linked to a Java class using the
I'm working on a Java project where I have created a class that looks
I have a Java class which can be called from shell. (via java [command][options])
I have a Java class that is using Runtime.exec() to execute a cscript process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.