CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

STAR-CCM+ Java class

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2008, 05:37
Default STAR-CCM+ Java class
  #1
Claudene
Guest
 
Posts: n/a
I have design a Java class to be called from a STAR-CCM+ macro. But I've got the error: ...17: cannot find symbol symbol : class javatest

I set the variable CLASSPATH before starting starccm+ but it didn't solve the problem. I have also tried to set from menubar Tools->Options->"STAR-CCM+, Environment", „User macro classpath" but it also not works.

Here you can find my steps: change directory: cd /home/cre/StarCCM compiling Java program (/home/cre/StarCCM/testjava.java) javac testjava.java â€"d /home/cre/StarCCM I'm using Bash, so: export CLASSPATH=/home/cre/StarCCM starting STAR-CCM+: starccm+ Start the server connection and run the starccm+ macro. The error above is printed out.

The javatest.java: public class javatest{ public javatest(){} public void print(){

System.out.println(" # Class javatest called");} }

STARCCM+ macro: ... public void execute() { javatest myobj = new javatest(); myobj.print(); ...

I'll appreciate any kind of suggestion. Thanks in advance.

  Reply With Quote

Old   July 17, 2008, 06:49
Default Re: STAR-CCM+ Java class
  #2
Claudene
Guest
 
Posts: n/a
Solved!! I save the STARCCM+ macro and my javatest.java code saved on the directory

/home/cre/StarCCM/javatest

both java code has now in the first line

package javatest;

the macro saved from STARCCM+ has the line 'package macro;', I took it out.

that's it!!!

  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java form and star ccm+ Itoa Siemens 1 July 2, 2008 11:15
Java home how to basilwatson OpenFOAM Installation 1 April 28, 2008 09:37
Ibm java gcc rrr OpenFOAM Installation 2 December 30, 2005 05:18
java vs c++ zxaar Main CFD Forum 10 December 3, 2004 03:05
STAR-CD Combustion Class in Detroit Andy Robertson Siemens 1 July 15, 2000 20:16


All times are GMT -4. The time now is 11:44.